[PATCH] Staging: Android: Fixed coding issue return parenthesis in alarm_dev.c

2013-12-28 Thread Arthur Schwalbenberg
This is a patch to the alarm_dev.c file that fixes up a return is not
a function warning found by the checkpatch.pl tool

Signed-off-by: Arthur Schwalbenberg 
---
 drivers/staging/android/alarm-dev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/android/alarm-dev.c 
b/drivers/staging/android/alarm-dev.c
index 647694f..96b2f53 100644
--- a/drivers/staging/android/alarm-dev.c
+++ b/drivers/staging/android/alarm-dev.c
@@ -68,8 +68,8 @@ static struct devalarm alarms[ANDROID_ALARM_TYPE_COUNT];
  */
 static int is_wakeup(enum android_alarm_type type)
 {
-   return (type == ANDROID_ALARM_RTC_WAKEUP ||
-   type == ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP);
+   return type == ANDROID_ALARM_RTC_WAKEUP ||
+  type == ANDROID_ALARM_ELAPSED_REALTIME_WAKEUP;
 }
 
 
-- 
1.8.3.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: bcm: Fixed excessive line lengths cleaned up some code

2013-12-30 Thread Arthur Schwalbenberg
This is a patch to the Adapter.h file that fixes up excesssive
line length warnings found by the checkpatch.pl tool

Signed off by: Arthur Schwalbenberg 
---
 drivers/staging/bcm/Adapter.h | 228 --
 1 file changed, 133 insertions(+), 95 deletions(-)

diff --git a/drivers/staging/bcm/Adapter.h b/drivers/staging/bcm/Adapter.h
index 9cd5987..d131bc7 100644
--- a/drivers/staging/bcm/Adapter.h
+++ b/drivers/staging/bcm/Adapter.h
@@ -37,12 +37,18 @@ struct bcm_link_request {
 
 union u_ip_address {
struct {
-   ULONG ulIpv4Addr[MAX_IP_RANGE_LENGTH]; /* Source Ip Address 
Range */
-   ULONG ulIpv4Mask[MAX_IP_RANGE_LENGTH]; /* Source Ip Mask 
Address Range */
+   /* Source Ip Address Range */
+   ULONG ulIpv4Addr[MAX_IP_RANGE_LENGTH];
+
+   /* Source Ip Mask Address Range */
+   ULONG ulIpv4Mask[MAX_IP_RANGE_LENGTH];
};
struct {
-   ULONG ulIpv6Addr[MAX_IP_RANGE_LENGTH * 4]; /* Source Ip Address 
Range */
-   ULONG ulIpv6Mask[MAX_IP_RANGE_LENGTH * 4]; /* Source Ip Mask 
Address Range */
+   /* Source Ip Address Range */
+   ULONG ulIpv6Addr[MAX_IP_RANGE_LENGTH * 4];
+
+   /* Source Ip Mask Address Range */
+   ULONG ulIpv6Mask[MAX_IP_RANGE_LENGTH * 4];
};
struct {
UCHAR ucIpv4Address[MAX_IP_RANGE_LENGTH * IP_LENGTH_OF_ADDRESS];
@@ -55,41 +61,48 @@ union u_ip_address {
 };
 
 struct bcm_hdr_suppression_contextinfo {
-   UCHAR ucaHdrSuppressionInBuf[MAX_PHS_LENGTHS]; /* Intermediate buffer 
to accumulate pkt Header for PHS */
-   UCHAR ucaHdrSuppressionOutBuf[MAX_PHS_LENGTHS + PHSI_LEN]; /* 
Intermediate buffer containing pkt Header after PHS */
+   /* Intermediate buffer to accumulate pkt Header for PHS */
+   UCHAR ucaHdrSuppressionInBuf[MAX_PHS_LENGTHS];
+
+   /* Intermediate buffer containing pkt Header after PHS */
+   UCHAR ucaHdrSuppressionOutBuf[MAX_PHS_LENGTHS + PHSI_LEN];
 };
 
 struct bcm_classifier_rule {
-   ULONG   ulSFID;
-   UCHAR   ucReserved[2];
-   B_UINT16uiClassifierRuleIndex;
-   boolbUsed;
-   USHORT  usVCID_Value;
-   B_UINT8 u8ClassifierRulePriority; /* This field detemines the 
Classifier Priority */
-   union u_ip_address  stSrcIpAddress;
-   UCHAR   ucIPSourceAddressLength; /* Ip Source Address Length */
-
-   union u_ip_address  stDestIpAddress;
-   UCHAR   ucIPDestinationAddressLength; /* Ip Destination Address 
Length */
-   UCHAR   ucIPTypeOfServiceLength; /* Type of service Length */
-   UCHAR   ucTosLow; /* Tos Low */
-   UCHAR   ucTosHigh; /* Tos High */
-   UCHAR   ucTosMask; /* Tos Mask */
-
-   UCHAR   ucProtocolLength; /* protocol Length */
-   UCHAR   ucProtocol[MAX_PROTOCOL_LENGTH]; /* protocol Length */
-   USHORT  usSrcPortRangeLo[MAX_PORT_RANGE];
-   USHORT  usSrcPortRangeHi[MAX_PORT_RANGE];
-   UCHAR   ucSrcPortRangeLength;
-
-   USHORT  usDestPortRangeLo[MAX_PORT_RANGE];
-   USHORT  usDestPortRangeHi[MAX_PORT_RANGE];
-   UCHAR   ucDestPortRangeLength;
+   ULONGulSFID;
+   UCHARucReserved[2];
+   B_UINT16 uiClassifierRuleIndex;
+   bool bUsed;
+   USHORT   usVCID_Value;
 
-   boolbProtocolValid;
-   boolbTOSValid;
-   boolbDestIpValid;
-   boolbSrcIpValid;
+   /* This field detemines the Classifier Priority */
+   B_UINT8 u8ClassifierRulePriority;
+   union u_ip_address stSrcIpAddress;
+
+   UCHAR ucIPSourceAddressLength;  /* Ip Source Address Length */
+   union u_ip_address stDestIpAddress;
+
+
+   UCHAR ucIPDestinationAddressLength; /* Ip Destination Address Length */
+   UCHAR ucIPTypeOfServiceLength;  /* Type of service Length */
+   UCHAR ucTosLow; /* Tos Low */
+   UCHAR ucTosHigh;/* Tos High */
+   UCHAR ucTosMask;/* Tos Mask */
+
+   UCHAR  ucProtocolLength;/* protocol Length */
+   UCHAR  ucProtocol[MAX_PROTOCOL_LENGTH]; /* protocol Length */
+   USHORT usSrcPortRangeLo[MAX_PORT_RANGE];
+   USHORT usSrcPortRangeHi[MAX_PORT_RANGE];
+   UCHAR  ucSrcPortRangeLength;
+
+   USHORT usDestPortRangeLo[MAX_PORT_RANGE];
+   USHORT usDestPortRangeHi[MAX_PORT_RANGE];
+   UCHAR  ucDestPortRangeLength;
+
+   bool bProtocolValid;
+   bool bTOSValid;
+   bool bDestIpValid;
+   bool bSrcIpValid;
 
/* For IPv6 Addressing */
UCHAR   ucDirection;
@@ -122,42 +135,47 @@ struct bcm_fragmented_packet_info {
 
 struct bcm_packet_info {
/* classification