]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
iio: adc: ad7780: Add parentheses to macros
authorVladimir Petrigo <vladimir.petrigo@gmail.com>
Thu, 21 Mar 2019 21:15:28 +0000 (00:15 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 4 Apr 2019 19:20:30 +0000 (20:20 +0100)
- Fix CHECK Macro argument 'wordsize' may be better as '(wordsize)' to avoid precedence issues

Slightly modified by Jonathan to take into account the staging graduation
and a copy and paste version of the same item on the following line.

Signed-off-by: Vladimir Petrigo <vladimir.petrigo@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7780.c

index 74c85bd566e582a211936c70a691e8b782855855..217a5a5c3c6d9fd5b175d5c7fd812ea472ad8fae 100644 (file)
@@ -206,9 +206,9 @@ static const struct ad_sigma_delta_info ad7780_sigma_delta_info = {
 };
 
 #define AD7780_CHANNEL(bits, wordsize) \
-       AD_SD_CHANNEL(1, 0, 0, bits, 32, wordsize - bits)
+       AD_SD_CHANNEL(1, 0, 0, bits, 32, (wordsize) - (bits))
 #define AD7170_CHANNEL(bits, wordsize) \
-       AD_SD_CHANNEL_NO_SAMP_FREQ(1, 0, 0, bits, 32, wordsize - bits)
+       AD_SD_CHANNEL_NO_SAMP_FREQ(1, 0, 0, bits, 32, (wordsize) - (bits))
 
 static const struct ad7780_chip_info ad7780_chip_info_tbl[] = {
        [ID_AD7170] = {