Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: frequency: ad9523: fix implicit variable macros

The macros AD9523_CLK_DIST_DIV_PHASE_REV(x) and
AD9523_CLK_DIST_DIV_REV(x) implicitly relied on the variable named 'ret'
instead of using passed argument '(x)'. Update the macros to explicitly
use the argument '(x)' for their operations.

This also resolves the following checkpatch.pl warning: Argument '(x)'
is not used in function-like macro.

Signed-off-by: Bhargav Joshi <rougueprince47@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Bhargav Joshi and committed by
Jonathan Cameron
e830a889 aac15061

+2 -2
+2 -2
drivers/iio/frequency/ad9523.c
··· 167 167 168 168 /* AD9523_CHANNEL_CLOCK_DIST */ 169 169 #define AD9523_CLK_DIST_DIV_PHASE(x) (((x) & 0x3F) << 18) 170 - #define AD9523_CLK_DIST_DIV_PHASE_REV(x) ((ret >> 18) & 0x3F) 170 + #define AD9523_CLK_DIST_DIV_PHASE_REV(x) (((x) >> 18) & 0x3F) 171 171 #define AD9523_CLK_DIST_DIV(x) ((((x) - 1) & 0x3FF) << 8) 172 - #define AD9523_CLK_DIST_DIV_REV(x) (((ret >> 8) & 0x3FF) + 1) 172 + #define AD9523_CLK_DIST_DIV_REV(x) ((((x) >> 8) & 0x3FF) + 1) 173 173 #define AD9523_CLK_DIST_INV_DIV_OUTPUT_EN (1 << 7) 174 174 #define AD9523_CLK_DIST_IGNORE_SYNC_EN (1 << 6) 175 175 #define AD9523_CLK_DIST_PWR_DOWN_EN (1 << 5)