forked from Minki/linux
staging: gdm724x: add spaces around binary operators
This patch add spaces around binary operators in order to follow kernel coding style. Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b6f6fd8a87
commit
ba7f55b705
@ -729,7 +729,7 @@ static void gdm_lte_multi_sdu_pkt(struct phy_dev *phy_dev, char *buf, int len)
|
||||
pr_err("rx sdu invalid nic_type :%x\n", nic_type);
|
||||
}
|
||||
|
||||
data += ((hci_len+3) & 0xfffc) + HCI_HEADER_SIZE;
|
||||
data += ((hci_len + 3) & 0xfffc) + HCI_HEADER_SIZE;
|
||||
}
|
||||
}
|
||||
|
||||
@ -850,7 +850,7 @@ static void form_mac_address(u8 *dev_addr, u8 *nic_src, u8 *nic_dest,
|
||||
/* The last byte of the mac address
|
||||
* should be less than or equal to 0xFC
|
||||
*/
|
||||
dev_addr[ETH_ALEN-1] += index;
|
||||
dev_addr[ETH_ALEN - 1] += index;
|
||||
|
||||
/* Create random nic src and copy the first
|
||||
* 3 bytes to be the same as dev_addr
|
||||
|
@ -388,8 +388,8 @@ static int gdm_mux_send(void *priv_dev, void *data, int len, int tty_index,
|
||||
mux_header->payload_size = __cpu_to_le32((u32)len);
|
||||
mux_header->packet_type = __cpu_to_le16(packet_type[tty_index]);
|
||||
|
||||
memcpy(t->buf+MUX_HEADER_SIZE, data, len);
|
||||
memset(t->buf+MUX_HEADER_SIZE+len, 0, total_len - MUX_HEADER_SIZE -
|
||||
memcpy(t->buf + MUX_HEADER_SIZE, data, len);
|
||||
memset(t->buf + MUX_HEADER_SIZE + len, 0, total_len - MUX_HEADER_SIZE -
|
||||
len);
|
||||
|
||||
t->len = total_len;
|
||||
|
@ -193,7 +193,7 @@ static int gdm_tty_write(struct tty_struct *tty, const unsigned char *buf,
|
||||
sending_len = remain > MUX_TX_MAX_SIZE ? MUX_TX_MAX_SIZE :
|
||||
remain;
|
||||
gdm_tty_send(gdm,
|
||||
(void *)(buf+sent_len),
|
||||
(void *)(buf + sent_len),
|
||||
sending_len,
|
||||
gdm->index,
|
||||
gdm_tty_send_complete,
|
||||
|
@ -347,7 +347,7 @@ static int init_usb(struct lte_udev *udev)
|
||||
tx->avail_count++;
|
||||
}
|
||||
|
||||
for (i = 0; i < MAX_RX_SUBMIT_COUNT*2; i++) {
|
||||
for (i = 0; i < MAX_RX_SUBMIT_COUNT * 2; i++) {
|
||||
r = alloc_rx_struct();
|
||||
if (!r) {
|
||||
ret = -ENOMEM;
|
||||
@ -745,7 +745,7 @@ static int gdm_usb_sdu_send(void *priv_dev, void *data, int len,
|
||||
} else {
|
||||
send_len = len - ETH_HLEN;
|
||||
send_len += SDU_PARAM_LEN;
|
||||
memcpy(sdu->data, data+ETH_HLEN, len-ETH_HLEN);
|
||||
memcpy(sdu->data, data + ETH_HLEN, len - ETH_HLEN);
|
||||
}
|
||||
|
||||
sdu->len = gdm_cpu_to_dev16(&udev->gdm_ed, send_len);
|
||||
|
@ -34,8 +34,8 @@ static struct semaphore netlink_mutex;
|
||||
#define ND_NLMSG_SPACE(len) (NLMSG_SPACE(len) + ND_IFINDEX_LEN)
|
||||
#define ND_NLMSG_DATA(nlh) ((void *)((char *)NLMSG_DATA(nlh) + \
|
||||
ND_IFINDEX_LEN))
|
||||
#define ND_NLMSG_S_LEN(len) (len+ND_IFINDEX_LEN)
|
||||
#define ND_NLMSG_R_LEN(nlh) (nlh->nlmsg_len-ND_IFINDEX_LEN)
|
||||
#define ND_NLMSG_S_LEN(len) (len + ND_IFINDEX_LEN)
|
||||
#define ND_NLMSG_R_LEN(nlh) (nlh->nlmsg_len - ND_IFINDEX_LEN)
|
||||
#define ND_NLMSG_IFIDX(nlh) NLMSG_DATA(nlh)
|
||||
#define ND_MAX_MSG_LEN (1024 * 32)
|
||||
|
||||
@ -136,14 +136,14 @@ int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len)
|
||||
NETLINK_CB(skb).portid = 0;
|
||||
NETLINK_CB(skb).dst_group = 0;
|
||||
|
||||
ret = netlink_broadcast(sock, skb, 0, group+1, GFP_ATOMIC);
|
||||
ret = netlink_broadcast(sock, skb, 0, group + 1, GFP_ATOMIC);
|
||||
if (!ret)
|
||||
return len;
|
||||
|
||||
if (ret != -ESRCH)
|
||||
pr_err("nl broadcast g=%d, t=%d, l=%d, r=%d\n",
|
||||
group, type, len, ret);
|
||||
else if (netlink_has_listeners(sock, group+1))
|
||||
else if (netlink_has_listeners(sock, group + 1))
|
||||
return -EAGAIN;
|
||||
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user