* [PATCH] scsi: qedf: Cleanup the type of io_log->op
@ 2017-05-03 21:23 ` Dan Carpenter
0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2017-05-03 21:23 UTC (permalink / raw)
To: QLogic-Storage-Upstream; +Cc: James E.J. Bottomley, linux-scsi, kernel-janitors
We store sc_cmd->cmnd[0] which is an unsigned char in io_log->op so
this should also be unsigned char. The other thing is that this is
displayed in the debugfs:
seq_printf(s, "0x%02x:", io_log->op);
Smatch complains that the formatting won't work for negative values so
changing it to unsigned silences that warning as well.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/scsi/qedf/qedf.h b/drivers/scsi/qedf/qedf.h
index 40aeb6bb96a2..07ee88200e91 100644
--- a/drivers/scsi/qedf/qedf.h
+++ b/drivers/scsi/qedf/qedf.h
@@ -259,7 +259,7 @@ struct qedf_io_log {
uint16_t task_id;
uint32_t port_id; /* Remote port fabric ID */
int lun;
- char op; /* SCSI CDB */
+ unsigned char op; /* SCSI CDB */
uint8_t lba[4];
unsigned int bufflen; /* SCSI buffer length */
unsigned int sg_count; /* Number of SG elements */
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] scsi: qedf: Cleanup the type of io_log->op
@ 2017-05-03 21:23 ` Dan Carpenter
0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2017-05-03 21:23 UTC (permalink / raw)
To: QLogic-Storage-Upstream; +Cc: James E.J. Bottomley, linux-scsi, kernel-janitors
We store sc_cmd->cmnd[0] which is an unsigned char in io_log->op so
this should also be unsigned char. The other thing is that this is
displayed in the debugfs:
seq_printf(s, "0x%02x:", io_log->op);
Smatch complains that the formatting won't work for negative values so
changing it to unsigned silences that warning as well.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/scsi/qedf/qedf.h b/drivers/scsi/qedf/qedf.h
index 40aeb6bb96a2..07ee88200e91 100644
--- a/drivers/scsi/qedf/qedf.h
+++ b/drivers/scsi/qedf/qedf.h
@@ -259,7 +259,7 @@ struct qedf_io_log {
uint16_t task_id;
uint32_t port_id; /* Remote port fabric ID */
int lun;
- char op; /* SCSI CDB */
+ unsigned char op; /* SCSI CDB */
uint8_t lba[4];
unsigned int bufflen; /* SCSI buffer length */
unsigned int sg_count; /* Number of SG elements */
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] scsi: qedf: Cleanup the type of io_log->op
2017-05-03 21:23 ` Dan Carpenter
@ 2017-05-04 15:07 ` Chad Dupuis
-1 siblings, 0 replies; 6+ messages in thread
From: Chad Dupuis @ 2017-05-04 15:07 UTC (permalink / raw)
To: Dan Carpenter
Cc: QLogic-Storage-Upstream, James E.J. Bottomley, linux-scsi,
kernel-janitors
On Wed, 3 May 2017, 5:23pm, Dan Carpenter wrote:
> We store sc_cmd->cmnd[0] which is an unsigned char in io_log->op so
> this should also be unsigned char. The other thing is that this is
> displayed in the debugfs:
>
> seq_printf(s, "0x%02x:", io_log->op);
>
> Smatch complains that the formatting won't work for negative values so
> changing it to unsigned silences that warning as well.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/scsi/qedf/qedf.h b/drivers/scsi/qedf/qedf.h
> index 40aeb6bb96a2..07ee88200e91 100644
> --- a/drivers/scsi/qedf/qedf.h
> +++ b/drivers/scsi/qedf/qedf.h
> @@ -259,7 +259,7 @@ struct qedf_io_log {
> uint16_t task_id;
> uint32_t port_id; /* Remote port fabric ID */
> int lun;
> - char op; /* SCSI CDB */
> + unsigned char op; /* SCSI CDB */
> uint8_t lba[4];
> unsigned int bufflen; /* SCSI buffer length */
> unsigned int sg_count; /* Number of SG elements */
>
Makes sense.
Acked-by: Chad Dupuis <chad.dupuis@cavium.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] scsi: qedf: Cleanup the type of io_log->op
@ 2017-05-04 15:07 ` Chad Dupuis
0 siblings, 0 replies; 6+ messages in thread
From: Chad Dupuis @ 2017-05-04 15:07 UTC (permalink / raw)
To: Dan Carpenter
Cc: QLogic-Storage-Upstream, James E.J. Bottomley, linux-scsi,
kernel-janitors
On Wed, 3 May 2017, 5:23pm, Dan Carpenter wrote:
> We store sc_cmd->cmnd[0] which is an unsigned char in io_log->op so
> this should also be unsigned char. The other thing is that this is
> displayed in the debugfs:
>
> seq_printf(s, "0x%02x:", io_log->op);
>
> Smatch complains that the formatting won't work for negative values so
> changing it to unsigned silences that warning as well.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/scsi/qedf/qedf.h b/drivers/scsi/qedf/qedf.h
> index 40aeb6bb96a2..07ee88200e91 100644
> --- a/drivers/scsi/qedf/qedf.h
> +++ b/drivers/scsi/qedf/qedf.h
> @@ -259,7 +259,7 @@ struct qedf_io_log {
> uint16_t task_id;
> uint32_t port_id; /* Remote port fabric ID */
> int lun;
> - char op; /* SCSI CDB */
> + unsigned char op; /* SCSI CDB */
> uint8_t lba[4];
> unsigned int bufflen; /* SCSI buffer length */
> unsigned int sg_count; /* Number of SG elements */
>
Makes sense.
Acked-by: Chad Dupuis <chad.dupuis@cavium.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] scsi: qedf: Cleanup the type of io_log->op
2017-05-03 21:23 ` Dan Carpenter
@ 2017-05-09 1:52 ` Martin K. Petersen
-1 siblings, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2017-05-09 1:52 UTC (permalink / raw)
To: Dan Carpenter
Cc: QLogic-Storage-Upstream, James E.J. Bottomley, linux-scsi,
kernel-janitors
Dan,
> We store sc_cmd->cmnd[0] which is an unsigned char in io_log->op so
> this should also be unsigned char. The other thing is that this is
> displayed in the debugfs:
Applied to 4.12/scsi-fixes, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] scsi: qedf: Cleanup the type of io_log->op
@ 2017-05-09 1:52 ` Martin K. Petersen
0 siblings, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2017-05-09 1:52 UTC (permalink / raw)
To: Dan Carpenter
Cc: QLogic-Storage-Upstream, James E.J. Bottomley, linux-scsi,
kernel-janitors
Dan,
> We store sc_cmd->cmnd[0] which is an unsigned char in io_log->op so
> this should also be unsigned char. The other thing is that this is
> displayed in the debugfs:
Applied to 4.12/scsi-fixes, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-05-09 1:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-03 21:23 [PATCH] scsi: qedf: Cleanup the type of io_log->op Dan Carpenter
2017-05-03 21:23 ` Dan Carpenter
2017-05-04 15:07 ` Chad Dupuis
2017-05-04 15:07 ` Chad Dupuis
2017-05-09 1:52 ` Martin K. Petersen
2017-05-09 1:52 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.