From: Steffen Maier <maier@linux.ibm.com>
To: Thomas Meyer <thomas@m3y3r.de>,
bblock@linux.ibm.com, schwidefsky@de.ibm.com,
heiko.carstens@de.ibm.com, linux-s390@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [SCSI] zfcp: NULL check before some freeing functions is not needed.
Date: Mon, 3 Dec 2018 11:59:15 +0100 [thread overview]
Message-ID: <28bf96ec-4dff-29bd-f628-1a30e189aea8@linux.ibm.com> (raw)
In-Reply-To: <1543760930051-347492467-5-diffsplit-thomas@m3y3r.de>
Thanks, this was already submitted for v4.12 with
https://www.spinics.net/lists/linux-scsi/msg125190.html
based on
https://www.spinics.net/lists/linux-s390/msg21307.html
Also, previously seen in
https://www.spinics.net/lists/linux-s390/msg22035.html
On 12/02/2018 09:52 PM, Thomas Meyer wrote:
> NULL check before some freeing functions is not needed.
>
> Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
> ---
>
> diff -u -p a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c
> --- a/drivers/s390/scsi/zfcp_aux.c
> +++ b/drivers/s390/scsi/zfcp_aux.c
> @@ -248,20 +248,13 @@ static int zfcp_allocate_low_mem_buffers
>
> static void zfcp_free_low_mem_buffers(struct zfcp_adapter *adapter)
> {
> - if (adapter->pool.erp_req)
> - mempool_destroy(adapter->pool.erp_req);
> - if (adapter->pool.scsi_req)
> - mempool_destroy(adapter->pool.scsi_req);
> - if (adapter->pool.scsi_abort)
> - mempool_destroy(adapter->pool.scsi_abort);
> - if (adapter->pool.qtcb_pool)
> - mempool_destroy(adapter->pool.qtcb_pool);
> - if (adapter->pool.status_read_req)
> - mempool_destroy(adapter->pool.status_read_req);
> - if (adapter->pool.sr_data)
> - mempool_destroy(adapter->pool.sr_data);
> - if (adapter->pool.gid_pn)
> - mempool_destroy(adapter->pool.gid_pn);
> + mempool_destroy(adapter->pool.erp_req);
> + mempool_destroy(adapter->pool.scsi_req);
> + mempool_destroy(adapter->pool.scsi_abort);
> + mempool_destroy(adapter->pool.qtcb_pool);
> + mempool_destroy(adapter->pool.status_read_req);
> + mempool_destroy(adapter->pool.sr_data);
> + mempool_destroy(adapter->pool.gid_pn);
> }
>
> /**
>
--
Mit freundlichen Gruessen / Kind regards
Steffen Maier
Linux on IBM Z Development
IBM Deutschland Research & Development GmbH
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschaeftsfuehrung: Dirk Wittkopp
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
next prev parent reply other threads:[~2018-12-03 10:59 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-02 20:52 Cocci spatch "ifnullfree" - v4.20-rc4 Thomas Meyer
2018-12-02 20:52 ` [PATCH] scsi: NULL check before some freeing functions is not needed Thomas Meyer
2018-12-02 20:52 ` [PATCH] drm/amdgpu: " Thomas Meyer
2018-12-03 11:51 ` Koenig, Christian
2018-12-02 20:52 ` [PATCH] scsi: aic7xxx: " Thomas Meyer
2018-12-02 20:52 ` [PATCH] dlm: " Thomas Meyer
2018-12-02 20:52 ` [PATCH] [SCSI] zfcp: " Thomas Meyer
2018-12-03 10:59 ` Steffen Maier [this message]
2018-12-02 20:52 ` [PATCH] scsi: megaraid_sas: " Thomas Meyer
2018-12-03 6:40 ` Sumit Saxena
2018-12-08 2:40 ` Martin K. Petersen
2018-12-02 20:52 ` [PATCH] KVM: PPC: Book3S HV: " Thomas Meyer
2018-12-03 0:06 ` Suraj Jitindar Singh
2018-12-02 20:52 ` [PATCH] PM / AVS: SmartReflex: " Thomas Meyer
2018-12-11 18:53 ` Kevin Hilman
2018-12-17 11:45 ` Rafael J. Wysocki
2018-12-02 20:52 ` [PATCH] scsi: lpfc: " Thomas Meyer
2018-12-02 20:52 ` [PATCH] scsi: qla4xxx: " Thomas Meyer
2018-12-03 5:48 ` Rangankar, Manish
2018-12-02 20:52 ` [PATCH] scsi: qedf: " Thomas Meyer
2018-12-03 5:57 ` Rangankar, Manish
2018-12-08 2:41 ` Martin K. Petersen
2018-12-02 20:52 ` [PATCH] scsi: mpt3sas: " Thomas Meyer
2018-12-02 20:52 ` [PATCH] platform/x86: intel_ips: " Thomas Meyer
2018-12-03 19:10 ` Andy Shevchenko
2018-12-02 20:52 ` [PATCH] scsi: qla2xxx: " Thomas Meyer
2018-12-03 18:07 ` [EXT] " Madhani, Himanshu
2018-12-08 2:47 ` Martin K. Petersen
2018-12-02 20:52 ` [PATCH] scsi: ipr: " Thomas Meyer
2018-12-02 20:52 ` [PATCH] scsi: csiostor: " Thomas Meyer
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=28bf96ec-4dff-29bd-f628-1a30e189aea8@linux.ibm.com \
--to=maier@linux.ibm.com \
--cc=bblock@linux.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=schwidefsky@de.ibm.com \
--cc=thomas@m3y3r.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;
as well as URLs for NNTP newsgroup(s).