* [PATCH] scsi: mpt3sas: clean up a sizeof()
@ 2019-06-26 10:12 Dan Carpenter
2019-06-26 14:22 ` James Bottomley
2019-06-26 14:37 ` Dan Carpenter
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2019-06-26 10:12 UTC (permalink / raw)
To: kernel-janitors
This patch is just a cleanup and doesn't change run time because both
sizeof EVENT and SCSI are 84 bytes. But this is clearly a cut and paste
error and the SCSI struct was intended.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/scsi/mpt3sas/mpt3sas_ctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
index d4ecfbbe738c..06a901ed743c 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
@@ -3280,7 +3280,7 @@ diag_trigger_scsi_store(struct device *cdev,
spin_lock_irqsave(&ioc->diag_trigger_lock, flags);
sz = min(sizeof(struct SL_WH_SCSI_TRIGGERS_T), count);
memset(&ioc->diag_trigger_scsi, 0,
- sizeof(struct SL_WH_EVENT_TRIGGERS_T));
+ sizeof(struct SL_WH_SCSI_TRIGGERS_T));
memcpy(&ioc->diag_trigger_scsi, buf, sz);
if (ioc->diag_trigger_scsi.ValidEntries > NUM_VALID_ENTRIES)
ioc->diag_trigger_scsi.ValidEntries = NUM_VALID_ENTRIES;
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: mpt3sas: clean up a sizeof()
2019-06-26 10:12 [PATCH] scsi: mpt3sas: clean up a sizeof() Dan Carpenter
@ 2019-06-26 14:22 ` James Bottomley
2019-06-26 14:37 ` Dan Carpenter
1 sibling, 0 replies; 3+ messages in thread
From: James Bottomley @ 2019-06-26 14:22 UTC (permalink / raw)
To: kernel-janitors
On Wed, 2019-06-26 at 13:12 +0300, Dan Carpenter wrote:
> This patch is just a cleanup and doesn't change run time because both
> sizeof EVENT and SCSI are 84 bytes. But this is clearly a cut and
> paste
> error and the SCSI struct was intended.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> drivers/scsi/mpt3sas/mpt3sas_ctl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c
> b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
> index d4ecfbbe738c..06a901ed743c 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
> @@ -3280,7 +3280,7 @@ diag_trigger_scsi_store(struct device *cdev,
> spin_lock_irqsave(&ioc->diag_trigger_lock, flags);
> sz = min(sizeof(struct SL_WH_SCSI_TRIGGERS_T), count);
> memset(&ioc->diag_trigger_scsi, 0,
> - sizeof(struct SL_WH_EVENT_TRIGGERS_T));
> + sizeof(struct SL_WH_SCSI_TRIGGERS_T));
Please can we make this the correct pattern of
sizeof(ioc->diag_trigger_scsi)
James
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: mpt3sas: clean up a sizeof()
2019-06-26 10:12 [PATCH] scsi: mpt3sas: clean up a sizeof() Dan Carpenter
2019-06-26 14:22 ` James Bottomley
@ 2019-06-26 14:37 ` Dan Carpenter
1 sibling, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2019-06-26 14:37 UTC (permalink / raw)
To: kernel-janitors
On Wed, Jun 26, 2019 at 07:22:30AM -0700, James Bottomley wrote:
> On Wed, 2019-06-26 at 13:12 +0300, Dan Carpenter wrote:
> > This patch is just a cleanup and doesn't change run time because both
> > sizeof EVENT and SCSI are 84 bytes. But this is clearly a cut and
> > paste
> > error and the SCSI struct was intended.
> >
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > ---
> > drivers/scsi/mpt3sas/mpt3sas_ctl.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c
> > b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
> > index d4ecfbbe738c..06a901ed743c 100644
> > --- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c
> > +++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
> > @@ -3280,7 +3280,7 @@ diag_trigger_scsi_store(struct device *cdev,
> > spin_lock_irqsave(&ioc->diag_trigger_lock, flags);
> > sz = min(sizeof(struct SL_WH_SCSI_TRIGGERS_T), count);
> > memset(&ioc->diag_trigger_scsi, 0,
> > - sizeof(struct SL_WH_EVENT_TRIGGERS_T));
> > + sizeof(struct SL_WH_SCSI_TRIGGERS_T));
>
> Please can we make this the correct pattern of
>
> sizeof(ioc->diag_trigger_scsi)
Sure. I'll resend.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-06-26 14:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-26 10:12 [PATCH] scsi: mpt3sas: clean up a sizeof() Dan Carpenter
2019-06-26 14:22 ` James Bottomley
2019-06-26 14:37 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).