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
0ba45b3c
Commit
0ba45b3c
authored
Jun 18, 2004
by
Alexander Viro
Committed by
Linus Torvalds
Jun 18, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] sparse: mwave annotation
parent
04bf264c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
39 deletions
+36
-39
drivers/char/mwave/3780i.c
drivers/char/mwave/3780i.c
+10
-10
drivers/char/mwave/3780i.h
drivers/char/mwave/3780i.h
+5
-5
drivers/char/mwave/mwavedd.c
drivers/char/mwave/mwavedd.c
+17
-20
drivers/char/mwave/tp3780i.c
drivers/char/mwave/tp3780i.c
+2
-2
drivers/char/mwave/tp3780i.h
drivers/char/mwave/tp3780i.h
+2
-2
No files found.
drivers/char/mwave/3780i.c
View file @
0ba45b3c
...
@@ -467,10 +467,10 @@ int dsp3780I_Run(DSP_3780I_CONFIG_SETTINGS * pSettings)
...
@@ -467,10 +467,10 @@ int dsp3780I_Run(DSP_3780I_CONFIG_SETTINGS * pSettings)
}
}
int
dsp3780I_ReadDStore
(
unsigned
short
usDspBaseIO
,
void
*
pvBuffer
,
int
dsp3780I_ReadDStore
(
unsigned
short
usDspBaseIO
,
void
__user
*
pvBuffer
,
unsigned
uCount
,
unsigned
long
ulDSPAddr
)
unsigned
uCount
,
unsigned
long
ulDSPAddr
)
{
{
unsigned
short
*
pusBuffer
=
pvBuffer
;
unsigned
short
__user
*
pusBuffer
=
pvBuffer
;
unsigned
short
val
;
unsigned
short
val
;
...
@@ -508,10 +508,10 @@ int dsp3780I_ReadDStore(unsigned short usDspBaseIO, void *pvBuffer,
...
@@ -508,10 +508,10 @@ int dsp3780I_ReadDStore(unsigned short usDspBaseIO, void *pvBuffer,
}
}
int
dsp3780I_ReadAndClearDStore
(
unsigned
short
usDspBaseIO
,
int
dsp3780I_ReadAndClearDStore
(
unsigned
short
usDspBaseIO
,
void
*
pvBuffer
,
unsigned
uCount
,
void
__user
*
pvBuffer
,
unsigned
uCount
,
unsigned
long
ulDSPAddr
)
unsigned
long
ulDSPAddr
)
{
{
unsigned
short
*
pusBuffer
=
pvBuffer
;
unsigned
short
__user
*
pusBuffer
=
pvBuffer
;
unsigned
short
val
;
unsigned
short
val
;
...
@@ -549,10 +549,10 @@ int dsp3780I_ReadAndClearDStore(unsigned short usDspBaseIO,
...
@@ -549,10 +549,10 @@ int dsp3780I_ReadAndClearDStore(unsigned short usDspBaseIO,
}
}
int
dsp3780I_WriteDStore
(
unsigned
short
usDspBaseIO
,
void
*
pvBuffer
,
int
dsp3780I_WriteDStore
(
unsigned
short
usDspBaseIO
,
void
__user
*
pvBuffer
,
unsigned
uCount
,
unsigned
long
ulDSPAddr
)
unsigned
uCount
,
unsigned
long
ulDSPAddr
)
{
{
unsigned
short
*
pusBuffer
=
pvBuffer
;
unsigned
short
__user
*
pusBuffer
=
pvBuffer
;
PRINTK_5
(
TRACE_3780I
,
PRINTK_5
(
TRACE_3780I
,
...
@@ -590,10 +590,10 @@ int dsp3780I_WriteDStore(unsigned short usDspBaseIO, void *pvBuffer,
...
@@ -590,10 +590,10 @@ int dsp3780I_WriteDStore(unsigned short usDspBaseIO, void *pvBuffer,
}
}
int
dsp3780I_ReadIStore
(
unsigned
short
usDspBaseIO
,
void
*
pvBuffer
,
int
dsp3780I_ReadIStore
(
unsigned
short
usDspBaseIO
,
void
__user
*
pvBuffer
,
unsigned
uCount
,
unsigned
long
ulDSPAddr
)
unsigned
uCount
,
unsigned
long
ulDSPAddr
)
{
{
unsigned
short
*
pusBuffer
=
pvBuffer
;
unsigned
short
__user
*
pusBuffer
=
pvBuffer
;
PRINTK_5
(
TRACE_3780I
,
PRINTK_5
(
TRACE_3780I
,
"3780i::dsp3780I_ReadIStore entry usDspBaseIO %x, pusBuffer %p, uCount %x, ulDSPAddr %lx
\n
"
,
"3780i::dsp3780I_ReadIStore entry usDspBaseIO %x, pusBuffer %p, uCount %x, ulDSPAddr %lx
\n
"
,
...
@@ -637,10 +637,10 @@ int dsp3780I_ReadIStore(unsigned short usDspBaseIO, void *pvBuffer,
...
@@ -637,10 +637,10 @@ int dsp3780I_ReadIStore(unsigned short usDspBaseIO, void *pvBuffer,
}
}
int
dsp3780I_WriteIStore
(
unsigned
short
usDspBaseIO
,
void
*
pvBuffer
,
int
dsp3780I_WriteIStore
(
unsigned
short
usDspBaseIO
,
void
__user
*
pvBuffer
,
unsigned
uCount
,
unsigned
long
ulDSPAddr
)
unsigned
uCount
,
unsigned
long
ulDSPAddr
)
{
{
unsigned
short
*
pusBuffer
=
pvBuffer
;
unsigned
short
__user
*
pusBuffer
=
pvBuffer
;
PRINTK_5
(
TRACE_3780I
,
PRINTK_5
(
TRACE_3780I
,
"3780i::dsp3780I_WriteIStore entry usDspBaseIO %x, pusBuffer %p, uCount %x, ulDSPAddr %lx
\n
"
,
"3780i::dsp3780I_WriteIStore entry usDspBaseIO %x, pusBuffer %p, uCount %x, ulDSPAddr %lx
\n
"
,
...
...
drivers/char/mwave/3780i.h
View file @
0ba45b3c
...
@@ -323,16 +323,16 @@ int dsp3780I_EnableDSP(DSP_3780I_CONFIG_SETTINGS * pSettings,
...
@@ -323,16 +323,16 @@ int dsp3780I_EnableDSP(DSP_3780I_CONFIG_SETTINGS * pSettings,
int
dsp3780I_DisableDSP
(
DSP_3780I_CONFIG_SETTINGS
*
pSettings
);
int
dsp3780I_DisableDSP
(
DSP_3780I_CONFIG_SETTINGS
*
pSettings
);
int
dsp3780I_Reset
(
DSP_3780I_CONFIG_SETTINGS
*
pSettings
);
int
dsp3780I_Reset
(
DSP_3780I_CONFIG_SETTINGS
*
pSettings
);
int
dsp3780I_Run
(
DSP_3780I_CONFIG_SETTINGS
*
pSettings
);
int
dsp3780I_Run
(
DSP_3780I_CONFIG_SETTINGS
*
pSettings
);
int
dsp3780I_ReadDStore
(
unsigned
short
usDspBaseIO
,
void
*
pvBuffer
,
int
dsp3780I_ReadDStore
(
unsigned
short
usDspBaseIO
,
void
__user
*
pvBuffer
,
unsigned
uCount
,
unsigned
long
ulDSPAddr
);
unsigned
uCount
,
unsigned
long
ulDSPAddr
);
int
dsp3780I_ReadAndClearDStore
(
unsigned
short
usDspBaseIO
,
int
dsp3780I_ReadAndClearDStore
(
unsigned
short
usDspBaseIO
,
void
*
pvBuffer
,
unsigned
uCount
,
void
__user
*
pvBuffer
,
unsigned
uCount
,
unsigned
long
ulDSPAddr
);
unsigned
long
ulDSPAddr
);
int
dsp3780I_WriteDStore
(
unsigned
short
usDspBaseIO
,
void
*
pvBuffer
,
int
dsp3780I_WriteDStore
(
unsigned
short
usDspBaseIO
,
void
__user
*
pvBuffer
,
unsigned
uCount
,
unsigned
long
ulDSPAddr
);
unsigned
uCount
,
unsigned
long
ulDSPAddr
);
int
dsp3780I_ReadIStore
(
unsigned
short
usDspBaseIO
,
void
*
pvBuffer
,
int
dsp3780I_ReadIStore
(
unsigned
short
usDspBaseIO
,
void
__user
*
pvBuffer
,
unsigned
uCount
,
unsigned
long
ulDSPAddr
);
unsigned
uCount
,
unsigned
long
ulDSPAddr
);
int
dsp3780I_WriteIStore
(
unsigned
short
usDspBaseIO
,
void
*
pvBuffer
,
int
dsp3780I_WriteIStore
(
unsigned
short
usDspBaseIO
,
void
__user
*
pvBuffer
,
unsigned
uCount
,
unsigned
long
ulDSPAddr
);
unsigned
uCount
,
unsigned
long
ulDSPAddr
);
unsigned
short
dsp3780I_ReadMsaCfg
(
unsigned
short
usDspBaseIO
,
unsigned
short
dsp3780I_ReadMsaCfg
(
unsigned
short
usDspBaseIO
,
unsigned
long
ulMsaAddr
);
unsigned
long
ulMsaAddr
);
...
...
drivers/char/mwave/mwavedd.c
View file @
0ba45b3c
...
@@ -121,6 +121,7 @@ static int mwave_ioctl(struct inode *inode, struct file *file,
...
@@ -121,6 +121,7 @@ static int mwave_ioctl(struct inode *inode, struct file *file,
{
{
unsigned
int
retval
=
0
;
unsigned
int
retval
=
0
;
pMWAVE_DEVICE_DATA
pDrvData
=
&
mwave_s_mdd
;
pMWAVE_DEVICE_DATA
pDrvData
=
&
mwave_s_mdd
;
void
__user
*
arg
=
(
void
__user
*
)
ioarg
;
PRINTK_5
(
TRACE_MWAVE
,
PRINTK_5
(
TRACE_MWAVE
,
"mwavedd::mwave_ioctl, entry inode %x file %x cmd %x arg %x
\n
"
,
"mwavedd::mwave_ioctl, entry inode %x file %x cmd %x arg %x
\n
"
,
...
@@ -164,8 +165,7 @@ static int mwave_ioctl(struct inode *inode, struct file *file,
...
@@ -164,8 +165,7 @@ static int mwave_ioctl(struct inode *inode, struct file *file,
" retval %x from tp3780I_QueryAbilities
\n
"
,
" retval %x from tp3780I_QueryAbilities
\n
"
,
retval
);
retval
);
if
(
retval
==
0
)
{
if
(
retval
==
0
)
{
if
(
copy_to_user
((
char
*
)
ioarg
,
if
(
copy_to_user
(
arg
,
&
rAbilities
,
(
char
*
)
&
rAbilities
,
sizeof
(
MW_ABILITIES
))
)
sizeof
(
MW_ABILITIES
))
)
return
-
EFAULT
;
return
-
EFAULT
;
}
}
...
@@ -179,13 +179,12 @@ static int mwave_ioctl(struct inode *inode, struct file *file,
...
@@ -179,13 +179,12 @@ static int mwave_ioctl(struct inode *inode, struct file *file,
case
IOCTL_MW_READ_DATA
:
case
IOCTL_MW_READ_DATA
:
case
IOCTL_MW_READCLEAR_DATA
:
{
case
IOCTL_MW_READCLEAR_DATA
:
{
MW_READWRITE
rReadData
;
MW_READWRITE
rReadData
;
unsigned
short
*
pusBuffer
=
0
;
unsigned
short
__user
*
pusBuffer
=
0
;
if
(
copy_from_user
((
char
*
)
&
rReadData
,
if
(
copy_from_user
(
&
rReadData
,
arg
,
(
char
*
)
ioarg
,
sizeof
(
MW_READWRITE
))
)
sizeof
(
MW_READWRITE
))
)
return
-
EFAULT
;
return
-
EFAULT
;
pusBuffer
=
(
unsigned
short
*
)
(
rReadData
.
pBuf
);
pusBuffer
=
(
unsigned
short
__user
*
)
(
rReadData
.
pBuf
);
PRINTK_4
(
TRACE_MWAVE
,
PRINTK_4
(
TRACE_MWAVE
,
"mwavedd::mwave_ioctl IOCTL_MW_READ_DATA,"
"mwavedd::mwave_ioctl IOCTL_MW_READ_DATA,"
...
@@ -193,7 +192,7 @@ static int mwave_ioctl(struct inode *inode, struct file *file,
...
@@ -193,7 +192,7 @@ static int mwave_ioctl(struct inode *inode, struct file *file,
rReadData
.
ulDataLength
,
ioarg
,
pusBuffer
);
rReadData
.
ulDataLength
,
ioarg
,
pusBuffer
);
retval
=
tp3780I_ReadWriteDspDStore
(
&
pDrvData
->
rBDData
,
retval
=
tp3780I_ReadWriteDspDStore
(
&
pDrvData
->
rBDData
,
iocmd
,
iocmd
,
(
void
*
)
pusBuffer
,
pusBuffer
,
rReadData
.
ulDataLength
,
rReadData
.
ulDataLength
,
rReadData
.
usDspAddress
);
rReadData
.
usDspAddress
);
}
}
...
@@ -201,12 +200,12 @@ static int mwave_ioctl(struct inode *inode, struct file *file,
...
@@ -201,12 +200,12 @@ static int mwave_ioctl(struct inode *inode, struct file *file,
case
IOCTL_MW_READ_INST
:
{
case
IOCTL_MW_READ_INST
:
{
MW_READWRITE
rReadData
;
MW_READWRITE
rReadData
;
unsigned
short
*
pusBuffer
=
0
;
unsigned
short
__user
*
pusBuffer
=
0
;
if
(
copy_from_user
(
(
char
*
)
&
rReadData
,
(
char
*
)
io
arg
,
if
(
copy_from_user
(
&
rReadData
,
arg
,
sizeof
(
MW_READWRITE
))
)
sizeof
(
MW_READWRITE
))
)
return
-
EFAULT
;
return
-
EFAULT
;
pusBuffer
=
(
unsigned
short
*
)
(
rReadData
.
pBuf
);
pusBuffer
=
(
unsigned
short
__user
*
)
(
rReadData
.
pBuf
);
PRINTK_4
(
TRACE_MWAVE
,
PRINTK_4
(
TRACE_MWAVE
,
"mwavedd::mwave_ioctl IOCTL_MW_READ_INST,"
"mwavedd::mwave_ioctl IOCTL_MW_READ_INST,"
...
@@ -222,13 +221,12 @@ static int mwave_ioctl(struct inode *inode, struct file *file,
...
@@ -222,13 +221,12 @@ static int mwave_ioctl(struct inode *inode, struct file *file,
case
IOCTL_MW_WRITE_DATA
:
{
case
IOCTL_MW_WRITE_DATA
:
{
MW_READWRITE
rWriteData
;
MW_READWRITE
rWriteData
;
unsigned
short
*
pusBuffer
=
0
;
unsigned
short
__user
*
pusBuffer
=
0
;
if
(
copy_from_user
((
char
*
)
&
rWriteData
,
if
(
copy_from_user
(
&
rWriteData
,
arg
,
(
char
*
)
ioarg
,
sizeof
(
MW_READWRITE
))
)
sizeof
(
MW_READWRITE
))
)
return
-
EFAULT
;
return
-
EFAULT
;
pusBuffer
=
(
unsigned
short
*
)
(
rWriteData
.
pBuf
);
pusBuffer
=
(
unsigned
short
__user
*
)
(
rWriteData
.
pBuf
);
PRINTK_4
(
TRACE_MWAVE
,
PRINTK_4
(
TRACE_MWAVE
,
"mwavedd::mwave_ioctl IOCTL_MW_WRITE_DATA,"
"mwavedd::mwave_ioctl IOCTL_MW_WRITE_DATA,"
...
@@ -244,13 +242,12 @@ static int mwave_ioctl(struct inode *inode, struct file *file,
...
@@ -244,13 +242,12 @@ static int mwave_ioctl(struct inode *inode, struct file *file,
case
IOCTL_MW_WRITE_INST
:
{
case
IOCTL_MW_WRITE_INST
:
{
MW_READWRITE
rWriteData
;
MW_READWRITE
rWriteData
;
unsigned
short
*
pusBuffer
=
0
;
unsigned
short
__user
*
pusBuffer
=
0
;
if
(
copy_from_user
((
char
*
)
&
rWriteData
,
if
(
copy_from_user
(
&
rWriteData
,
arg
,
(
char
*
)
ioarg
,
sizeof
(
MW_READWRITE
))
)
sizeof
(
MW_READWRITE
))
)
return
-
EFAULT
;
return
-
EFAULT
;
pusBuffer
=
(
unsigned
short
*
)
(
rWriteData
.
pBuf
);
pusBuffer
=
(
unsigned
short
__user
*
)
(
rWriteData
.
pBuf
);
PRINTK_4
(
TRACE_MWAVE
,
PRINTK_4
(
TRACE_MWAVE
,
"mwavedd::mwave_ioctl IOCTL_MW_WRITE_INST,"
"mwavedd::mwave_ioctl IOCTL_MW_WRITE_INST,"
...
@@ -388,7 +385,7 @@ static int mwave_ioctl(struct inode *inode, struct file *file,
...
@@ -388,7 +385,7 @@ static int mwave_ioctl(struct inode *inode, struct file *file,
}
}
static
ssize_t
mwave_read
(
struct
file
*
file
,
char
*
buf
,
size_t
count
,
static
ssize_t
mwave_read
(
struct
file
*
file
,
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
)
loff_t
*
ppos
)
{
{
PRINTK_5
(
TRACE_MWAVE
,
PRINTK_5
(
TRACE_MWAVE
,
...
@@ -399,7 +396,7 @@ static ssize_t mwave_read(struct file *file, char *buf, size_t count,
...
@@ -399,7 +396,7 @@ static ssize_t mwave_read(struct file *file, char *buf, size_t count,
}
}
static
ssize_t
mwave_write
(
struct
file
*
file
,
const
char
*
buf
,
static
ssize_t
mwave_write
(
struct
file
*
file
,
const
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
)
size_t
count
,
loff_t
*
ppos
)
{
{
PRINTK_5
(
TRACE_MWAVE
,
PRINTK_5
(
TRACE_MWAVE
,
...
...
drivers/char/mwave/tp3780i.c
View file @
0ba45b3c
...
@@ -522,7 +522,7 @@ int tp3780I_QueryAbilities(THINKPAD_BD_DATA * pBDData, MW_ABILITIES * pAbilities
...
@@ -522,7 +522,7 @@ int tp3780I_QueryAbilities(THINKPAD_BD_DATA * pBDData, MW_ABILITIES * pAbilities
}
}
int
tp3780I_ReadWriteDspDStore
(
THINKPAD_BD_DATA
*
pBDData
,
unsigned
int
uOpcode
,
int
tp3780I_ReadWriteDspDStore
(
THINKPAD_BD_DATA
*
pBDData
,
unsigned
int
uOpcode
,
void
*
pvBuffer
,
unsigned
int
uCount
,
void
__user
*
pvBuffer
,
unsigned
int
uCount
,
unsigned
long
ulDSPAddr
)
unsigned
long
ulDSPAddr
)
{
{
int
retval
=
0
;
int
retval
=
0
;
...
@@ -558,7 +558,7 @@ int tp3780I_ReadWriteDspDStore(THINKPAD_BD_DATA * pBDData, unsigned int uOpcode,
...
@@ -558,7 +558,7 @@ int tp3780I_ReadWriteDspDStore(THINKPAD_BD_DATA * pBDData, unsigned int uOpcode,
int
tp3780I_ReadWriteDspIStore
(
THINKPAD_BD_DATA
*
pBDData
,
unsigned
int
uOpcode
,
int
tp3780I_ReadWriteDspIStore
(
THINKPAD_BD_DATA
*
pBDData
,
unsigned
int
uOpcode
,
void
*
pvBuffer
,
unsigned
int
uCount
,
void
__user
*
pvBuffer
,
unsigned
int
uCount
,
unsigned
long
ulDSPAddr
)
unsigned
long
ulDSPAddr
)
{
{
int
retval
=
0
;
int
retval
=
0
;
...
...
drivers/char/mwave/tp3780i.h
View file @
0ba45b3c
...
@@ -93,10 +93,10 @@ int tp3780I_StartDSP(THINKPAD_BD_DATA * pBDData);
...
@@ -93,10 +93,10 @@ int tp3780I_StartDSP(THINKPAD_BD_DATA * pBDData);
int
tp3780I_QueryAbilities
(
THINKPAD_BD_DATA
*
pBDData
,
MW_ABILITIES
*
pAbilities
);
int
tp3780I_QueryAbilities
(
THINKPAD_BD_DATA
*
pBDData
,
MW_ABILITIES
*
pAbilities
);
int
tp3780I_Cleanup
(
THINKPAD_BD_DATA
*
pBDData
);
int
tp3780I_Cleanup
(
THINKPAD_BD_DATA
*
pBDData
);
int
tp3780I_ReadWriteDspDStore
(
THINKPAD_BD_DATA
*
pBDData
,
unsigned
int
uOpcode
,
int
tp3780I_ReadWriteDspDStore
(
THINKPAD_BD_DATA
*
pBDData
,
unsigned
int
uOpcode
,
void
*
pvBuffer
,
unsigned
int
uCount
,
void
__user
*
pvBuffer
,
unsigned
int
uCount
,
unsigned
long
ulDSPAddr
);
unsigned
long
ulDSPAddr
);
int
tp3780I_ReadWriteDspIStore
(
THINKPAD_BD_DATA
*
pBDData
,
unsigned
int
uOpcode
,
int
tp3780I_ReadWriteDspIStore
(
THINKPAD_BD_DATA
*
pBDData
,
unsigned
int
uOpcode
,
void
*
pvBuffer
,
unsigned
int
uCount
,
void
__user
*
pvBuffer
,
unsigned
int
uCount
,
unsigned
long
ulDSPAddr
);
unsigned
long
ulDSPAddr
);
...
...
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