From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Yu-Chun Lin <eleanor.lin@realtek.com>
Cc: linusw@kernel.org, brgl@kernel.org, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org, tychang@realtek.com,
cy.huang@realtek.com, stanley_chang@realtek.com,
james.tai@realtek.com
Subject: Re: [PATCH] gpio: rtd1625: minor cleanups and log improvements
Date: Wed, 12 Aug 2026 10:22:10 +0300 [thread overview]
Message-ID: <anwfIsUcasA-juzv@ashevche-desk.local> (raw)
In-Reply-To: <20260812031929.3598364-1-eleanor.lin@realtek.com>
On Wed, Aug 12, 2026 at 11:19:29AM +0800, Yu-Chun Lin wrote:
> Add minor cleanups based on Andy's feedback:
> - Store 'dev' in driver data to use dev_err_ratelimited().
> - Drop redundant 'ret' initialization and the line break.
> - Narrow the scope of local variables 'i' and 'hwirq'.
> - Use IRQ_TYPE_DEFAULT.
...
> struct rtd1625_gpio {
> + struct device *dev;
Can't this be derived from below regmap?
> struct gpio_regmap *gpio_reg;
Either this...
> const struct rtd1625_gpio_info *info;
> struct regmap *regmap;
...or this?
...
> {
> /* Each GPIO has its own dedicated 32-bit register */
It's obvious that the comment is placed wrongly...
> struct rtd1625_gpio *data = gpio_regmap_get_drvdata(gpio);
> - int val = 0, ret = 0;
> + int val = 0, ret;
..and while at it you can make it reversed xmas tree order.
> *reg = base + offset * 4;
Putting all together, this should be
struct rtd1625_gpio *data = gpio_regmap_get_drvdata(gpio);
/* Each GPIO has its own dedicated 32-bit register */
*reg = base + offset * 4;
int val = 0, ret;
...
> for_each_set_bit(j, &status, 32) {
> - hwirq = i + j;
> + irq_hw_number_t hwirq = i + j;
Now it needs a blank line here.
> irq_type = irq_get_trigger_type(irq_find_mapping(domain, hwirq));
...
Please, split this patch to a few based on the nature of changes (something
like 4 patches in a series).
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2026-08-12 7:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 3:19 Yu-Chun Lin
2026-08-12 7:22 ` Andy Shevchenko [this message]
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=anwfIsUcasA-juzv@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=brgl@kernel.org \
--cc=cy.huang@realtek.com \
--cc=eleanor.lin@realtek.com \
--cc=james.tai@realtek.com \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stanley_chang@realtek.com \
--cc=tychang@realtek.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®