Thread (39 messages) 39 messages, 7 authors, 2025-03-18

Re: [PATCH v4 06/10] regmap: irq: Add support for chips without separate IRQ status

From: Andy Shevchenko <hidden>
Date: 2025-02-14 16:02:55
Also in: linux-devicetree, linux-gpio, linux-pwm, lkml

On Fri, Feb 14, 2025 at 04:49:57PM +0100, Mathieu Dubois-Briand wrote:
On Fri Feb 14, 2025 at 4:18 PM CET, Andy Shevchenko wrote:
quoted
On Fri, Feb 14, 2025 at 12:49:56PM +0100, Mathieu Dubois-Briand wrote:
...
quoted
quoted
+static irqreturn_t regmap_irq_thread(int irq, void *d)
+{
+	struct regmap_irq_chip_data *data = d;
+	const struct regmap_irq_chip *chip = data->chip;
+	struct regmap *map = data->map;
+	int ret, i;
	unsigned int i;
?
I agree, but signed int index variables are used in all functions of
this file. What would be the best approach here? Only fix it on code
parts I modified? On the whole file?
I would change in the code you touched,
quoted
quoted
+	bool handled = false;
+	u32 reg;
+
+	if (chip->handle_pre_irq)
+		chip->handle_pre_irq(chip->irq_drv_data);
+
+	if (chip->runtime_pm) {
+		ret = pm_runtime_get_sync(map->dev);
+		if (ret < 0) {
quoted
+			dev_err(map->dev, "IRQ thread failed to resume: %d\n",
+				ret);
Can be one line.
Yes. Kind of the same question here: should I fix only the code close to
the parts I modified or the whole file?
Same, it falls under the "common sense" category.

-- 
With Best Regards,
Andy Shevchenko

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help