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
nexedi
linux
Commits
38418a28
Commit
38418a28
authored
Jun 03, 2004
by
Alexander Viro
Committed by
Linus Torvalds
Jun 03, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] sparse: misc scsi annotation
osst.c, st.c, scsi_debug.c annotated.
parent
51a17275
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
19 deletions
+19
-19
drivers/scsi/osst.c
drivers/scsi/osst.c
+7
-7
drivers/scsi/scsi_debug.c
drivers/scsi/scsi_debug.c
+4
-4
drivers/scsi/st.c
drivers/scsi/st.c
+8
-8
No files found.
drivers/scsi/osst.c
View file @
38418a28
...
@@ -154,8 +154,8 @@ static int modes_defined = FALSE;
...
@@ -154,8 +154,8 @@ static int modes_defined = FALSE;
static
OSST_buffer
*
new_tape_buffer
(
int
,
int
,
int
);
static
OSST_buffer
*
new_tape_buffer
(
int
,
int
,
int
);
static
int
enlarge_buffer
(
OSST_buffer
*
,
int
);
static
int
enlarge_buffer
(
OSST_buffer
*
,
int
);
static
void
normalize_buffer
(
OSST_buffer
*
);
static
void
normalize_buffer
(
OSST_buffer
*
);
static
int
append_to_buffer
(
const
char
*
,
OSST_buffer
*
,
int
);
static
int
append_to_buffer
(
const
char
__user
*
,
OSST_buffer
*
,
int
);
static
int
from_buffer
(
OSST_buffer
*
,
char
*
,
int
);
static
int
from_buffer
(
OSST_buffer
*
,
char
__user
*
,
int
);
static
int
osst_zero_buffer_tail
(
OSST_buffer
*
);
static
int
osst_zero_buffer_tail
(
OSST_buffer
*
);
static
int
osst_copy_to_buffer
(
OSST_buffer
*
,
unsigned
char
*
);
static
int
osst_copy_to_buffer
(
OSST_buffer
*
,
unsigned
char
*
);
static
int
osst_copy_from_buffer
(
OSST_buffer
*
,
unsigned
char
*
);
static
int
osst_copy_from_buffer
(
OSST_buffer
*
,
unsigned
char
*
);
...
@@ -3157,13 +3157,13 @@ static void reset_state(OS_Scsi_Tape *STp)
...
@@ -3157,13 +3157,13 @@ static void reset_state(OS_Scsi_Tape *STp)
/* Entry points to osst */
/* Entry points to osst */
/* Write command */
/* Write command */
static
ssize_t
osst_write
(
struct
file
*
filp
,
const
char
*
buf
,
size_t
count
,
loff_t
*
ppos
)
static
ssize_t
osst_write
(
struct
file
*
filp
,
const
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
)
{
{
ssize_t
total
,
retval
=
0
;
ssize_t
total
,
retval
=
0
;
ssize_t
i
,
do_count
,
blks
,
transfer
;
ssize_t
i
,
do_count
,
blks
,
transfer
;
int
write_threshold
;
int
write_threshold
;
int
doing_write
=
0
;
int
doing_write
=
0
;
const
char
*
b_point
;
const
char
__user
*
b_point
;
Scsi_Request
*
SRpnt
=
NULL
;
Scsi_Request
*
SRpnt
=
NULL
;
ST_mode
*
STm
;
ST_mode
*
STm
;
ST_partstat
*
STps
;
ST_partstat
*
STps
;
...
@@ -3486,7 +3486,7 @@ if (SRpnt) printk(KERN_ERR "%s:A: Not supposed to have SRpnt at line %d\n", name
...
@@ -3486,7 +3486,7 @@ if (SRpnt) printk(KERN_ERR "%s:A: Not supposed to have SRpnt at line %d\n", name
/* Read command */
/* Read command */
static
ssize_t
osst_read
(
struct
file
*
filp
,
char
*
buf
,
size_t
count
,
loff_t
*
ppos
)
static
ssize_t
osst_read
(
struct
file
*
filp
,
char
__user
*
buf
,
size_t
count
,
loff_t
*
ppos
)
{
{
ssize_t
total
,
retval
=
0
;
ssize_t
total
,
retval
=
0
;
ssize_t
i
,
transfer
;
ssize_t
i
,
transfer
;
...
@@ -5189,7 +5189,7 @@ static void normalize_buffer(OSST_buffer *STbuffer)
...
@@ -5189,7 +5189,7 @@ static void normalize_buffer(OSST_buffer *STbuffer)
/* Move data from the user buffer to the tape buffer. Returns zero (success) or
/* Move data from the user buffer to the tape buffer. Returns zero (success) or
negative error code. */
negative error code. */
static
int
append_to_buffer
(
const
char
*
ubp
,
OSST_buffer
*
st_bp
,
int
do_count
)
static
int
append_to_buffer
(
const
char
__user
*
ubp
,
OSST_buffer
*
st_bp
,
int
do_count
)
{
{
int
i
,
cnt
,
res
,
offset
;
int
i
,
cnt
,
res
,
offset
;
...
@@ -5222,7 +5222,7 @@ static int append_to_buffer(const char *ubp, OSST_buffer *st_bp, int do_count)
...
@@ -5222,7 +5222,7 @@ static int append_to_buffer(const char *ubp, OSST_buffer *st_bp, int do_count)
/* Move data from the tape buffer to the user buffer. Returns zero (success) or
/* Move data from the tape buffer to the user buffer. Returns zero (success) or
negative error code. */
negative error code. */
static
int
from_buffer
(
OSST_buffer
*
st_bp
,
char
*
ubp
,
int
do_count
)
static
int
from_buffer
(
OSST_buffer
*
st_bp
,
char
__user
*
ubp
,
int
do_count
)
{
{
int
i
,
cnt
,
res
,
offset
;
int
i
,
cnt
,
res
,
offset
;
...
...
drivers/scsi/scsi_debug.c
View file @
38418a28
...
@@ -1461,7 +1461,7 @@ static ssize_t sdebug_add_host_store(struct device_driver * ddp,
...
@@ -1461,7 +1461,7 @@ static ssize_t sdebug_add_host_store(struct device_driver * ddp,
DRIVER_ATTR
(
add_host
,
S_IRUGO
|
S_IWUSR
,
sdebug_add_host_show
,
DRIVER_ATTR
(
add_host
,
S_IRUGO
|
S_IWUSR
,
sdebug_add_host_show
,
sdebug_add_host_store
)
sdebug_add_host_store
)
static
void
do_create_driverfs_files
()
static
void
do_create_driverfs_files
(
void
)
{
{
driver_create_file
(
&
sdebug_driverfs_driver
,
&
driver_attr_delay
);
driver_create_file
(
&
sdebug_driverfs_driver
,
&
driver_attr_delay
);
driver_create_file
(
&
sdebug_driverfs_driver
,
&
driver_attr_opts
);
driver_create_file
(
&
sdebug_driverfs_driver
,
&
driver_attr_opts
);
...
@@ -1473,7 +1473,7 @@ static void do_create_driverfs_files()
...
@@ -1473,7 +1473,7 @@ static void do_create_driverfs_files()
driver_create_file
(
&
sdebug_driverfs_driver
,
&
driver_attr_add_host
);
driver_create_file
(
&
sdebug_driverfs_driver
,
&
driver_attr_add_host
);
}
}
static
void
do_remove_driverfs_files
()
static
void
do_remove_driverfs_files
(
void
)
{
{
driver_remove_file
(
&
sdebug_driverfs_driver
,
&
driver_attr_add_host
);
driver_remove_file
(
&
sdebug_driverfs_driver
,
&
driver_attr_add_host
);
driver_remove_file
(
&
sdebug_driverfs_driver
,
&
driver_attr_scsi_level
);
driver_remove_file
(
&
sdebug_driverfs_driver
,
&
driver_attr_scsi_level
);
...
@@ -1594,7 +1594,7 @@ static void sdebug_release_adapter(struct device * dev)
...
@@ -1594,7 +1594,7 @@ static void sdebug_release_adapter(struct device * dev)
kfree
(
sdbg_host
);
kfree
(
sdbg_host
);
}
}
static
int
sdebug_add_adapter
()
static
int
sdebug_add_adapter
(
void
)
{
{
int
k
,
devs_per_host
;
int
k
,
devs_per_host
;
int
error
=
0
;
int
error
=
0
;
...
@@ -1657,7 +1657,7 @@ static int sdebug_add_adapter()
...
@@ -1657,7 +1657,7 @@ static int sdebug_add_adapter()
return
error
;
return
error
;
}
}
static
void
sdebug_remove_adapter
()
static
void
sdebug_remove_adapter
(
void
)
{
{
struct
sdebug_host_info
*
sdbg_host
=
NULL
;
struct
sdebug_host_info
*
sdbg_host
=
NULL
;
...
...
drivers/scsi/st.c
View file @
38418a28
...
@@ -176,8 +176,8 @@ static int modes_defined;
...
@@ -176,8 +176,8 @@ static int modes_defined;
static
ST_buffer
*
new_tape_buffer
(
int
,
int
,
int
);
static
ST_buffer
*
new_tape_buffer
(
int
,
int
,
int
);
static
int
enlarge_buffer
(
ST_buffer
*
,
int
,
int
);
static
int
enlarge_buffer
(
ST_buffer
*
,
int
,
int
);
static
void
normalize_buffer
(
ST_buffer
*
);
static
void
normalize_buffer
(
ST_buffer
*
);
static
int
append_to_buffer
(
const
char
*
,
ST_buffer
*
,
int
);
static
int
append_to_buffer
(
const
char
__user
*
,
ST_buffer
*
,
int
);
static
int
from_buffer
(
ST_buffer
*
,
char
*
,
int
);
static
int
from_buffer
(
ST_buffer
*
,
char
__user
*
,
int
);
static
void
move_buffer_data
(
ST_buffer
*
,
int
);
static
void
move_buffer_data
(
ST_buffer
*
,
int
);
static
void
buf_to_sg
(
ST_buffer
*
,
unsigned
int
);
static
void
buf_to_sg
(
ST_buffer
*
,
unsigned
int
);
...
@@ -1276,7 +1276,7 @@ static ssize_t rw_checks(Scsi_Tape *STp, struct file *filp, size_t count, loff_t
...
@@ -1276,7 +1276,7 @@ static ssize_t rw_checks(Scsi_Tape *STp, struct file *filp, size_t count, loff_t
}
}
static
int
setup_buffering
(
Scsi_Tape
*
STp
,
const
char
*
buf
,
size_t
count
,
int
is_read
)
static
int
setup_buffering
(
Scsi_Tape
*
STp
,
const
char
__user
*
buf
,
size_t
count
,
int
is_read
)
{
{
int
i
,
bufsize
,
retval
=
0
;
int
i
,
bufsize
,
retval
=
0
;
ST_buffer
*
STbp
=
STp
->
buffer
;
ST_buffer
*
STbp
=
STp
->
buffer
;
...
@@ -1348,7 +1348,7 @@ static void release_buffering(Scsi_Tape *STp)
...
@@ -1348,7 +1348,7 @@ static void release_buffering(Scsi_Tape *STp)
/* Write command */
/* Write command */
static
ssize_t
static
ssize_t
st_write
(
struct
file
*
filp
,
const
cha
r
*
buf
,
size_t
count
,
loff_t
*
ppos
)
st_write
(
struct
file
*
filp
,
const
char
__use
r
*
buf
,
size_t
count
,
loff_t
*
ppos
)
{
{
ssize_t
total
;
ssize_t
total
;
ssize_t
i
,
do_count
,
blks
,
transfer
;
ssize_t
i
,
do_count
,
blks
,
transfer
;
...
@@ -1356,7 +1356,7 @@ static ssize_t
...
@@ -1356,7 +1356,7 @@ static ssize_t
int
undone
,
retry_eot
=
0
,
scode
;
int
undone
,
retry_eot
=
0
,
scode
;
int
async_write
;
int
async_write
;
unsigned
char
cmd
[
MAX_COMMAND_SIZE
];
unsigned
char
cmd
[
MAX_COMMAND_SIZE
];
const
char
*
b_point
;
const
char
__user
*
b_point
;
Scsi_Request
*
SRpnt
=
NULL
;
Scsi_Request
*
SRpnt
=
NULL
;
Scsi_Tape
*
STp
=
filp
->
private_data
;
Scsi_Tape
*
STp
=
filp
->
private_data
;
ST_mode
*
STm
;
ST_mode
*
STm
;
...
@@ -1817,7 +1817,7 @@ static long read_tape(Scsi_Tape *STp, long count, Scsi_Request ** aSRpnt)
...
@@ -1817,7 +1817,7 @@ static long read_tape(Scsi_Tape *STp, long count, Scsi_Request ** aSRpnt)
/* Read command */
/* Read command */
static
ssize_t
static
ssize_t
st_read
(
struct
file
*
filp
,
cha
r
*
buf
,
size_t
count
,
loff_t
*
ppos
)
st_read
(
struct
file
*
filp
,
char
__use
r
*
buf
,
size_t
count
,
loff_t
*
ppos
)
{
{
ssize_t
total
;
ssize_t
total
;
ssize_t
retval
=
0
;
ssize_t
retval
=
0
;
...
@@ -3527,7 +3527,7 @@ static void normalize_buffer(ST_buffer * STbuffer)
...
@@ -3527,7 +3527,7 @@ static void normalize_buffer(ST_buffer * STbuffer)
/* Move data from the user buffer to the tape buffer. Returns zero (success) or
/* Move data from the user buffer to the tape buffer. Returns zero (success) or
negative error code. */
negative error code. */
static
int
append_to_buffer
(
const
char
*
ubp
,
ST_buffer
*
st_bp
,
int
do_count
)
static
int
append_to_buffer
(
const
char
__user
*
ubp
,
ST_buffer
*
st_bp
,
int
do_count
)
{
{
int
i
,
cnt
,
res
,
offset
;
int
i
,
cnt
,
res
,
offset
;
...
@@ -3558,7 +3558,7 @@ static int append_to_buffer(const char *ubp, ST_buffer * st_bp, int do_count)
...
@@ -3558,7 +3558,7 @@ static int append_to_buffer(const char *ubp, ST_buffer * st_bp, int do_count)
/* Move data from the tape buffer to the user buffer. Returns zero (success) or
/* Move data from the tape buffer to the user buffer. Returns zero (success) or
negative error code. */
negative error code. */
static
int
from_buffer
(
ST_buffer
*
st_bp
,
char
*
ubp
,
int
do_count
)
static
int
from_buffer
(
ST_buffer
*
st_bp
,
char
__user
*
ubp
,
int
do_count
)
{
{
int
i
,
cnt
,
res
,
offset
;
int
i
,
cnt
,
res
,
offset
;
...
...
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