Fixed following coding style issues.
- No space is necessary after a cast
- Alignment should match open parenthesis
- Braces {} should be used on all arms of this statement
Signed-off-by: Junsu Shin jsshin@gmail.comx
---
drivers/staging/gdm72xx/gdm_wimax.c | 71 ++-
1 file changed, 36 insertions(+), 35 deletions(-)
diff --git a/drivers/staging/gdm72xx/gdm_wimax.c
b/drivers/staging/gdm72xx/gdm_wimax.c
index 05ce2a2..a3ba931 100644
--- a/drivers/staging/gdm72xx/gdm_wimax.c
+++ b/drivers/staging/gdm72xx/gdm_wimax.c
@@ -135,24 +135,24 @@ static void dump_eth_packet(struct net_device *dev, const
char *title,
u16 port = 0;
protocol = (data[12]8) | data[13];
- ih = (struct iphdr *) (data+ETH_HLEN);
+ ih = (struct iphdr *)(data+ETH_HLEN);
if (protocol == ETH_P_IP) {
- uh = (struct udphdr *) ((char *)ih + sizeof(struct iphdr));
+ uh = (struct udphdr *)((char *)ih + sizeof(struct iphdr));
ip_protocol = ih-protocol;
port = ntohs(uh-dest);
} else if (protocol == ETH_P_IPV6) {
- struct ipv6hdr *i6h = (struct ipv6hdr *) data;
- uh = (struct udphdr *) ((char *)i6h + sizeof(struct ipv6hdr));
+ struct ipv6hdr *i6h = (struct ipv6hdr *)data;
+ uh = (struct udphdr *)((char *)i6h + sizeof(struct ipv6hdr));
ip_protocol = i6h-nexthdr;
port = ntohs(uh-dest);
}
netdev_dbg(dev, [%s] len=%d, %s, %s, %s\n,
- title, len,
- get_protocol_name(protocol),
- get_ip_protocol_name(ip_protocol),
- get_port_name(port));
+ title, len,
+ get_protocol_name(protocol),
+ get_ip_protocol_name(ip_protocol),
+ get_port_name(port));
if (!(data[0] == 0xff data[1] == 0xff)) {
if (protocol == ETH_P_IP)
@@ -196,7 +196,7 @@ static void gdm_wimax_event_rcv(struct net_device *dev, u16
type, void *msg,
{
struct nic *nic = netdev_priv(dev);
- u8 *buf = (u8 *) msg;
+ u8 *buf = (u8 *)msg;
u16 hci_cmd = (buf[0]8) | buf[1];
u16 hci_len = (buf[2]8) | buf[3];
netdev_dbg(dev, H=D: 0x%04x(%d)\n, hci_cmd, hci_len);
@@ -263,9 +263,9 @@ static struct evt_entry *get_event_entry(void)
{
struct evt_entry *e;
- if (list_empty(wm_event.freeq))
+ if (list_empty(wm_event.freeq)) {
e = alloc_event_entry();
- else {
+ } else {
e = list_entry(wm_event.freeq.next, struct evt_entry, list);
list_del(e-list);
}
@@ -347,7 +347,7 @@ int gdm_wimax_send_tx(struct sk_buff *skb, struct
net_device *dev)
struct nic *nic = netdev_priv(dev);
ret = gdm_wimax_send_with_cb(nic, skb-data, skb-len, tx_complete,
- nic);
+nic);
if (ret == -ENOSPC) {
netif_stop_queue(dev);
ret = 0;
@@ -368,7 +368,7 @@ static int gdm_wimax_tx(struct sk_buff *skb, struct
net_device *dev)
{
int ret = 0;
struct nic *nic = netdev_priv(dev);
- struct fsm_s *fsm = (struct fsm_s *) nic-sdk_data[SIOC_DATA_FSM].buf;
+ struct fsm_s *fsm = (struct fsm_s *)nic-sdk_data[SIOC_DATA_FSM].buf;
dump_eth_packet(dev, TX, skb-data, skb-len);
@@ -379,9 +379,9 @@ static int gdm_wimax_tx(struct sk_buff *skb, struct
net_device *dev)
}
#if !defined(LOOPBACK_TEST)
- if (!fsm)
+ if (!fsm) {
netdev_err(dev, ASSERTION ERROR: fsm is NULL!!\n);
- else if (fsm-m_status != M_CONNECTED) {
+ } else if (fsm-m_status != M_CONNECTED) {
netdev_emerg(dev, ASSERTION ERROR: Device is NOT ready.
status=%d\n,
fsm-m_status);
kfree_skb(skb);
@@ -408,7 +408,7 @@ static int gdm_wimax_set_config(struct net_device *dev,
struct ifmap *map)
static void __gdm_wimax_set_mac_addr(struct net_device *dev, char *mac_addr)
{
u16 hci_pkt_buf[32 / sizeof(u16)];
- u8 *pkt = (u8 *) hci_pkt_buf[0];
+ u8 *pkt = (u8 *)hci_pkt_buf[0];
struct nic *nic = netdev_priv(dev);
/* Since dev is registered as a ethernet device,
@@ -454,7 +454,7 @@ static struct net_device_stats *gdm_wimax_stats(struct
net_device *dev)
static int gdm_wimax_open(struct net_device *dev)
{
struct nic *nic = netdev_priv(dev);
- struct fsm_s *fsm = (struct fsm_s *) nic-sdk_data[SIOC_DATA_FSM].buf;
+ struct fsm_s *fsm = (struct fsm_s *)nic-sdk_data[SIOC_DATA_FSM].buf;
netif_start_queue(dev);
@@ -466,7 +466,7 @@ static int gdm_wimax_open(struct net_device *dev)
static int gdm_wimax_close(struct net_device *dev)
{
struct nic *nic = netdev_priv(dev);
- struct fsm_s *fsm = (struct fsm_s *)