Skip to contentSkip to conversation

iio: adc: xilinx: use even more devres

PATCH In review Bartosz Golaszewski 4 participants 11 messages Nov 30, 2020 – Jan 18, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v3 cover iio: adc: xilinx: use even more devres

From: Bartosz Golaszewski <[email protected]>

This is a follow-up to commit 750628c79bb1 ("iio: adc: xilinx-xadc: use devm_krealloc()"). I noticed we can use even more devres helpers and entirely drop the remove() callback.

v1 -> v2:
- squash three patches adding more devres calls into one for easier review
- don't insist on the 80 characters limit
- add a new helper: devm_krealloc_array() and use it

v2 -> v3:
- drop the devm_krealloc_array() helper

Bartosz Golaszewski (3):
iio: adc: xilinx: use helper variable for &pdev->dev
iio: adc: xilinx: use devm_krealloc() instead of kfree() + kcalloc()
iio: adc: xilinx: use more devres helpers and remove remove()

 drivers/iio/adc/xilinx-xadc-core.c | 157 ++++++++++++++---------------
 1 file changed, 74 insertions(+), 83 deletions(-)
Signature · 1 line
2.29.1
#1 lore raw

PATCH v3 1/3 iio: adc: xilinx: use helper variable for &pdev->dev

From: Bartosz Golaszewski <[email protected]>

It's more elegant to use a helper local variable to store the address of the underlying struct device than to dereference pdev everywhere.

---
 drivers/iio/adc/xilinx-xadc-core.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/iio/adc/xilinx-xadc-core.c +7 -6
index f93c34fe5873..8494eb424b33 100644
@@ -1186,6 +1186,7 @@ static int xadc_parse_dt(struct iio_dev *indio_dev, struct device_node *np,
 
 static int xadc_probe(struct platform_device *pdev)
 {
+	struct device *dev = &pdev->dev;
 	const struct of_device_id *id;
 	struct iio_dev *indio_dev;
 	unsigned int bipolar_mask;
@@ -1195,10 +1196,10 @@ static int xadc_probe(struct platform_device *pdev)
 	int irq;
 	int i;
 
-	if (!pdev->dev.of_node)
+	if (!dev->of_node)
 		return -ENODEV;
 
-	id = of_match_node(xadc_of_match_table, pdev->dev.of_node);
+	id = of_match_node(xadc_of_match_table, dev->of_node);
 	if (!id)
 		return -EINVAL;
 
@@ -1206,7 +1207,7 @@ static int xadc_probe(struct platform_device *pdev)
 	if (irq <= 0)
 		return -ENXIO;
 
-	indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(*xadc));
+	indio_dev = devm_iio_device_alloc(dev, sizeof(*xadc));
 	if (!indio_dev)
 		return -ENOMEM;
 
@@ -1226,7 +1227,7 @@ static int xadc_probe(struct platform_device *pdev)
 	indio_dev->modes = INDIO_DIRECT_MODE;
 	indio_dev->info = &xadc_info;
 
-	ret = xadc_parse_dt(indio_dev, pdev->dev.of_node, &conf0);
+	ret = xadc_parse_dt(indio_dev, dev->of_node, &conf0);
 	if (ret)
 		return ret;
 
@@ -1250,7 +1251,7 @@ static int xadc_probe(struct platform_device *pdev)
 		}
 	}
 
-	xadc->clk = devm_clk_get(&pdev->dev, NULL);
+	xadc->clk = devm_clk_get(dev, NULL);
 	if (IS_ERR(xadc->clk)) {
 		ret = PTR_ERR(xadc->clk);
 		goto err_free_samplerate_trigger;
@@ -1276,7 +1277,7 @@ static int xadc_probe(struct platform_device *pdev)
 	}
 
 	ret = request_irq(xadc->irq, xadc->ops->interrupt_handler, 0,
-			dev_name(&pdev->dev), indio_dev);
+			  dev_name(dev), indio_dev);
 	if (ret)
 		goto err_clk_disable_unprepare;
 
Signature · 1 line
2.29.1
#2 lore raw

PATCH v3 2/3 iio: adc: xilinx: use devm_krealloc() instead of kfree() + kcalloc()

In reply to Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

We now have devm_krealloc() in the kernel Use it indstead of calling kfree() and kcalloc() separately.

---
 drivers/iio/adc/xilinx-xadc-core.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)
