[PATCH] drivers: jtag: fix resource_size.cocci warnings
Oleksandr Shamray
oleksandrs at mellanox.com
Thu Aug 3 07:48:34 PDT 2017
> -----Original Message-----
> From: kbuild test robot [mailto:lkp at intel.com]
> Sent: Thursday, August 3, 2017 5:36 PM
> To: Oleksandr Shamray <oleksandrs at mellanox.com>
> Cc: kbuild-all at 01.org; gregkh at linuxfoundation.org; arnd at arndb.de; linux-
> kernel at vger.kernel.org; linux-arm-kernel at lists.infradead.org;
> devicetree at vger.kernel.org; openbmc at lists.ozlabs.org; joel at jms.id.au;
> jiri at resnulli.us; tklauser at distanz.ch; linux-serial at vger.kernel.org;
> mec at shout.net; vadimp at maellanox.com; system-sw-low-level <system-sw-
> low-level at mellanox.com>; Oleksandr Shamray <oleksandrs at mellanox.com>;
> Jiri Pirko <jiri at mellanox.com>
> Subject: [PATCH] drivers: jtag: fix resource_size.cocci warnings
>
> drivers/jtag/jtag-aspeed.c:724:37-40: ERROR: Missing resource_size with res
>
>
> Use resource_size function on resource object instead of explicit computation.
>
> Generated by: scripts/coccinelle/api/resource_size.cocci
>
> Fixes: acf0c42bb646 ("drivers: jtag: Add Aspeed SoC 24xx and 25xx families
> JTAG master driver")
> CC: Oleksandr Shamray <oleksandrs at mellanox.com>
> Signed-off-by: Fengguang Wu <fengguang.wu at intel.com>
Acked-by: Oleksandr Shamray <oleksandrs at mellanox.com>
> ---
>
> jtag-aspeed.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/drivers/jtag/jtag-aspeed.c
> +++ b/drivers/jtag/jtag-aspeed.c
> @@ -721,7 +721,7 @@ int aspeed_jtag_init(struct platform_dev
> return 0;
>
> out_region:
> - release_mem_region(res->start, res->end - res->start + 1);
> + release_mem_region(res->start, resource_size(res));
> return err;
> }
>
More information about the linux-arm-kernel
mailing list