From: Julia Lawall <julia.lawall@lip6.fr>
To: laurentiu.tudor@nxp.com
Cc: devel@driverdev.osuosl.org, arnd@arndb.de, marc.zyngier@arm.com,
roy.pledge@nxp.com, linux-kernel@vger.kernel.org, agraf@suse.de,
catalin.horghidan@nxp.com, leoyang.li@nxp.com,
bharat.bhushan@nxp.com, linux-arm-kernel@lists.infradead.org,
Laurentiu Tudor <laurentiu.tudor@nxp.com>,
gregkh@linuxfoundation.org, stuyoder@gmail.com
Subject: [PATCH] staging: fsl-mc: fix resource_size.cocci warnings
Date: Thu, 20 Jul 2017 07:49:35 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.20.1707200747220.2211@hadrien> (raw)
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@nxp.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.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;
next reply other threads:[~2017-07-20 5:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-20 5:49 Julia Lawall [this message]
2017-08-02 8:18 Cihangir Akturk
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=alpine.DEB.2.20.1707200747220.2211@hadrien \
--to=julia.lawall@lip6.fr \
--cc=agraf@suse.de \
--cc=arnd@arndb.de \
--cc=bharat.bhushan@nxp.com \
--cc=catalin.horghidan@nxp.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=laurentiu.tudor@nxp.com \
--cc=leoyang.li@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=roy.pledge@nxp.com \
--cc=stuyoder@gmail.com \
/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
all inboxes | Powered by JetHome®