drivers/iio/adc/xilinx-xadc-core.c +12 -5
index 8494eb424b33..6f89a97bb127 100644
@@ -19,6 +19,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/of.h>
+#include <linux/overflow.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/sysfs.h>
@@ -585,15 +586,22 @@ static int xadc_update_scan_mode(struct iio_dev *indio_dev,
 	const unsigned long *mask)
 {
 	struct xadc *xadc = iio_priv(indio_dev);
-	unsigned int n;
+	size_t new_size, n;
+	void *data;
 
 	n = bitmap_weight(mask, indio_dev->masklength);
 
-	kfree(xadc->data);
-	xadc->data = kcalloc(n, sizeof(*xadc->data), GFP_KERNEL);
-	if (!xadc->data)
+	if (check_mul_overflow(n, sizeof(*xadc->data), &new_size))
+		return -ENOMEM;
+
+	data = devm_krealloc(indio_dev->dev.parent, xadc->data,
+			     new_size, GFP_KERNEL);
+	if (!data)
 		return -ENOMEM;
 
+	memset(data, 0, new_size);
+	xadc->data = data;
+
 	return 0;
 }
 
@@ -1372,7 +1380,6 @@ static int xadc_remove(struct platform_device *pdev)
 	free_irq(xadc->irq, indio_dev);
 	cancel_delayed_work_sync(&xadc->zynq_unmask_work);
 	clk_disable_unprepare(xadc->clk);
-	kfree(xadc->data);
 
 	return 0;
 }
Signature · 1 line
2.29.1
#3 lore raw

PATCH v3 3/3 iio: adc: xilinx: use more devres helpers and remove remove()

In reply to Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

In order to simplify resource management and error paths in probe() and entirely drop the remove() callback - use devres helpers wherever possible. Define devm actions for cancelling the delayed work and disabling the clock.

---
 drivers/iio/adc/xilinx-xadc-core.c | 129 +++++++++++++----------------
 1 file changed, 56 insertions(+), 73 deletions(-)
drivers/iio/adc/xilinx-xadc-core.c +56 -73
index 6f89a97bb127..495b3422b266 100644
@@ -713,11 +713,12 @@ static const struct iio_trigger_ops xadc_trigger_ops = {
 static struct iio_trigger *xadc_alloc_trigger(struct iio_dev *indio_dev,
 	const char *name)
 {
+	struct device *dev = indio_dev->dev.parent;
 	struct iio_trigger *trig;
 	int ret;
 
-	trig = iio_trigger_alloc("%s%d-%s", indio_dev->name,
-				indio_dev->id, name);
+	trig = devm_iio_trigger_alloc(dev, "%s%d-%s", indio_dev->name,
+				      indio_dev->id, name);
 	if (trig == NULL)
 		return ERR_PTR(-ENOMEM);
 
@@ -725,15 +726,11 @@ static struct iio_trigger *xadc_alloc_trigger(struct iio_dev *indio_dev,
 	trig->ops = &xadc_trigger_ops;
 	iio_trigger_set_drvdata(trig, iio_priv(indio_dev));
 
-	ret = iio_trigger_register(trig);
+	ret = devm_iio_trigger_register(dev, trig);
 	if (ret)
-		goto error_free_trig;
+		return ERR_PTR(ret);
 
 	return trig;
-
-error_free_trig:
-	iio_trigger_free(trig);
-	return ERR_PTR(ret);
 }
 
 static int xadc_power_adc_b(struct xadc *xadc, unsigned int seq_mode)
@@ -1192,6 +1189,20 @@ static int xadc_parse_dt(struct iio_dev *indio_dev, struct device_node *np,
 	return 0;
 }
 
+static void xadc_clk_disable_unprepare(void *data)
+{
+	struct clk *clk = data;
+
+	clk_disable_unprepare(clk);
+}
+
+static void xadc_cancel_delayed_work(void *data)
+{
+	struct delayed_work *work = data;
+
+	cancel_delayed_work_sync(work);
+}
+
 static int xadc_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
@@ -1240,34 +1251,35 @@ static int xadc_probe(struct platform_device *pdev)
 		return ret;
 
 	if (xadc->ops->flags & XADC_FLAGS_BUFFERED) {
-		ret = iio_triggered_buffer_setup(indio_dev,
-			&iio_pollfunc_store_time, &xadc_trigger_handler,
-			&xadc_buffer_ops);
+		ret = devm_iio_triggered_buffer_setup(dev, indio_dev,
+						      &iio_pollfunc_store_time,
+						      &xadc_trigger_handler,
+						      &xadc_buffer_ops);
 		if (ret)
 			return ret;
 
 		xadc->convst_trigger = xadc_alloc_trigger(indio_dev, "convst");
-		if (IS_ERR(xadc->convst_trigger)) {
-			ret = PTR_ERR(xadc->convst_trigger);
-			goto err_triggered_buffer_cleanup;
-		}
+		if (IS_ERR(xadc->convst_trigger))
+			return PTR_ERR(xadc->convst_trigger);
+
 		xadc->samplerate_trigger = xadc_alloc_trigger(indio_dev,
 			"samplerate");
-		if (IS_ERR(xadc->samplerate_trigger)) {
-			ret = PTR_ERR(xadc->samplerate_trigger);
-			goto err_free_convst_trigger;
-		}
+		if (IS_ERR(xadc->samplerate_trigger))
+			return PTR_ERR(xadc->samplerate_trigger);
 	}
 
 	xadc->clk = devm_clk_get(dev, NULL);
-	if (IS_ERR(xadc->clk)) {
-		ret = PTR_ERR(xadc->clk);
-		goto err_free_samplerate_trigger;
-	}
+	if (IS_ERR(xadc->clk))
+		return PTR_ERR(xadc->clk);
 
 	ret = clk_prepare_enable(xadc->clk);
 	if (ret)
-		goto err_free_samplerate_trigger;
+		return ret;
+
+	ret = devm_add_action_or_reset(dev,
+				       xadc_clk_disable_unprepare, xadc->clk);
+	if (ret)
+		return ret;
 
 	/*
 	 * Make sure not to exceed the maximum samplerate since otherwise the
@@ -1276,22 +1288,28 @@ static int xadc_probe(struct platform_device *pdev)
 	if (xadc->ops->flags & XADC_FLAGS_BUFFERED) {
 		ret = xadc_read_samplerate(xadc);
 		if (ret < 0)
-			goto err_free_samplerate_trigger;
+			return ret;
+
 		if (ret > XADC_MAX_SAMPLERATE) {
 			ret = xadc_write_samplerate(xadc, XADC_MAX_SAMPLERATE);
 			if (ret < 0)
-				goto err_free_samplerate_trigger;
+				return ret;
 		}
 	}
 
-	ret = request_irq(xadc->irq, xadc->ops->interrupt_handler, 0,
-			  dev_name(dev), indio_dev);
+	ret = devm_request_irq(dev, xadc->irq, xadc->ops->interrupt_handler, 0,
+			       dev_name(dev), indio_dev);
+	if (ret)
+		return ret;
+
+	ret = devm_add_action_or_reset(dev, xadc_cancel_delayed_work,
+				       &xadc->zynq_unmask_work);
 	if (ret)
-		goto err_clk_disable_unprepare;
+		return ret;
 
 	ret = xadc->ops->setup(pdev, indio_dev, xadc->irq);
 	if (ret)
-		goto err_free_irq;
+		return ret;
 
 	for (i = 0; i < 16; i++)
 		xadc_read_adc_reg(xadc, XADC_REG_THRESHOLD(i),
@@ -1299,7 +1317,7 @@ static int xadc_probe(struct platform_device *pdev)
 
 	ret = xadc_write_adc_reg(xadc, XADC_REG_CONF0, conf0);
 	if (ret)
-		goto err_free_irq;
+		return ret;
 
 	bipolar_mask = 0;
 	for (i = 0; i < indio_dev->num_channels; i++) {
@@ -1309,17 +1327,18 @@ static int xadc_probe(struct platform_device *pdev)
 
 	ret = xadc_write_adc_reg(xadc, XADC_REG_INPUT_MODE(0), bipolar_mask);
 	if (ret)
-		goto err_free_irq;
+		return ret;
+
 	ret = xadc_write_adc_reg(xadc, XADC_REG_INPUT_MODE(1),
 		bipolar_mask >> 16);
 	if (ret)
-		goto err_free_irq;
+		return ret;
 
 	/* Disable all alarms */
 	ret = xadc_update_adc_reg(xadc, XADC_REG_CONF1, XADC_CONF1_ALARM_MASK,
 				  XADC_CONF1_ALARM_MASK);
 	if (ret)
-		goto err_free_irq;
+		return ret;
 
 	/* Set thresholds to min/max */
 	for (i = 0; i < 16; i++) {
@@ -1334,59 +1353,23 @@ static int xadc_probe(struct platform_device *pdev)
 		ret = xadc_write_adc_reg(xadc, XADC_REG_THRESHOLD(i),
 			xadc->threshold[i]);
 		if (ret)
-			goto err_free_irq;
+			return ret;
 	}
 
 	/* Go to non-buffered mode */
 	xadc_postdisable(indio_dev);
 
-	ret = iio_device_register(indio_dev);
+	ret = devm_iio_device_register(dev, indio_dev);
 	if (ret)
-		goto err_free_irq;
+		return ret;
 
 	platform_set_drvdata(pdev, indio_dev);
 
-	return 0;
-
-err_free_irq:
-	free_irq(xadc->irq, indio_dev);
-	cancel_delayed_work_sync(&xadc->zynq_unmask_work);
-err_clk_disable_unprepare:
-	clk_disable_unprepare(xadc->clk);
-err_free_samplerate_trigger:
-	if (xadc->ops->flags & XADC_FLAGS_BUFFERED)
-		iio_trigger_free(xadc->samplerate_trigger);
-err_free_convst_trigger:
-	if (xadc->ops->flags & XADC_FLAGS_BUFFERED)
-		iio_trigger_free(xadc->convst_trigger);
-err_triggered_buffer_cleanup:
-	if (xadc->ops->flags & XADC_FLAGS_BUFFERED)
-		iio_triggered_buffer_cleanup(indio_dev);
-
-	return ret;
-}
-
-static int xadc_remove(struct platform_device *pdev)
-{
-	struct iio_dev *indio_dev = platform_get_drvdata(pdev);
-	struct xadc *xadc = iio_priv(indio_dev);
-
-	iio_device_unregister(indio_dev);
-	if (xadc->ops->flags & XADC_FLAGS_BUFFERED) {
-		iio_trigger_free(xadc->samplerate_trigger);
-		iio_trigger_free(xadc->convst_trigger);
-		iio_triggered_buffer_cleanup(indio_dev);
-	}
-	free_irq(xadc->irq, indio_dev);
-	cancel_delayed_work_sync(&xadc->zynq_unmask_work);
-	clk_disable_unprepare(xadc->clk);
-
 	return 0;
 }
 
 static struct platform_driver xadc_driver = {
 	.probe = xadc_probe,
-	.remove = xadc_remove,
 	.driver = {
 		.name = "xadc",
 		.of_match_table = xadc_of_match_table,
Signature · 1 line
2.29.1
#4 lore raw

Re: [PATH v3 3/3] iio: adc: xilinx: use more devres helpers and remove remove()

Quoted 10 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

In order to simplify resource management and error paths in probe() and entirely drop the remove() callback - use devres helpers wherever possible. Define devm actions for cancelling the delayed work and disabling the clock.

---

[snip]

Quoted 12 lines
        /* Set thresholds to min/max */
        for (i = 0; i < 16; i++) {
drivers/iio/adc/xilinx-xadc-core.c +1 -1
@@ -1334,59 +1353,23 @@ static int xadc_probe(struct platform_device *pdev)
                ret = xadc_write_adc_reg(xadc, XADC_REG_THRESHOLD(i),
                        xadc->threshold[i]);
                if (ret)
-                       goto err_free_irq;
+                       return ret;
        }
 
        /* Go to non-buffered mode */

drivers/iio/adc/xilinx-xadc-core.c static int xadc_probe(struct platform_device *pdev) · line 1367

Quoted 10 lines
drivers/iio/adc/xilinx-xadc-core.c +2 -2
        xadc_postdisable(indio_dev);
 
-       ret = iio_device_register(indio_dev);
+       ret = devm_iio_device_register(dev, indio_dev);
        if (ret)
-               goto err_free_irq;
+               return ret;
 
        platform_set_drvdata(pdev, indio_dev);
 

Cr*p I was supposed to drop this line...

Jonathan: can you drop it when applying?

Bartosz

[snip]

#5 lore raw

Re: [PATH v3 3/3] iio: adc: xilinx: use more devres helpers and remove remove()

Quoted 34 lines · On Mon, 30 Nov 2020 15:30:22 +0100 Bartosz Golaszewski <[email protected]> wrote:
Quoted 10 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

In order to simplify resource management and error paths in probe() and entirely drop the remove() callback - use devres helpers wherever possible. Define devm actions for cancelling the delayed work and disabling the clock.

---

[snip]

Quoted 20 lines
        /* Set thresholds to min/max */
        for (i = 0; i < 16; i++) {
drivers/iio/adc/xilinx-xadc-core.c +3 -3
@@ -1334,59 +1353,23 @@ static int xadc_probe(struct platform_device *pdev)
                ret = xadc_write_adc_reg(xadc, XADC_REG_THRESHOLD(i),
                        xadc->threshold[i]);
                if (ret)
-                       goto err_free_irq;
+                       return ret;
        }
 
        /* Go to non-buffered mode */
        xadc_postdisable(indio_dev);
 
-       ret = iio_device_register(indio_dev);
+       ret = devm_iio_device_register(dev, indio_dev);
        if (ret)
-               goto err_free_irq;
+               return ret;
 
Quoted 6 lines

drivers/iio/adc/xilinx-xadc-core.c static int xadc_probe(struct platform_device *pdev) · line 1367

Quoted 2 lines
drivers/iio/adc/xilinx-xadc-core.c +0 -0
        platform_set_drvdata(pdev, indio_dev);
 

Cr*p I was supposed to drop this line...

Jonathan: can you drop it when applying?

Sure.

J

Quoted 9 lines

Bartosz

[snip]

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

maintainer
#6 lore raw
In reply to Bartosz Golaszewski
Quoted 14 lines · On Mon, 30 Nov 2020 15:27:56 +0100 Bartosz Golaszewski <[email protected]> wrote:

From: Bartosz Golaszewski <[email protected]>

This is a follow-up to commit 750628c79bb1 ("iio: adc: xilinx-xadc: use devm_krealloc()"). I noticed we can use even more devres helpers and entirely drop the remove() callback.

v1 -> v2:
- squash three patches adding more devres calls into one for easier review
- don't insist on the 80 characters limit
- add a new helper: devm_krealloc_array() and use it

v2 -> v3:
- drop the devm_krealloc_array() helper

Quoted 8 lines

Bartosz Golaszewski (3):
iio: adc: xilinx: use helper variable for &pdev->dev
iio: adc: xilinx: use devm_krealloc() instead of kfree() + kcalloc()
iio: adc: xilinx: use more devres helpers and remove remove()

 drivers/iio/adc/xilinx-xadc-core.c | 157 ++++++++++++++---------------
 1 file changed, 74 insertions(+), 83 deletions(-)

Series looks good to me but would like to leave it a little longer to let others take a look at it. That will probably mean it falls into next cycle now.

+CC Anand who is looking at another series touching this driver and might give this one a spin as well.

Thanks,

Jonathan

Reviewed-by Tested-by
#7 lore raw
Quoted 47 lines

-----Original Message-----
From: Jonathan Cameron <[email protected]>
Sent: Monday 30 November 2020 8:21 PM
To: Bartosz Golaszewski <[email protected]>
Cc: Lars-Peter Clausen <[email protected]>; Peter Meerwald-Stadler <[email protected]>; Michal Simek <[email protected]>; linux- [email protected]; [email protected]; linux- [email protected]; Bartosz Golaszewski <[email protected]>; Anand Ashok Dumbre <[email protected]>
Subject: Re: [PATH v3 0/3] iio: adc: xilinx: use even more devres

Quoted 15 lines · On Mon, 30 Nov 2020 15:27:56 +0100 Bartosz Golaszewski <[email protected]> wrote:

From: Bartosz Golaszewski <[email protected]>

This is a follow-up to commit 750628c79bb1 ("iio: adc: xilinx-xadc:
use devm_krealloc()"). I noticed we can use even more devres helpers and entirely drop the remove() callback.

v1 -> v2:
- squash three patches adding more devres calls into one for easier review
- don't insist on the 80 characters limit
- add a new helper: devm_krealloc_array() and use it

v2 -> v3:
- drop the devm_krealloc_array() helper

Quoted 9 lines

Bartosz Golaszewski (3):
iio: adc: xilinx: use helper variable for &pdev->dev
iio: adc: xilinx: use devm_krealloc() instead of kfree() + kcalloc()
iio: adc: xilinx: use more devres helpers and remove remove()

 drivers/iio/adc/xilinx-xadc-core.c | 157
++++++++++++++---------------
 1 file changed, 74 insertions(+), 83 deletions(-)

Series looks good to me but would like to leave it a little longer to let others take a look at it. That will probably mean it falls into next cycle now.

(quoted diff) +2 -0
+CC Anand who is looking at another series touching this driver and
+might

give this one a spin as well.

Quoted 3 lines

Thanks,

Jonathan

Hi Jonathan, Bartosz,

I have tested and reviewed the patch and everything looks good. I have another patch series on the same files that might cause conflicts.

Thanks,
Anand

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

maintainer
#8 lore raw
Quoted 53 lines · On Fri, 11 Dec 2020 12:15:15 +0000 Anand Ashok Dumbre <[email protected]>…
Quoted 47 lines

-----Original Message-----
From: Jonathan Cameron <[email protected]>
Sent: Monday 30 November 2020 8:21 PM
To: Bartosz Golaszewski <[email protected]>
Cc: Lars-Peter Clausen <[email protected]>; Peter Meerwald-Stadler <[email protected]>; Michal Simek <[email protected]>; linux- [email protected]; [email protected]; linux- [email protected]; Bartosz Golaszewski <[email protected]>; Anand Ashok Dumbre <[email protected]>
Subject: Re: [PATH v3 0/3] iio: adc: xilinx: use even more devres

Quoted 15 lines · On Mon, 30 Nov 2020 15:27:56 +0100 Bartosz Golaszewski <[email protected]> wrote:

From: Bartosz Golaszewski <[email protected]>

This is a follow-up to commit 750628c79bb1 ("iio: adc: xilinx-xadc:
use devm_krealloc()"). I noticed we can use even more devres helpers and entirely drop the remove() callback.

v1 -> v2:
- squash three patches adding more devres calls into one for easier review
- don't insist on the 80 characters limit
- add a new helper: devm_krealloc_array() and use it

v2 -> v3:
- drop the devm_krealloc_array() helper

Quoted 9 lines

Bartosz Golaszewski (3):
iio: adc: xilinx: use helper variable for &pdev->dev
iio: adc: xilinx: use devm_krealloc() instead of kfree() + kcalloc()
iio: adc: xilinx: use more devres helpers and remove remove()

 drivers/iio/adc/xilinx-xadc-core.c | 157
++++++++++++++---------------
 1 file changed, 74 insertions(+), 83 deletions(-)

Series looks good to me but would like to leave it a little longer to let others take a look at it. That will probably mean it falls into next cycle now.

(quoted diff) +2 -0
+CC Anand who is looking at another series touching this driver and
+might

give this one a spin as well.

Quoted 3 lines

Thanks,

Jonathan

Hi Jonathan, Bartosz,

Quoted 5 lines

I have tested and reviewed the patch and everything looks good. I have another patch series on the same files that might cause conflicts.

Thanks,

Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it.

There was a small amount of fuzz.

Thanks,

Jonathan

Quoted 3 lines

Thanks,
Anand

#9 lore raw
Quoted 64 lines · Jonathan Cameron
Quoted 53 lines · On Fri, 11 Dec 2020 12:15:15 +0000 Anand Ashok Dumbre <[email protected]>…
Quoted 47 lines

-----Original Message-----
From: Jonathan Cameron <[email protected]>
Sent: Monday 30 November 2020 8:21 PM
To: Bartosz Golaszewski <[email protected]>
Cc: Lars-Peter Clausen <[email protected]>; Peter Meerwald-Stadler <[email protected]>; Michal Simek <[email protected]>; linux- [email protected]; [email protected]; linux- [email protected]; Bartosz Golaszewski <[email protected]>; Anand Ashok Dumbre <[email protected]>
Subject: Re: [PATH v3 0/3] iio: adc: xilinx: use even more devres

Quoted 15 lines · On Mon, 30 Nov 2020 15:27:56 +0100 Bartosz Golaszewski <[email protected]> wrote:

From: Bartosz Golaszewski <[email protected]>

This is a follow-up to commit 750628c79bb1 ("iio: adc: xilinx-xadc:
use devm_krealloc()"). I noticed we can use even more devres helpers and entirely drop the remove() callback.

v1 -> v2:
- squash three patches adding more devres calls into one for easier review
- don't insist on the 80 characters limit
- add a new helper: devm_krealloc_array() and use it

v2 -> v3:
- drop the devm_krealloc_array() helper

Quoted 9 lines

Bartosz Golaszewski (3):
iio: adc: xilinx: use helper variable for &pdev->dev
iio: adc: xilinx: use devm_krealloc() instead of kfree() + kcalloc()
iio: adc: xilinx: use more devres helpers and remove remove()

 drivers/iio/adc/xilinx-xadc-core.c | 157
++++++++++++++---------------
 1 file changed, 74 insertions(+), 83 deletions(-)

Series looks good to me but would like to leave it a little longer to let others take a look at it. That will probably mean it falls into next cycle now.

(quoted diff) +2 -0
+CC Anand who is looking at another series touching this driver and
+might

give this one a spin as well.

Quoted 3 lines

Thanks,

Jonathan

Hi Jonathan, Bartosz,

Quoted 5 lines

I have tested and reviewed the patch and everything looks good. I have another patch series on the same files that might cause conflicts.

Thanks,

Quoted 9 lines

Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it.

There was a small amount of fuzz.

Thanks,

Jonathan

Hi Jonathan,

I still don't see these patches in next - is any action required of me to get this in for the next release?

Bartosz

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#10 lore raw
Quoted 72 lines · On Mon, 18 Jan 2021 10:09:56 +0100 Bartosz Golaszewski <[email protected]> wrote:
Quoted 71 lines · Jonathan Cameron
Quoted 53 lines · On Fri, 11 Dec 2020 12:15:15 +0000 Anand Ashok Dumbre <[email protected]>…
Quoted 47 lines

-----Original Message-----
From: Jonathan Cameron <[email protected]>
Sent: Monday 30 November 2020 8:21 PM
To: Bartosz Golaszewski <[email protected]>
Cc: Lars-Peter Clausen <[email protected]>; Peter Meerwald-Stadler <[email protected]>; Michal Simek <[email protected]>; linux- [email protected]; [email protected]; linux- [email protected]; Bartosz Golaszewski <[email protected]>; Anand Ashok Dumbre <[email protected]>
Subject: Re: [PATH v3 0/3] iio: adc: xilinx: use even more devres

Quoted 15 lines · On Mon, 30 Nov 2020 15:27:56 +0100 Bartosz Golaszewski <[email protected]> wrote:

From: Bartosz Golaszewski <[email protected]>

This is a follow-up to commit 750628c79bb1 ("iio: adc: xilinx-xadc:
use devm_krealloc()"). I noticed we can use even more devres helpers and entirely drop the remove() callback.

v1 -> v2:
- squash three patches adding more devres calls into one for easier review
- don't insist on the 80 characters limit
- add a new helper: devm_krealloc_array() and use it

v2 -> v3:
- drop the devm_krealloc_array() helper

Quoted 9 lines

Bartosz Golaszewski (3):
iio: adc: xilinx: use helper variable for &pdev->dev
iio: adc: xilinx: use devm_krealloc() instead of kfree() + kcalloc()
iio: adc: xilinx: use more devres helpers and remove remove()

 drivers/iio/adc/xilinx-xadc-core.c | 157
++++++++++++++---------------
 1 file changed, 74 insertions(+), 83 deletions(-)

Series looks good to me but would like to leave it a little longer to let others take a look at it. That will probably mean it falls into next cycle now.

(quoted diff) +2 -0
+CC Anand who is looking at another series touching this driver and
+might

give this one a spin as well.

Quoted 3 lines

Thanks,

Jonathan

Hi Jonathan, Bartosz,

Quoted 5 lines

I have tested and reviewed the patch and everything looks good. I have another patch series on the same files that might cause conflicts.

Thanks,

Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it.

There was a small amount of fuzz.

Thanks,

Quoted 7 lines
Quoted 2 lines

Jonathan

Hi Jonathan,

I still don't see these patches in next - is any action required of me to get this in for the next release?

Nope. I still haven't gotten round to asking for the iio tree itself to be pulled into next, and I've been a bit busy so haven't yet sent a pull request to Greg KH this cycle.

I'll get the second sorted, probably later this week.

J

Quoted 7 lines

Bartosz

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel