summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSanjay Chitroda <sanjayembeddedse@gmail.com>2026-04-15 10:37:44 +0530
committerJonathan Cameron <jic23@kernel.org>2026-04-27 09:58:20 +0100
commita9ecd9a121752f2d7bb69da264bda65b6b6e6c6e (patch)
treed8c8fcce6eb6eafdad63fe82828856c4e01b3851 /drivers
parentdcc80f2fdff721ced4ea1ef7a3ea43f3fbe0b27a (diff)
downloadlinux-a9ecd9a121752f2d7bb69da264bda65b6b6e6c6e.tar.gz
linux-a9ecd9a121752f2d7bb69da264bda65b6b6e6c6e.zip
iio: ssp_sensors: cleanup codestyle check
Reported by checkpatch: FILE: drivers/iio/common/ssp_sensors/ssp_spi.c CHECK: Macro argument '...' may be better as '(...)' to avoid precedence issues Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iio/common/ssp_sensors/ssp_spi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iio/common/ssp_sensors/ssp_spi.c b/drivers/iio/common/ssp_sensors/ssp_spi.c
index 8c1e15d61db7..08ed92859be0 100644
--- a/drivers/iio/common/ssp_sensors/ssp_spi.c
+++ b/drivers/iio/common/ssp_sensors/ssp_spi.c
@@ -6,7 +6,7 @@
#include "ssp.h"
#define SSP_DEV (&data->spi->dev)
-#define SSP_GET_MESSAGE_TYPE(data) (data & (3 << SSP_RW))
+#define SSP_GET_MESSAGE_TYPE(data) ((data) & (3 << SSP_RW))
/*
* SSP -> AP Instruction
@@ -119,9 +119,9 @@ static inline void ssp_get_buffer(struct ssp_msg *m, unsigned int offset,
}
#define SSP_GET_BUFFER_AT_INDEX(m, index) \
- (m->buffer[SSP_HEADER_SIZE_ALIGNED + index])
+ ((m)->buffer[SSP_HEADER_SIZE_ALIGNED + (index)])
#define SSP_SET_BUFFER_AT_INDEX(m, index, val) \
- (m->buffer[SSP_HEADER_SIZE_ALIGNED + index] = val)
+ ((m)->buffer[SSP_HEADER_SIZE_ALIGNED + (index)] = val)
static void ssp_clean_msg(struct ssp_msg *m)
{