[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAOMZO5C2RRAQLgAPQM0L_+Q92gP2D-hbYv0+HoTt5FNzTyUQjQ@mail.gmail.com>
Date: Sun, 4 Mar 2018 15:00:37 -0300
From: Fabio Estevam <festevam@...il.com>
To: kbuild test robot <lkp@...el.com>
Cc: Andrey Smirnov <andrew.smirnov@...il.com>,
"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
<linux-arm-kernel@...ts.infradead.org>,
Heiko Stuebner <heiko@...ech.de>,
linux-rockchip@...ts.infradead.org,
Kevin Hilman <khilman@...libre.com>,
linux-kernel <linux-kernel@...r.kernel.org>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
kbuild-all@...org, linux-amlogic@...ts.infradead.org,
Carlo Caione <carlo@...one.org>,
linux-mediatek@...ts.infradead.org,
Chris Healy <cphealy@...il.com>,
Matthias Brugger <matthias.bgg@...il.com>
Subject: Re: [kbuild-all] [PATCH] nvmem: meson-efuse: fix ptr_ret.cocci warnings
On Sun, Mar 4, 2018 at 2:56 PM, kbuild test robot <lkp@...el.com> wrote:
> From: Fengguang Wu <fengguang.wu@...el.com>
>
> drivers/nvmem/meson-efuse.c:64:1-3: WARNING: PTR_ERR_OR_ZERO can be used
>
>
> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
>
> Generated by: scripts/coccinelle/api/ptr_ret.cocci
>
> Fixes: 0d4f662ed6ff ("nvmem: meson-efuse: Do no gate COMPILE_TEST with MESON_SM")
Original code was fine.
This is more of a style preference, so I don't think it deserves a Fixes tag.
> CC: Andrey Smirnov <andrew.smirnov@...il.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
> ---
>
> meson-efuse.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> --- a/drivers/nvmem/meson-efuse.c
> +++ b/drivers/nvmem/meson-efuse.c
> @@ -61,10 +61,7 @@ static int meson_efuse_probe(struct plat
> econfig.size = size;
>
> nvmem = devm_nvmem_register(&pdev->dev, &econfig);
> - if (IS_ERR(nvmem))
> - return PTR_ERR(nvmem);
> -
> - return 0;
> + return PTR_ERR_OR_ZERO(nvmem);
> }
>
> static struct platform_driver meson_efuse_driver = {
> _______________________________________________
> kbuild-all mailing list
> kbuild-all@...ts.01.org
> https://lists.01.org/mailman/listinfo/kbuild-all
Powered by blists - more mailing lists