From 90db11494e4f2b7616f003ecdca79d1cc88e26df Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 29 Apr 2017 08:35:46 -0600 Subject: [PATCH] spi.h: Eliminate a warning --- include/nuttx/spi/spi.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/nuttx/spi/spi.h b/include/nuttx/spi/spi.h index 7d59ab0214..1718e51946 100644 --- a/include/nuttx/spi/spi.h +++ b/include/nuttx/spi/spi.h @@ -458,12 +458,13 @@ enum spi_devtype_e /* This builds a SPI devid from its type and index */ -#define SPIDEV_ID(type,index) (((uint32_t)(type)&0xFFFF)<<16 | (uint32_t)(index)&0xFFFF) +#define SPIDEV_ID(type,index) ((((uint32_t)(type) & 0xffff) << 16) | \ + (uint32_t)(index) & 0xffff) /* This retrieves the fields from a SPI devid */ -#define SPIDEVID_TYPE (devid) (((uint32_t)(devid)>>16)&0xFFFF) -#define SPIDEVID_INDEX(devid) ( (uint32_t)(devid) &0xFFFF) +#define SPIDEVID_TYPE (devid) (((uint32_t)(devid) >> 16) & 0xffff) +#define SPIDEVID_INDEX(devid) ((uint32_t)(devid) & 0xffff) /* These are replacement definitions for the currently used SPI device indexes. * They are meant as a compatibility measure. it is expected that new drivers