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
c36fa971
Commit
c36fa971
authored
Feb 04, 2003
by
James Bottomley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct compiler warnings with use of likely() on pointers
parent
b0bb3273
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
drivers/scsi/scsi.c
drivers/scsi/scsi.c
+2
-2
No files found.
drivers/scsi/scsi.c
View file @
c36fa971
...
@@ -402,7 +402,7 @@ struct scsi_cmnd *scsi_get_command(struct scsi_device *dev, int gfp_mask)
...
@@ -402,7 +402,7 @@ struct scsi_cmnd *scsi_get_command(struct scsi_device *dev, int gfp_mask)
{
{
struct
scsi_cmnd
*
cmd
=
__scsi_get_command
(
dev
->
host
,
gfp_mask
);
struct
scsi_cmnd
*
cmd
=
__scsi_get_command
(
dev
->
host
,
gfp_mask
);
if
(
likely
(
cmd
))
{
if
(
likely
(
cmd
!=
NULL
))
{
memset
(
cmd
,
0
,
sizeof
(
*
cmd
));
memset
(
cmd
,
0
,
sizeof
(
*
cmd
));
cmd
->
device
=
dev
;
cmd
->
device
=
dev
;
cmd
->
state
=
SCSI_STATE_UNUSED
;
cmd
->
state
=
SCSI_STATE_UNUSED
;
...
@@ -437,7 +437,7 @@ void scsi_put_command(struct scsi_cmnd *cmd)
...
@@ -437,7 +437,7 @@ void scsi_put_command(struct scsi_cmnd *cmd)
}
}
spin_unlock_irqrestore
(
&
shost
->
free_list_lock
,
flags
);
spin_unlock_irqrestore
(
&
shost
->
free_list_lock
,
flags
);
if
(
likely
(
cmd
))
if
(
likely
(
cmd
!=
NULL
))
kmem_cache_free
(
shost
->
cmd_pool
->
slab
,
cmd
);
kmem_cache_free
(
shost
->
cmd_pool
->
slab
,
cmd
);
}
}
...
...
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