First coarse run to fix coding style in locm3.

Added --terse and --mailback options to the make stylecheck target. It
also does continue even if it enounters a possible error.

We decided on two exceptions from the linux kernel coding standard:
- Empty wait while loops may end with ; on the same line.
- All blocks after while, if, for have to be in brackets even if they
  only contain one statement. Otherwise it is easy to introduce an
  error.

Checkpatch needs to be adapted to reflect those changes.
This commit is contained in:
Piotr Esden-Tempski
2013-06-12 17:44:07 -07:00
parent 48e0f3326b
commit 7df63fcae0
147 changed files with 3323 additions and 2565 deletions

View File

@@ -6,7 +6,8 @@
@version 1.0.0
@author @htmlonly &copy; @endhtmlonly 2010 Gareth McMullin <gareth@blacksphere.co.nz>
@author @htmlonly &copy; @endhtmlonly 2010
Gareth McMullin <gareth@blacksphere.co.nz>
@date 10 March 2013
@@ -87,7 +88,7 @@ struct usb_cdc_union_descriptor {
u8 bControlInterface;
u8 bSubordinateInterface0;
/* ... */
} __attribute__((packed));
} __packed;
/* Definitions for Abstract Control Model devices from:
@@ -102,7 +103,7 @@ struct usb_cdc_call_management_descriptor {
u8 bDescriptorSubtype;
u8 bmCapabilities;
u8 bDataInterface;
} __attribute__((packed));
} __packed;
/* Table 4: Abstract Control Management Functional Descriptor */
struct usb_cdc_acm_descriptor {
@@ -110,7 +111,7 @@ struct usb_cdc_acm_descriptor {
u8 bDescriptorType;
u8 bDescriptorSubtype;
u8 bmCapabilities;
} __attribute__((packed));
} __packed;
/* Table 13: Class-Specific Request Codes for PSTN subclasses */
/* ... */
@@ -125,7 +126,7 @@ struct usb_cdc_line_coding {
u8 bCharFormat;
u8 bParityType;
u8 bDataBits;
} __attribute__((packed));
} __packed;
/* Table 30: Class-Specific Notification Codes for PSTN subclasses */
/* ... */
@@ -139,7 +140,7 @@ struct usb_cdc_notification {
u16 wValue;
u16 wIndex;
u16 wLength;
} __attribute__((packed));
} __packed;
#endif

View File

@@ -6,7 +6,8 @@
@version 1.0.0
@author @htmlonly &copy; @endhtmlonly 2010 Gareth McMullin <gareth@blacksphere.co.nz>
@author @htmlonly &copy; @endhtmlonly 2010
Gareth McMullin <gareth@blacksphere.co.nz>
@date 10 March 2013
@@ -93,7 +94,7 @@ struct usb_dfu_descriptor {
u16 wDetachTimeout;
u16 wTransferSize;
u16 bcdDFUVersion;
} __attribute__((packed));
} __packed;
#endif

View File

@@ -6,7 +6,8 @@
@version 1.0.0
@author @htmlonly &copy; @endhtmlonly 2010 Gareth McMullin <gareth@blacksphere.co.nz>
@author @htmlonly &copy; @endhtmlonly 2010
Gareth McMullin <gareth@blacksphere.co.nz>
@date 10 March 2013
@@ -50,7 +51,7 @@ struct usb_hid_descriptor {
u16 bcdHID;
u8 bCountryCode;
u8 bNumDescriptors;
} __attribute__((packed));
} __packed;
#endif

View File

