From: Wolfram Sang <wsa@the-dreams.de>
To: Dejin Zheng <zhengdejin5@gmail.com>
Cc: michal.simek@xilinx.com, wsa+renesas@sang-engineering.com,
pierre-yves.mordret@st.com, mcoquelin.stm32@gmail.com,
alexandre.torgue@st.com, alain.volmat@st.com,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] i2c: busses: convert to devm_platform_get_and_ioremap_resource
Date: Wed, 15 Apr 2020 12:21:58 +0200 [thread overview]
Message-ID: <20200415102158.GH1141@ninjato> (raw)
In-Reply-To: <20200414134827.18674-1-zhengdejin5@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 671 bytes --]
On Tue, Apr 14, 2020 at 09:48:27PM +0800, Dejin Zheng wrote:
> use devm_platform_get_and_ioremap_resource() to simplify code, which
> contains platform_get_resource() and devm_ioremap_resource(), it also
> get the resource for use by the following code.
>
> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Applied to for-next, because it seems 'the new way' but...
> - r_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - id->membase = devm_ioremap_resource(&pdev->dev, r_mem);
> + id->membase = devm_platform_get_and_ioremap_resource(pdev, 0, &r_mem);
... guys, do you really think this one line reduction improves
readability? Oh well...
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-04-15 10:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-14 13:48 [PATCH v1] i2c: busses: convert to devm_platform_get_and_ioremap_resource Dejin Zheng
2020-04-15 10:21 ` Wolfram Sang [this message]
2020-04-15 16:07 ` Dejin Zheng
2020-04-17 20:46 ` Andy Shevchenko
2020-04-18 4:06 ` Dejin Zheng
2020-04-17 20:36 Markus Elfring
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=20200415102158.GH1141@ninjato \
--to=wsa@the-dreams.de \
--cc=alain.volmat@st.com \
--cc=alexandre.torgue@st.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcoquelin.stm32@gmail.com \
--cc=michal.simek@xilinx.com \
--cc=pierre-yves.mordret@st.com \
--cc=wsa+renesas@sang-engineering.com \
--cc=zhengdejin5@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;
as well as URLs for NNTP newsgroup(s).