Re: [PATCH 2/4] staging: vchiq_core: Add parentheses to VCHIQ_MSG_SRCPORT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Stefan

On 20/04/24 5:23 pm, Stefan Wahren wrote:
checkpatch.pl complains

ERROR: Macros with complex values should be enclosed in parentheses
+#define VCHIQ_MSG_SRCPORT(msgid) \
+	(unsigned short)(((unsigned int)(msgid) >> 12) & 0xfff)

Signed-off-by: Stefan Wahren <wahrenst@xxxxxxx>

Reviewed-by: Umang Jain <umang.jain@xxxxxxxxxxxxxxxx>

---
  drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
index 129d73fec2bf..58451ee08abc 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
@@ -43,7 +43,7 @@
  	(((type) << TYPE_SHIFT) | ((srcport) << 12) | ((dstport) << 0))
  #define VCHIQ_MSG_TYPE(msgid)          ((unsigned int)(msgid) >> TYPE_SHIFT)
  #define VCHIQ_MSG_SRCPORT(msgid) \
-	(unsigned short)(((unsigned int)(msgid) >> 12) & 0xfff)
+	((unsigned short)(((unsigned int)(msgid) >> 12) & 0xfff))
  #define VCHIQ_MSG_DSTPORT(msgid) \
  	((unsigned short)(msgid) & 0xfff)

--
2.34.1






[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux