code-guideline: Fixing code violation 10.4 Rule

Both operands of an operator in the arithmetic conversions
performed shall have the same essential type category.

Changes are related to converting the integer constants to the
unsigned integer constants

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
This commit is contained in:
Aastha Grover 2020-08-20 16:47:11 -07:00 committed by Anas Nashif
commit 83b9f69755
35 changed files with 112 additions and 112 deletions

View file

@ -59,23 +59,23 @@
#define USB_INTERFACE_ASSOC_DESC_SIZE 8
/* Descriptor type */
#define USB_DEVICE_DESC 0x01
#define USB_CONFIGURATION_DESC 0x02
#define USB_STRING_DESC 0x03
#define USB_INTERFACE_DESC 0x04
#define USB_ENDPOINT_DESC 0x05
#define USB_DEVICE_QUAL_DESC 0x06
#define USB_OTHER_SPEED 0x07
#define USB_INTERFACE_POWER 0x08
#define USB_INTERFACE_ASSOC_DESC 0x0B
#define USB_DEVICE_CAPABILITY_DESC 0x10
#define USB_HID_DESC 0x21
#define USB_HID_REPORT_DESC 0x22
#define USB_CS_INTERFACE_DESC 0x24
#define USB_CS_ENDPOINT_DESC 0x25
#define USB_DFU_FUNCTIONAL_DESC 0x21
#define USB_ASSOCIATION_DESC 0x0B
#define USB_BINARY_OBJECT_STORE_DESC 0x0F
#define USB_DEVICE_DESC 0x01U
#define USB_CONFIGURATION_DESC 0x02U
#define USB_STRING_DESC 0x03U
#define USB_INTERFACE_DESC 0x04U
#define USB_ENDPOINT_DESC 0x05U
#define USB_DEVICE_QUAL_DESC 0x06U
#define USB_OTHER_SPEED 0x07U
#define USB_INTERFACE_POWER 0x08U
#define USB_INTERFACE_ASSOC_DESC 0x0BU
#define USB_DEVICE_CAPABILITY_DESC 0x10U
#define USB_HID_DESC 0x21U
#define USB_HID_REPORT_DESC 0x22U
#define USB_CS_INTERFACE_DESC 0x24U
#define USB_CS_ENDPOINT_DESC 0x25U
#define USB_DFU_FUNCTIONAL_DESC 0x21U
#define USB_ASSOCIATION_DESC 0x0BU
#define USB_BINARY_OBJECT_STORE_DESC 0x0FU
/* Useful define */
#define USB_1_1 0x0110

View file

@ -37,7 +37,7 @@
#define ZEPHYR_INCLUDE_USB_USBSTRUCT_H_
#define REQTYPE_GET_DIR(x) (((x)>>7)&0x01)
#define REQTYPE_GET_TYPE(x) (((x)>>5)&0x03)
#define REQTYPE_GET_TYPE(x) (((x)>>5)&0x03U)
#define REQTYPE_GET_RECIP(x) ((x)&0x1F)
#define REQTYPE_DIR_TO_DEVICE 0
@ -84,7 +84,7 @@ struct usb_desc_header {
uint8_t bDescriptorType; /**< descriptor type */
};
#define GET_DESC_TYPE(x) (((x)>>8)&0xFF)
#define GET_DESC_INDEX(x) ((x)&0xFF)
#define GET_DESC_TYPE(x) (((x)>>8)&0xFFU)
#define GET_DESC_INDEX(x) ((x)&0xFFU)
#endif /* ZEPHYR_INCLUDE_USB_USBSTRUCT_H_ */