From: Avri Altman <Avri.Altman@wdc.com>
To: Markus Elfring <Markus.Elfring@web.de>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
Alim Akhtar <alim.akhtar@samsung.com>,
Allison Randal <allison@lohutok.net>,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"James E. J. Bottomley" <jejb@linux.ibm.com>,
Kangjie Lu <kjlu@umn.edu>,
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Pedro Sousa <pedrom.sousa@synopsys.com>,
Stanley Chu <stanley.chu@mediatek.com>,
Thomas Gleixner <tglx@linutronix.de>,
Wei Li <liwei213@huawei.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>
Subject: RE: [PATCH] scsi: ufs-hisi: Use PTR_ERR_OR_ZERO() in ufs_hisi_get_resource()
Date: Wed, 11 Sep 2019 12:55:09 +0000 [thread overview]
Message-ID: <MN2PR04MB6991E9732236A682DB8E9A2DFCB10@MN2PR04MB6991.namprd04.prod.outlook.com> (raw)
In-Reply-To: <9e667f19-434e-ed30-78cb-9ddc6323c51e@web.de>
>
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 7 Sep 2019 14:25:31 +0200
>
> Simplify this function implementation by using a known function.
>
> Generated by: scripts/coccinelle/api/ptr_ret.cocci
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
> ---
> drivers/scsi/ufs/ufs-hisi.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/scsi/ufs/ufs-hisi.c b/drivers/scsi/ufs/ufs-hisi.c index
> f4d1dca962c4..a0ea57c19dbc 100644
> --- a/drivers/scsi/ufs/ufs-hisi.c
> +++ b/drivers/scsi/ufs/ufs-hisi.c
> @@ -454,10 +454,7 @@ static int ufs_hisi_get_resource(struct ufs_hisi_host
> *host)
> /* get resource of ufs sys ctrl */
> mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> host->ufs_sys_ctrl = devm_ioremap_resource(dev, mem_res);
> - if (IS_ERR(host->ufs_sys_ctrl))
> - return PTR_ERR(host->ufs_sys_ctrl);
> -
> - return 0;
> + return PTR_ERR_OR_ZERO(host->ufs_sys_ctrl);
> }
>
> static void ufs_hisi_set_pm_lvl(struct ufs_hba *hba)
> --
> 2.23.0
prev parent reply other threads:[~2019-09-11 12:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-07 12:36 [PATCH] scsi: ufs-hisi: Use PTR_ERR_OR_ZERO() in ufs_hisi_get_resource() Markus Elfring
2019-09-11 12:55 ` Avri Altman [this message]
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=MN2PR04MB6991E9732236A682DB8E9A2DFCB10@MN2PR04MB6991.namprd04.prod.outlook.com \
--to=avri.altman@wdc.com \
--cc=Markus.Elfring@web.de \
--cc=alim.akhtar@samsung.com \
--cc=allison@lohutok.net \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=jejb@linux.ibm.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kjlu@umn.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=liwei213@huawei.com \
--cc=manivannan.sadhasivam@linaro.org \
--cc=martin.petersen@oracle.com \
--cc=pedrom.sousa@synopsys.com \
--cc=stanley.chu@mediatek.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;
as well as URLs for NNTP newsgroup(s).