@@ -6,7 +6,8 @@
@version 1.0.0
@author @htmlonly &copy; @endhtmlonly 2010 Gareth McMullin <gareth@blacksphere.co.nz>
@author @htmlonly &copy; @endhtmlonly 2010
Gareth McMullin <gareth@blacksphere.co.nz>
@date 10 March 2013
@@ -58,11 +59,11 @@ extern const usbd_driver stm32f207_usb_driver;
#define otghs_usb_driver stm32f207_usb_driver
/* <usb.c> */
extern usbd_device *usbd_init(const usbd_driver *driver,
const struct usb_device_descriptor *dev,
const struct usb_config_descriptor *conf,
const char **strings, int num_strings,
u8 *control_buffer, u16 control_buffer_size);
extern usbd_device * usbd_init(const usbd_driver *driver,
const struct usb_device_descriptor *dev,
const struct usb_config_descriptor *conf,
const char **strings, int num_strings,
u8 *control_buffer, u16 control_buffer_size);
extern void usbd_register_reset_callback(usbd_device *usbd_dev,
void (*callback)(void));

View File

@@ -1,12 +1,14 @@
/** @defgroup usb_type_defines USB Standard Structure Definitions
@brief <b>Defined Constants and Types for the USB Standard Structure Definitions</b>
@brief <b>Defined Constants and Types for the USB Standard Structure
Definitions</b>
@ingroup USB_defines
@version 1.0.0
@author @htmlonly &copy; @endhtmlonly 2010 Gareth McMullin <gareth@blacksphere.co.nz>
@author @htmlonly &copy; @endhtmlonly 2010
Gareth McMullin <gareth@blacksphere.co.nz>
@date 10 March 2013
@@ -57,10 +59,10 @@ struct usb_setup_data {
u16 wValue;
u16 wIndex;
u16 wLength;
} __attribute__((packed));
} __packed;
/* Class Definition */
#define USB_CLASS_VENDOR 0xFF
#define USB_CLASS_VENDOR 0xFF
/* bmRequestType bit definitions */
#define USB_REQ_TYPE_IN 0x80
@@ -129,7 +131,7 @@ struct usb_device_descriptor {
u8 iProduct;
u8 iSerialNumber;
u8 bNumConfigurations;
} __attribute__((packed));
} __packed;
#define USB_DT_DEVICE_SIZE sizeof(struct usb_device_descriptor)
@@ -146,7 +148,7 @@ struct usb_device_qualifier_descriptor {
u8 bMaxPacketSize0;
u8 bNumConfigurations;
u8 bReserved;
} __attribute__((packed));
} __packed;
/* USB Standard Configuration Descriptor - Table 9-10 */
struct usb_config_descriptor {
@@ -165,7 +167,7 @@ struct usb_config_descriptor {
const struct usb_iface_assoc_descriptor *iface_assoc;
const struct usb_interface_descriptor *altsetting;
} *interface;
} __attribute__((packed));
} __packed;
#define USB_DT_CONFIGURATION_SIZE 9
/* USB Configuration Descriptor bmAttributes bit definitions */
@@ -192,7 +194,7 @@ struct usb_interface_descriptor {
const struct usb_endpoint_descriptor *endpoint;
const void *extra;
int extralen;
} __attribute__((packed));
} __packed;
#define USB_DT_INTERFACE_SIZE 9
/* USB Standard Endpoint Descriptor - Table 9-13 */
@@ -203,7 +205,7 @@ struct usb_endpoint_descriptor {
u8 bmAttributes;
u16 wMaxPacketSize;
u8 bInterval;
} __attribute__((packed));
} __packed;
#define USB_DT_ENDPOINT_SIZE sizeof(struct usb_endpoint_descriptor)
/* USB Endpoint Descriptor bmAttributes bit definitions */
@@ -228,7 +230,7 @@ struct usb_string_descriptor {
u8 bLength;
u8 bDescriptorType;
u16 wData[];
} __attribute__((packed));
} __packed;
/* From ECN: Interface Association Descriptors, Table 9-Z */
struct usb_iface_assoc_descriptor {
@@ -240,7 +242,7 @@ struct usb_iface_assoc_descriptor {
u8 bFunctionSubClass;
u8 bFunctionProtocol;
u8 iFunction;
} __attribute__((packed));
} __packed;
#define USB_DT_INTERFACE_ASSOCIATION_SIZE \
sizeof(struct usb_iface_assoc_descriptor)