* [PATCH] scsi: lpfc: correct size for cmdwqe/rspwqe for memset
@ 2024-03-01 14:44 Muhammad Usama Anjum
2024-03-01 16:39 ` Christophe JAILLET
2024-03-04 10:18 ` AngeloGioacchino Del Regno
0 siblings, 2 replies; 5+ messages in thread
From: Muhammad Usama Anjum @ 2024-03-01 14:44 UTC (permalink / raw)
To: James Smart, Dick Kennedy, James E.J. Bottomley,
Martin K. Petersen, Justin Tee
Cc: Muhammad Usama Anjum, kernel, kernel-janitors, James Smart,
linux-scsi, linux-kernel
The cmdwqe and rspwqe are of type lpfc_wqe128. They should be memset
with the same type.
Fixes: 61910d6a5243 ("scsi: lpfc: SLI path split: Refactor CT paths")
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
---
drivers/scsi/lpfc/lpfc_bsg.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c
index d80e6e81053b0..8caf54aa20391 100644
--- a/drivers/scsi/lpfc/lpfc_bsg.c
+++ b/drivers/scsi/lpfc/lpfc_bsg.c
@@ -3169,10 +3169,10 @@ lpfc_bsg_diag_loopback_run(struct bsg_job *job)
}
cmdwqe = &cmdiocbq->wqe;
- memset(cmdwqe, 0, sizeof(union lpfc_wqe));
+ memset(cmdwqe, 0, sizeof(union lpfc_wqe128));
if (phba->sli_rev < LPFC_SLI_REV4) {
rspwqe = &rspiocbq->wqe;
- memset(rspwqe, 0, sizeof(union lpfc_wqe));
+ memset(rspwqe, 0, sizeof(union lpfc_wqe128));
}
INIT_LIST_HEAD(&head);
--
2.39.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] scsi: lpfc: correct size for cmdwqe/rspwqe for memset
2024-03-01 14:44 [PATCH] scsi: lpfc: correct size for cmdwqe/rspwqe for memset Muhammad Usama Anjum
@ 2024-03-01 16:39 ` Christophe JAILLET
2024-03-01 18:59 ` Justin Tee
2024-03-04 10:18 ` AngeloGioacchino Del Regno
1 sibling, 1 reply; 5+ messages in thread
From: Christophe JAILLET @ 2024-03-01 16:39 UTC (permalink / raw)
To: Muhammad Usama Anjum, James Smart, Dick Kennedy,
James E.J. Bottomley, Martin K. Petersen, Justin Tee
Cc: kernel, kernel-janitors, James Smart, linux-scsi, linux-kernel
Le 01/03/2024 à 15:44, Muhammad Usama Anjum a écrit :
> The cmdwqe and rspwqe are of type lpfc_wqe128. They should be memset
> with the same type.
>
> Fixes: 61910d6a5243 ("scsi: lpfc: SLI path split: Refactor CT paths")
> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
> ---
> drivers/scsi/lpfc/lpfc_bsg.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c
> index d80e6e81053b0..8caf54aa20391 100644
> --- a/drivers/scsi/lpfc/lpfc_bsg.c
> +++ b/drivers/scsi/lpfc/lpfc_bsg.c
> @@ -3169,10 +3169,10 @@ lpfc_bsg_diag_loopback_run(struct bsg_job *job)
> }
>
> cmdwqe = &cmdiocbq->wqe;
> - memset(cmdwqe, 0, sizeof(union lpfc_wqe));
> + memset(cmdwqe, 0, sizeof(union lpfc_wqe128));
Hi,
maybe even:
memset(cmdwqe, 0, sizeof(*cmdwqe));
Same below and in your other patch.
just my 2c,
CJ
> if (phba->sli_rev < LPFC_SLI_REV4) {
> rspwqe = &rspiocbq->wqe;
> - memset(rspwqe, 0, sizeof(union lpfc_wqe));
> + memset(rspwqe, 0, sizeof(union lpfc_wqe128));
> }
>
> INIT_LIST_HEAD(&head);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] scsi: lpfc: correct size for cmdwqe/rspwqe for memset
2024-03-01 16:39 ` Christophe JAILLET
@ 2024-03-01 18:59 ` Justin Tee
2024-03-04 8:44 ` Muhammad Usama Anjum
0 siblings, 1 reply; 5+ messages in thread
From: Justin Tee @ 2024-03-01 18:59 UTC (permalink / raw)
To: Muhammad Usama Anjum
Cc: Christophe JAILLET, James Smart, Dick Kennedy,
James E.J. Bottomley, Martin K. Petersen, kernel,
kernel-janitors, James Smart, linux-scsi, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 923 bytes --]
Hi Muhammad,
Agreed with Christophe's comment.
memset(cmdwqe, 0, sizeof(*cmdwqe));
memset(rspwqe, 0, sizeof(*rspwqe));
Thanks,
Justin
--
This electronic communication and the information and any files transmitted
with it, or attached to it, are confidential and are intended solely for
the use of the individual or entity to whom it is addressed and may contain
information that is confidential, legally privileged, protected by privacy
laws, or otherwise restricted from disclosure to anyone else. If you are
not the intended recipient or the person responsible for delivering the
e-mail to the intended recipient, you are hereby notified that any use,
copying, distributing, dissemination, forwarding, printing, or copying of
this e-mail is strictly prohibited. If you received this e-mail in error,
please return the e-mail to the sender, delete it from your computer, and
destroy any printed copy of it.
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4203 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] scsi: lpfc: correct size for cmdwqe/rspwqe for memset
2024-03-01 18:59 ` Justin Tee
@ 2024-03-04 8:44 ` Muhammad Usama Anjum
0 siblings, 0 replies; 5+ messages in thread
From: Muhammad Usama Anjum @ 2024-03-04 8:44 UTC (permalink / raw)
To: Justin Tee, Christophe JAILLET
Cc: Muhammad Usama Anjum, James Smart, Dick Kennedy,
James E.J. Bottomley, Martin K. Petersen, kernel,
kernel-janitors, James Smart, linux-scsi, linux-kernel
I'll send v2.
On 3/1/24 11:59 PM, Justin Tee wrote:
> Hi Muhammad,
>
> Agreed with Christophe's comment.
>
> memset(cmdwqe, 0, sizeof(*cmdwqe));
> memset(rspwqe, 0, sizeof(*rspwqe));
>
> Thanks,
> Justin
>
--
BR,
Muhammad Usama Anjum
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] scsi: lpfc: correct size for cmdwqe/rspwqe for memset
2024-03-01 14:44 [PATCH] scsi: lpfc: correct size for cmdwqe/rspwqe for memset Muhammad Usama Anjum
2024-03-01 16:39 ` Christophe JAILLET
@ 2024-03-04 10:18 ` AngeloGioacchino Del Regno
1 sibling, 0 replies; 5+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-03-04 10:18 UTC (permalink / raw)
To: Muhammad Usama Anjum, James Smart, Dick Kennedy,
James E.J. Bottomley, Martin K. Petersen, Justin Tee
Cc: kernel, kernel-janitors, James Smart, linux-scsi, linux-kernel
Il 01/03/24 15:44, Muhammad Usama Anjum ha scritto:
> The cmdwqe and rspwqe are of type lpfc_wqe128. They should be memset
> with the same type.
>
> Fixes: 61910d6a5243 ("scsi: lpfc: SLI path split: Refactor CT paths")
> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
> ---
> drivers/scsi/lpfc/lpfc_bsg.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c
> index d80e6e81053b0..8caf54aa20391 100644
> --- a/drivers/scsi/lpfc/lpfc_bsg.c
> +++ b/drivers/scsi/lpfc/lpfc_bsg.c
> @@ -3169,10 +3169,10 @@ lpfc_bsg_diag_loopback_run(struct bsg_job *job)
> }
>
> cmdwqe = &cmdiocbq->wqe;
> - memset(cmdwqe, 0, sizeof(union lpfc_wqe));
> + memset(cmdwqe, 0, sizeof(union lpfc_wqe128));
memset(cmdwqe, 0, sizeof(*cmdwqe));
Cheers,
Angelo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-03-04 10:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-01 14:44 [PATCH] scsi: lpfc: correct size for cmdwqe/rspwqe for memset Muhammad Usama Anjum
2024-03-01 16:39 ` Christophe JAILLET
2024-03-01 18:59 ` Justin Tee
2024-03-04 8:44 ` Muhammad Usama Anjum
2024-03-04 10:18 ` AngeloGioacchino Del Regno
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®