pkarashchenko commented on code in PR #6965:
URL: https://github.com/apache/incubator-nuttx/pull/6965#discussion_r989354340


##########
arch/arm/src/stm32l4/hardware/stm32l4_spi.h:
##########
@@ -119,7 +119,7 @@
 #define SPI_CR2_TXEIE             (1 << 7)  /* Bit 7: Tx buffer empty 
interrupt enable */
 #define SPI_CR2_DS_SHIFT          (8)       /* Bits 8-11:  Data size */
 #define SPI_CR2_DS_MASK           (15 << SPI_CR2_DS_SHIFT)
-#  define SPI_CR2_DS_VAL(bits)    ( ((bits)-1) << SPI_CR2_DS_SHIFT)
+#  define SPI_CR2_DS_VAL(bits)    (((bits)-1) << SPI_CR2_DS_SHIFT)

Review Comment:
   ```suggestion
   #  define SPI_CR2_DS_VAL(bits)    (((bits) - 1) << SPI_CR2_DS_SHIFT)
   ```



##########
arch/arm/src/stm32/stm32_hrtim.h:
##########
@@ -1020,9 +1020,9 @@ struct stm32_hrtim_ops_s
   uint64_t (*fclk_get)(struct hrtim_dev_s *dev, uint8_t timer);
   int      (*soft_update)(struct hrtim_dev_s *dev, uint8_t timer);
   int      (*soft_reset)(struct hrtim_dev_s *dev, uint8_t timer);
-  int      (*freq_set)(struct hrtim_dev_s  *dev, uint8_t timer,
+  int      (*freq_set)(struct hrtim_dev_s *dev, uint8_t timer,
                                  uint64_t freq);

Review Comment:
   ```suggestion
     int      (*freq_set)(struct hrtim_dev_s *dev, uint8_t timer,
                          uint64_t freq);
   ```



##########
arch/arm/src/stm32l5/hardware/stm32l5_spi.h:
##########
@@ -122,7 +122,7 @@
 #define SPI_CR2_TXEIE             (1 << 7)  /* Bit 7: Tx buffer empty 
interrupt enable */
 #define SPI_CR2_DS_SHIFT          (8)       /* Bits 8-11:  Data size */
 #define SPI_CR2_DS_MASK           (15 << SPI_CR2_DS_SHIFT)
-#  define SPI_CR2_DS_VAL(bits)    ( ((bits)-1) << SPI_CR2_DS_SHIFT)
+#  define SPI_CR2_DS_VAL(bits)    (((bits)-1) << SPI_CR2_DS_SHIFT)

Review Comment:
   ```suggestion
   #  define SPI_CR2_DS_VAL(bits)    (((bits) - 1) << SPI_CR2_DS_SHIFT)
   ```



##########
arch/arm/src/phy62xx/mcu.h:
##########
@@ -82,7 +82,7 @@
 #define subWriteReg(addr,high,low,value) write_reg(addr, ((read_reg(addr)) & 
(~((((unsigned int)1<<((high)-(low)+1))-1)<<(low)))) | ((unsigned 
int)(value)<<(low)))
 
 #define TIME_BASE               (0x003fffff) /* 24bit count shift 2 bit as 
1us/bit */
-#define TIME_DELTA(x,y)         ( (x>=y) ? x-y : TIME_BASE-y+x )
+#define TIME_DELTA(x,y)         ((x>=y) ? x-y : TIME_BASE-y+x)

Review Comment:
   ```suggestion
   #define TIME_DELTA(x,y)         (((x) >= (y)) ? (x) - (y) : TIME_BASE - (y) 
+ (x))
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to