From: Markus Elfring <Markus.Elfring@web.de>
To: Alex Dewar <alex.dewar@gmx.co.uk>,
Allison Randal <allison@lohutok.net>,
Arnd Bergmann <arnd@arndb.de>,
Chaitra Basappa <chaitra.basappa@broadcom.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Himanshu Madhani <hmadhani@marvell.com>,
"James E. J. Bottomley" <jejb@linux.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Richard Fontana <rfontana@redhat.com>,
Sathya Prakash <sathya.prakash@broadcom.com>,
Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>,
Thomas Gleixner <tglx@linutronix.de>,
linux-scsi@vger.kernel.org, aacraid@microsemi.com,
MPT-FusionLinux.pdl@broadcom.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: Remove unnecessary calls to memset after dma_alloc_coherent
Date: Sat, 4 Apr 2020 13:14:52 +0200 [thread overview]
Message-ID: <e2401a31-e9fd-e849-e27c-6e079f5556d2@web.de> (raw)
> dma_alloc_coherent() now zeroes memory after allocation, so additional
> calls to memset() afterwards are unnecessary. Remove them.
I suggest to reconsider the distribution of recipients also for this patch
according to the fields “Cc” and “To”.
…
> +++ b/drivers/scsi/dpt_i2o.c
…
> @@ -3067,13 +3064,12 @@ static int adpt_i2o_build_sys_table(void)
> sys_tbl_len = sizeof(struct i2o_sys_tbl) + // Header + IOPs
> (hba_count) * sizeof(struct i2o_sys_tbl_entry);
>
> - sys_tbl = dma_alloc_coherent(&pHba->pDev->dev,
> - sys_tbl_len, &sys_tbl_pa, GFP_KERNEL);
> + sys_tbl = dma_alloc_coherent(&pHba->pDev->dev, sys_tbl_len,
> + &sys_tbl_pa, GFP_KERNEL);
> if (!sys_tbl) {
…
> +++ b/drivers/scsi/mvsas/mv_init.c
> @@ -244,28 +244,22 @@ static int mvs_alloc(struct mvs_info *mvi, struct Scsi_Host *shost)
…
> - mvi->slot = dma_alloc_coherent(mvi->dev,
> - sizeof(*mvi->slot) * slot_nr,
> + mvi->slot = dma_alloc_coherent(mvi->dev, sizeof(*mvi->slot) * slot_nr,
> &mvi->slot_dma, GFP_KERNEL);
> if (!mvi->slot)
…
> +++ b/drivers/scsi/qla2xxx/qla_isr.c
> @@ -79,7 +79,7 @@ qla24xx_process_abts(struct scsi_qla_host *vha, void *pkt)
> (uint8_t *)abts, sizeof(*abts));
>
> rsp_els = dma_alloc_coherent(&ha->pdev->dev, sizeof(*rsp_els), &dma,
> - GFP_KERNEL);
> + GFP_KERNEL);
> if (!rsp_els) {
…
> +++ b/drivers/scsi/qla2xxx/qla_mbx.c
> @@ -4887,15 +4887,13 @@ qla25xx_set_els_cmds_supported(scsi_qla_host_t *vha)
> "Entered %s.\n", __func__);
>
> els_cmd_map = dma_alloc_coherent(&ha->pdev->dev, ELS_CMD_MAP_SIZE,
> - &els_cmd_map_dma, GFP_KERNEL);
> + &els_cmd_map_dma, GFP_KERNEL);
> if (!els_cmd_map) {
…
I find it safer to integrate such source code reformattings by
another update step which will be separated from the proposed deletion
of unwanted function calls.
Regards,
Markus
next reply other threads:[~2020-04-04 11:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-04 11:14 Markus Elfring [this message]
2020-04-07 16:02 ` [PATCH] scsi: Remove unnecessary calls to memset after dma_alloc_coherent Alex Dewar
2020-04-07 16:56 ` Markus Elfring
2020-04-09 11:42 ` Alex Dewar
2020-04-09 14:06 ` Markus Elfring
-- strict thread matches above, loose matches on Subject: below --
2020-04-03 17:58 Alex Dewar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e2401a31-e9fd-e849-e27c-6e079f5556d2@web.de \
--to=markus.elfring@web.de \
--cc=MPT-FusionLinux.pdl@broadcom.com \
--cc=aacraid@microsemi.com \
--cc=alex.dewar@gmx.co.uk \
--cc=allison@lohutok.net \
--cc=arnd@arndb.de \
--cc=chaitra.basappa@broadcom.com \
--cc=gregkh@linuxfoundation.org \
--cc=hmadhani@marvell.com \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=rfontana@redhat.com \
--cc=sathya.prakash@broadcom.com \
--cc=suganath-prabu.subramani@broadcom.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox