[PATCH v2 2/3] iio: frequency: ad9523: avoid multiple line dereferences for pdata

bhargav posted 3 patches 1 month, 1 week ago
There is a newer version of this series
[PATCH v2 2/3] iio: frequency: ad9523: avoid multiple line dereferences for pdata
Posted by bhargav 1 month, 1 week ago
Platform data pointer dereferences for pll1_charge_pump_current_nA
and pll2_charge_pump_current_nA were split across multiple lines.
Bring the dereference chains onto a single line.

This resolves the following checkpatch.pl warnings:
WARNING: Avoid multiple line dereference - prefer 'pdata->pll1_charge_pump_current_nA'
WARNING: Avoid multiple line dereference - prefer 'pdata->pll2_charge_pump_current_nA'

Signed-off-by: bhargav <rougueprince47@gmail.com>
---
 drivers/iio/frequency/ad9523.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/iio/frequency/ad9523.c b/drivers/iio/frequency/ad9523.c
index d127f3aa6cb8..4d0556ff5601 100644
--- a/drivers/iio/frequency/ad9523.c
+++ b/drivers/iio/frequency/ad9523.c
@@ -797,8 +797,7 @@ static int ad9523_setup(struct iio_dev *indio_dev)
 		return ret;
 
 	ret = ad9523_write(indio_dev, AD9523_PLL1_CHARGE_PUMP_CTRL,
-		AD9523_PLL1_CHARGE_PUMP_CURRENT_nA(pdata->
-			pll1_charge_pump_current_nA) |
+		AD9523_PLL1_CHARGE_PUMP_CURRENT_nA(pdata->pll1_charge_pump_current_nA) |
 		AD9523_PLL1_CHARGE_PUMP_MODE_NORMAL |
 		AD9523_PLL1_BACKLASH_PW_MIN);
 	if (ret < 0)
@@ -842,8 +841,7 @@ static int ad9523_setup(struct iio_dev *indio_dev)
 	 */
 
 	ret = ad9523_write(indio_dev, AD9523_PLL2_CHARGE_PUMP,
-		AD9523_PLL2_CHARGE_PUMP_CURRENT_nA(pdata->
-			pll2_charge_pump_current_nA));
+		AD9523_PLL2_CHARGE_PUMP_CURRENT_nA(pdata->pll2_charge_pump_current_nA));
 	if (ret < 0)
 		return ret;
 
-- 
2.53.0
Re: [PATCH v2 2/3] iio: frequency: ad9523: avoid multiple line dereferences for pdata
Posted by Andy Shevchenko 1 month, 1 week ago
On Fri, Feb 20, 2026 at 02:02:14AM +0530, bhargav wrote:
> Platform data pointer dereferences for pll1_charge_pump_current_nA
> and pll2_charge_pump_current_nA were split across multiple lines.
> Bring the dereference chains onto a single line.
> 
> This resolves the following checkpatch.pl warnings:
> WARNING: Avoid multiple line dereference - prefer 'pdata->pll1_charge_pump_current_nA'
> WARNING: Avoid multiple line dereference - prefer 'pdata->pll2_charge_pump_current_nA'

Despite being longer than 80 I think it's better now.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>

-- 
With Best Regards,
Andy Shevchenko