scsi: missing braces in scsi_extd_sense_format()
Subsystems (2)
PATCH 1/1 scsi: missing braces in scsi_extd_sense_format()
There were missing curly braces so we always return the first additional2[] string.
Fixes 7046d2fa6dbd ('scsi: use sdev as argument for sense code printing')
Signed-off-by Dan Carpenter <[email protected]>
drivers/scsi/constants.c +2 -1
@@ -1282,9 +1282,10 @@ scsi_extd_sense_format(unsigned char asc, unsigned char ascq, const char **fmt)for (i =0 ; additional2[i].fmt; i++) {if (additional2[i].code1 = asc && ascq >= additional2[i].code2_min && - ascq <= additional2[i].code2_max) + ascq <= additional2[i].code2_max) { *fmt = additional2[i].fmt;return additional2[i].str; + } }#endif return NULL ;
Quoted 5 lines · Dan Carpenter
There were missing curly braces so we always return the first additional2[] string.
Fixes 7046d2fa6dbd ('scsi: use sdev as argument for sense code printing')Signed-off-by Dan Carpenter <[email protected]>
Thanks!
Quoted 13 lines · Dan Carpenter
There were missing curly braces so we always return the first additional2[] string.
Fixes 7046d2fa6dbd ('scsi: use sdev as argument for sense code printing')Signed-off-by Dan Carpenter <[email protected]>drivers/scsi/constants.c +0
-0@@ -1282,9 +1282,10 @@ scsi_extd_sense_format(unsigned char asc, unsigned char ascq, const char **fmt)for (i =0 ; additional2[i].fmt; i++) {
drivers/scsi/constants.c scsi_extd_sense_format(unsigned char asc, unsigned char ascq, const char **fmt) · line 1291
Quoted 10 lines
drivers/scsi/constants.c +2
-1if (additional2[i].code1 = asc && ascq >= additional2[i].code2_min && - ascq <= additional2[i].code2_max) + ascq <= additional2[i].code2_max) { *fmt = additional2[i].fmt;return additional2[i].str; + } }#endif return NULL ;
D'oh.
Reviewed-by Hannes Reinecke <[email protected]>
Cheers,
Hannes
Signature · 8 lines
Dr. Hannes Reinecke zSeries & Storage [email protected] +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: J. Hawn, J. Guild, F. Imendörffer, HRB 21284 (AG Nürnberg) -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html