lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1707200747220.2211@hadrien>
Date:   Thu, 20 Jul 2017 07:49:35 +0200 (CEST)
From:   Julia Lawall <julia.lawall@...6.fr>
To:     laurentiu.tudor@....com
cc:     devel@...verdev.osuosl.org, arnd@...db.de, marc.zyngier@....com,
        roy.pledge@....com, linux-kernel@...r.kernel.org, agraf@...e.de,
        catalin.horghidan@....com, leoyang.li@....com,
        bharat.bhushan@....com, linux-arm-kernel@...ts.infradead.org,
        Laurentiu Tudor <laurentiu.tudor@....com>,
        gregkh@...uxfoundation.org, stuyoder@...il.com
Subject: [PATCH] staging: fsl-mc: fix resource_size.cocci warnings

 Use resource_size function on resource object
 instead of explicit computation.

Generated by: scripts/coccinelle/api/resource_size.cocci

Fixes: a037b7ec2eb7 ("staging: fsl-mc: allow the driver compile multi-arch")
CC: Laurentiu Tudor <laurentiu.tudor@....com>
Signed-off-by: Julia Lawall <julia.lawall@...6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
---

url:
https://github.com/0day-ci/linux/commits/laurentiu-tudor-nxp-com/staging-fsl-mc-make-the-driver-compile-on-other-architectures/20170718-021715
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago


 mc-io.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/staging/fsl-mc/bus/mc-io.c
+++ b/drivers/staging/fsl-mc/bus/mc-io.c
@@ -242,8 +242,7 @@ int __must_check fsl_mc_portal_allocate(
 		goto error_cleanup_resource;

 	mc_portal_phys_addr = dpmcp_dev->regions[0].start;
-	mc_portal_size = dpmcp_dev->regions[0].end -
-			 dpmcp_dev->regions[0].start + 1;
+	mc_portal_size = resource_size(dpmcp_dev->regions);

 	if (WARN_ON(mc_portal_size != mc_bus_dev->mc_io->portal_size))
 		goto error_cleanup_resource;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