[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aXHnDXHfjEnKpRmg@smile.fi.intel.com>
Date: Thu, 22 Jan 2026 10:59:57 +0200
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: abdurrahman@...thop.ai
Cc: Michal Simek <michal.simek@....com>, Andi Shyti <andi.shyti@...nel.org>,
linux-arm-kernel@...ts.infradead.org, linux-i2c@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] i2c: xiic: switch to generic device property
accessors
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
Powered by blists - more mailing lists