[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <MN2PR04MB6991E9732236A682DB8E9A2DFCB10@MN2PR04MB6991.namprd04.prod.outlook.com>
Date: Wed, 11 Sep 2019 12:55:09 +0000
From: Avri Altman <Avri.Altman@....com>
To: Markus Elfring <Markus.Elfring@....de>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
Alim Akhtar <alim.akhtar@...sung.com>,
Allison Randal <allison@...utok.net>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"James E. J. Bottomley" <jejb@...ux.ibm.com>,
Kangjie Lu <kjlu@....edu>,
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Pedro Sousa <pedrom.sousa@...opsys.com>,
Stanley Chu <stanley.chu@...iatek.com>,
Thomas Gleixner <tglx@...utronix.de>,
Wei Li <liwei213@...wei.com>
CC: LKML <linux-kernel@...r.kernel.org>,
"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>
Subject: RE: [PATCH] scsi: ufs-hisi: Use PTR_ERR_OR_ZERO() in
ufs_hisi_get_resource()
>
> From: Markus Elfring <elfring@...rs.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@...rs.sourceforge.net>
Reviewed-by: Avri Altman <avri.altman@....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
Powered by blists - more mailing lists