From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: abdurrahman@nexthop.ai
Cc: Michal Simek <michal.simek@amd.com>,
Andi Shyti <andi.shyti@kernel.org>,
linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] i2c: xiic: switch to generic device property accessors
Date: Thu, 22 Jan 2026 10:59:57 +0200 [thread overview]
Message-ID: <aXHnDXHfjEnKpRmg@smile.fi.intel.com> (raw)
In-Reply-To: <20260122-i2c-xiic-v2-1-134f5d743e8b@nexthop.ai>
On Thu, Jan 22, 2026 at 08:32:31AM +0000, Abdurrahman Hussain via B4 Relay wrote:
> Use generic device property accessors.
...
> - i2c = devm_kzalloc(&pdev->dev, sizeof(*i2c), GFP_KERNEL);
> + i2c = devm_kzalloc(dev, sizeof(*i2c), GFP_KERNEL);
> if (!i2c)
> return -ENOMEM;
This type of changes should go in a separate patch after this one.
...
> mutex_init(&i2c->lock);
Please, consider also switching this (in yet another separate patch) to
devm_mutex_init().
...
> - ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
> - xiic_process, IRQF_ONESHOT,
> - pdev->name, i2c);
> + ret = devm_request_threaded_irq(dev, irq, NULL, xiic_process,
> + IRQF_ONESHOT, pdev->name, i2c);
>
> if (ret < 0) {
> - dev_err_probe(&pdev->dev, ret, "Cannot claim IRQ\n");
> + dev_err_probe(dev, ret, "Cannot claim IRQ\n");
> goto err_pm_disable;
Before doing it, just kill the message, it is a dup since devm_request_*irq*()
already prints the similar one on the error cases.
> }
...
So, this patch should be transformed to three
- removing a dup message
- converting to device propries
- utilising the temporary 'dev' variable elsewhere
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-01-22 9:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-22 8:32 [PATCH v2 0/2] i2c: xiic: use generic device property accessors Abdurrahman Hussain via B4 Relay
2026-01-22 8:32 ` [PATCH v2 1/2] i2c: xiic: switch to " Abdurrahman Hussain via B4 Relay
2026-01-22 8:59 ` Andy Shevchenko [this message]
2026-01-22 9:03 ` Andy Shevchenko
2026-01-22 8:32 ` [PATCH v2 2/2] i2c: xiic: make the clock optional Abdurrahman Hussain via B4 Relay
2026-01-22 9:01 ` Andy Shevchenko
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=aXHnDXHfjEnKpRmg@smile.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=abdurrahman@nexthop.ai \
--cc=andi.shyti@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@amd.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