[PATCH v4 1/4] Staging: gdm72xx: Add space around that "+", "&" and "|"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add missing spaces around "+", "&" and "|" to follow kernel coding
style. Warning detected by checkpatch.

Signed-off-by: Shraddha Barke <shraddha.6596@xxxxxxxxx>
---
Changes -
 Nothing

 drivers/staging/gdm72xx/hci.h       |  2 +-
 drivers/staging/gdm72xx/netlink_k.c |  6 +++---
 drivers/staging/gdm72xx/sdio_boot.c |  2 +-
 drivers/staging/gdm72xx/usb_boot.c  | 10 +++++-----
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/gdm72xx/hci.h b/drivers/staging/gdm72xx/hci.h
index ab903d4..b40d5c3 100644
--- a/drivers/staging/gdm72xx/hci.h
+++ b/drivers/staging/gdm72xx/hci.h
@@ -17,7 +17,7 @@
 #define HCI_HEADER_SIZE		4
 #define HCI_VALUE_OFFS		(HCI_HEADER_SIZE)
 #define HCI_MAX_PACKET		2048
-#define HCI_MAX_PARAM		(HCI_MAX_PACKET-HCI_HEADER_SIZE)
+#define HCI_MAX_PARAM		(HCI_MAX_PACKET - HCI_HEADER_SIZE)
 #define HCI_MAX_TLV		32
 
 /* CMD-EVT */
diff --git a/drivers/staging/gdm72xx/netlink_k.c b/drivers/staging/gdm72xx/netlink_k.c
index cf0b47c..783770b 100644
--- a/drivers/staging/gdm72xx/netlink_k.c
+++ b/drivers/staging/gdm72xx/netlink_k.c
@@ -29,8 +29,8 @@
 #define ND_NLMSG_SPACE(len)		(nlmsg_total_size(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			8096
 
@@ -143,7 +143,7 @@ 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;
diff --git a/drivers/staging/gdm72xx/sdio_boot.c b/drivers/staging/gdm72xx/sdio_boot.c
index ba94b5f..5e9b38f 100644
--- a/drivers/staging/gdm72xx/sdio_boot.c
+++ b/drivers/staging/gdm72xx/sdio_boot.c
@@ -96,7 +96,7 @@ static int download_image(struct sdio_func *func, const char *img_name)
 		buf[1] = (len >> 8) & 0xff;
 		buf[2] = (len >> 16) & 0xff;
 
-		memcpy(buf+TYPE_A_HEADER_SIZE, firm->data + pos, len);
+		memcpy(buf + TYPE_A_HEADER_SIZE, firm->data + pos, len);
 		ret = sdio_memcpy_toio(func, 0, buf, len + TYPE_A_HEADER_SIZE);
 		if (ret < 0) {
 			dev_err(&func->dev,
diff --git a/drivers/staging/gdm72xx/usb_boot.c b/drivers/staging/gdm72xx/usb_boot.c
index 3082987..99a5c07 100644
--- a/drivers/staging/gdm72xx/usb_boot.c
+++ b/drivers/staging/gdm72xx/usb_boot.c
@@ -292,8 +292,8 @@ static int em_download_image(struct usb_device *usbdev, const char *img_name,
 		return -ENOMEM;
 	}
 
-	strcpy(buf+pad_size, type_string);
-	ret = gdm_wibro_send(usbdev, buf, strlen(type_string)+pad_size);
+	strcpy(buf + pad_size, type_string);
+	ret = gdm_wibro_send(usbdev, buf, strlen(type_string) + pad_size);
 	if (ret < 0)
 		goto out;
 
@@ -310,8 +310,8 @@ static int em_download_image(struct usb_device *usbdev, const char *img_name,
 		else
 			len = img_len; /* the last chunk of data */
 
-		memcpy(buf+pad_size, firm->data + pos, len);
-		ret = gdm_wibro_send(usbdev, buf, len+pad_size);
+		memcpy(buf + pad_size, firm->data + pos, len);
+		ret = gdm_wibro_send(usbdev, buf, len + pad_size);
 
 		if (ret < 0)
 			goto out;
@@ -319,7 +319,7 @@ static int em_download_image(struct usb_device *usbdev, const char *img_name,
 		img_len -= DOWNLOAD_CHUCK;
 		pos += DOWNLOAD_CHUCK;
 
-		ret = em_wait_ack(usbdev, ((len+pad_size) % 512 == 0));
+		ret = em_wait_ack(usbdev, ((len + pad_size) % 512 == 0));
 		if (ret < 0)
 			goto out;
 	}
-- 
2.1.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux