Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
3f6a2676
Commit
3f6a2676
authored
Nov 20, 2004
by
Russell King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] Sparse fixes
Clean up sparse warnings in rtctime.c and netwinder-hw.c
parent
1514a193
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
17 deletions
+19
-17
arch/arm/common/rtctime.c
arch/arm/common/rtctime.c
+15
-13
arch/arm/mach-footbridge/netwinder-hw.c
arch/arm/mach-footbridge/netwinder-hw.c
+4
-4
No files found.
arch/arm/common/rtctime.c
View file @
3f6a2676
...
...
@@ -179,7 +179,7 @@ EXPORT_SYMBOL(rtc_update);
static
ssize_t
rtc_read
(
struct
file
*
file
,
char
*
buf
,
size_t
count
,
loff_t
*
ppos
)
rtc_read
(
struct
file
*
file
,
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
)
{
DECLARE_WAITQUEUE
(
wait
,
current
);
unsigned
long
data
;
...
...
@@ -215,7 +215,7 @@ rtc_read(struct file *file, char *buf, size_t count, loff_t *ppos)
remove_wait_queue
(
&
rtc_wait
,
&
wait
);
if
(
ret
==
0
)
{
ret
=
put_user
(
data
,
(
unsigned
long
*
)
buf
);
ret
=
put_user
(
data
,
(
unsigned
long
__user
*
)
buf
);
if
(
ret
==
0
)
ret
=
sizeof
(
unsigned
long
);
}
...
...
@@ -241,6 +241,7 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
struct
rtc_ops
*
ops
=
file
->
private_data
;
struct
rtc_time
tm
;
struct
rtc_wkalrm
alrm
;
void
__user
*
uarg
=
(
void
__user
*
)
arg
;
int
ret
=
-
EINVAL
;
switch
(
cmd
)
{
...
...
@@ -248,13 +249,13 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
ret
=
rtc_read_alarm
(
ops
,
&
alrm
);
if
(
ret
)
break
;
ret
=
copy_to_user
(
(
void
*
)
arg
,
&
alrm
.
time
,
sizeof
(
tm
));
ret
=
copy_to_user
(
u
arg
,
&
alrm
.
time
,
sizeof
(
tm
));
if
(
ret
)
ret
=
-
EFAULT
;
break
;
case
RTC_ALM_SET
:
ret
=
copy_from_user
(
&
alrm
.
time
,
(
void
*
)
arg
,
sizeof
(
tm
));
ret
=
copy_from_user
(
&
alrm
.
time
,
u
arg
,
sizeof
(
tm
));
if
(
ret
)
{
ret
=
-
EFAULT
;
break
;
...
...
@@ -272,7 +273,7 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
case
RTC_RD_TIME
:
rtc_read_time
(
ops
,
&
tm
);
ret
=
copy_to_user
(
(
void
*
)
arg
,
&
tm
,
sizeof
(
tm
));
ret
=
copy_to_user
(
u
arg
,
&
tm
,
sizeof
(
tm
));
if
(
ret
)
ret
=
-
EFAULT
;
break
;
...
...
@@ -282,12 +283,13 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
ret
=
-
EACCES
;
break
;
}
ret
=
copy_from_user
(
&
tm
,
(
void
*
)
arg
,
sizeof
(
tm
));
if
(
ret
==
0
)
ret
=
rtc_set_time
(
ops
,
&
tm
);
else
ret
=
copy_from_user
(
&
tm
,
uarg
,
sizeof
(
tm
));
if
(
ret
)
{
ret
=
-
EFAULT
;
break
;
}
ret
=
rtc_set_time
(
ops
,
&
tm
);
break
;
case
RTC_EPOCH_SET
:
#ifndef rtc_epoch
...
...
@@ -308,11 +310,11 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
break
;
case
RTC_EPOCH_READ
:
ret
=
put_user
(
rtc_epoch
,
(
unsigned
long
*
)
arg
);
ret
=
put_user
(
rtc_epoch
,
(
unsigned
long
__user
*
)
u
arg
);
break
;
case
RTC_WKALM_SET
:
ret
=
copy_from_user
(
&
alrm
,
(
void
*
)
arg
,
sizeof
(
alrm
));
ret
=
copy_from_user
(
&
alrm
,
u
arg
,
sizeof
(
alrm
));
if
(
ret
)
{
ret
=
-
EFAULT
;
break
;
...
...
@@ -324,7 +326,7 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
ret
=
rtc_read_alarm
(
ops
,
&
alrm
);
if
(
ret
)
break
;
ret
=
copy_to_user
(
(
void
*
)
arg
,
&
alrm
,
sizeof
(
alrm
));
ret
=
copy_to_user
(
u
arg
,
&
alrm
,
sizeof
(
alrm
));
if
(
ret
)
ret
=
-
EFAULT
;
break
;
...
...
@@ -478,7 +480,7 @@ int register_rtc(struct rtc_ops *ops)
ret
=
misc_register
(
&
rtc_miscdev
);
if
(
ret
==
0
)
create_proc_read_entry
(
"driver/rtc"
,
0
,
0
,
create_proc_read_entry
(
"driver/rtc"
,
0
,
NULL
,
rtc_read_proc
,
ops
);
}
up
(
&
rtc_sem
);
...
...
arch/arm/mach-footbridge/netwinder-hw.c
View file @
3f6a2676
...
...
@@ -58,7 +58,7 @@ static inline void wb977_ww(int reg, int val)
outb
(
reg
,
0x370
);
outb
(
val
>>
8
,
0x371
);
outb
(
reg
+
1
,
0x370
);
outb
(
val
,
0x371
);
outb
(
val
&
255
,
0x371
);
}
#define wb977_device_select(dev) wb977_wb(0x07, dev)
...
...
@@ -488,7 +488,7 @@ static inline void rwa010_waveartist_init(int base, int irq, int dma)
WRITE_RWA
(
7
,
0
);
dprintk
(
"WaveArtist base: "
);
WRITE_RWA
(
0x61
,
base
);
WRITE_RWA
(
0x61
,
base
&
255
);
i
=
inb
(
0x203
);
WRITE_RWA
(
0x60
,
base
>>
8
);
...
...
@@ -510,7 +510,7 @@ static inline void rwa010_soundblaster_init(int sb_base, int al_base, int irq, i
WRITE_RWA
(
7
,
1
);
dprintk
(
"SoundBlaster base: "
);
WRITE_RWA
(
0x61
,
sb_base
);
WRITE_RWA
(
0x61
,
sb_base
&
255
);
i
=
inb
(
0x203
);
WRITE_RWA
(
0x60
,
sb_base
>>
8
);
...
...
@@ -525,7 +525,7 @@ static inline void rwa010_soundblaster_init(int sb_base, int al_base, int irq, i
dprintk
(
"%d (%d)
\n
"
,
inb
(
0x203
),
dma
);
dprintk
(
"AdLib base: "
);
WRITE_RWA
(
0x63
,
al_base
);
WRITE_RWA
(
0x63
,
al_base
&
255
);
i
=
inb
(
0x203
);
WRITE_RWA
(
0x62
,
al_base
>>
8
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment