scsi: sg: Fix a warning message
Subsystems (3)
PATCH 1/1 scsi: sg: Fix a warning message
The WARN_ONCE() macro takes a condition and a warning message as parameters. This code accidentally left out the condition so it doesn't print a warning (just a stack trace).
Fixes ddfb8cbdf699 ("scsi: sg: Rework scatter-gather handling")
Signed-off-by Dan Carpenter <[email protected]>
--- drivers/scsi/sg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/sg.c +1 -1
@@ -2525,7 +2525,7 @@ sg_rq_end_io_usercontext(struct work_struct *work)struct sg_fd *sfp;if (!srp) { -WARN_ONCE ("%s: srp unexpectedly NULL\n" , __func__); +WARN_ONCE (1 ,"%s: srp unexpectedly NULL\n" , __func__);return ; } sfp = srp->parentfp;
Signature · 1 line
2.30.1
Quoted 6 lines · Dan Carpenter
The
WARN_ONCE()macro takes a condition and a warning message as parameters. This code accidentally left out the condition so it doesn't print a warning (just a stack trace).Fixes ddfb8cbdf699 ("scsi: sg: Rework scatter-gather handling")Signed-off-by Dan Carpenter <[email protected]>
Acked-by Douglas Gilbert <[email protected]>
This one wasn't addressed yesterday, thanks.
Quoted 18 lines
--- drivers/scsi/sg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/scsi/sg.c +1
-1@@ -2525,7 +2525,7 @@ sg_rq_end_io_usercontext(struct work_struct *work)struct sg_fd *sfp;if (!srp) { -WARN_ONCE ("%s: srp unexpectedly NULL\n" , __func__); +WARN_ONCE (1 ,"%s: srp unexpectedly NULL\n" , __func__);return ; } sfp = srp->parentfp;