All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/7] staging: wilc1000: removes function 'init_tcp_tracking()'
@ 2016-03-15  9:48 Leo Kim
  2016-03-15  9:48 ` [PATCH 2/7] staging: wilc1000: wilc_spi.c: removes debug print log Leo Kim
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Leo Kim @ 2016-03-15  9:48 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE

This patch removes function 'init_tcp_tracking()'.
The function is an unnecessary return.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/wilc_wlan.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index fd938fb..ca9054a 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -150,11 +150,6 @@ static u32 pending_base;
 static u32 tcp_session;
 static u32 pending_acks;
 
-static inline int init_tcp_tracking(void)
-{
-	return 0;
-}
-
 static inline int add_tcp_session(u32 src_prt, u32 dst_prt, u32 seq)
 {
 	if (tcp_session < 2 * MAX_TCP_SESSION) {
@@ -1440,7 +1435,6 @@ int wilc_wlan_init(struct net_device *dev)
 		ret = -EIO;
 		goto _fail_;
 	}
-	init_tcp_tracking();
 
 	return 1;
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/7] staging: wilc1000: wilc_spi.c: removes debug print log
  2016-03-15  9:48 [PATCH 1/7] staging: wilc1000: removes function 'init_tcp_tracking()' Leo Kim
@ 2016-03-15  9:48 ` Leo Kim
  2016-03-15  9:48 ` [PATCH 3/7] staging: wilc1000: removes duplicate vif variable setting Leo Kim
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Leo Kim @ 2016-03-15  9:48 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE

This patches removes unnecessary debug print logs.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/wilc_spi.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c
index d41b8b6..4268e2f 100644
--- a/drivers/staging/wilc1000/wilc_spi.c
+++ b/drivers/staging/wilc1000/wilc_spi.c
@@ -196,9 +196,6 @@ static int wilc_spi_tx(struct wilc *wilc, u8 *b, u32 len)
 		dev_err(&spi->dev,
 			"can't write data with the following length: %d\n",
 			len);
-		dev_err(&spi->dev,
-			"FAILED due to NULL buffer or ZERO length check the following length: %d\n",
-			len);
 		ret = -EINVAL;
 	}
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/7] staging: wilc1000: removes duplicate vif variable setting
  2016-03-15  9:48 [PATCH 1/7] staging: wilc1000: removes function 'init_tcp_tracking()' Leo Kim
  2016-03-15  9:48 ` [PATCH 2/7] staging: wilc1000: wilc_spi.c: removes debug print log Leo Kim
@ 2016-03-15  9:48 ` Leo Kim
  2016-03-15  9:48 ` [PATCH 4/7] staging: wilc1000: removes duplicate wilc " Leo Kim
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Leo Kim @ 2016-03-15  9:48 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE

This patches removes duplicate vif variable setting.
This value has already been set previously.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/linux_wlan.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index bfa754b..8a10831 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -912,7 +912,6 @@ int wilc_mac_open(struct net_device *ndev)
 		return -ENODEV;
 	}
 
-	vif = netdev_priv(ndev);
 	wilc = vif->wilc;
 	priv = wiphy_priv(vif->ndev->ieee80211_ptr->wiphy);
 	netdev_dbg(ndev, "MAC OPEN[%p]\n", ndev);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/7] staging: wilc1000: removes duplicate wilc variable setting
  2016-03-15  9:48 [PATCH 1/7] staging: wilc1000: removes function 'init_tcp_tracking()' Leo Kim
  2016-03-15  9:48 ` [PATCH 2/7] staging: wilc1000: wilc_spi.c: removes debug print log Leo Kim
  2016-03-15  9:48 ` [PATCH 3/7] staging: wilc1000: removes duplicate vif variable setting Leo Kim
@ 2016-03-15  9:48 ` Leo Kim
  2016-03-15  9:48 ` [PATCH 5/7] staging: wilc1000: changes an ambiguous debug messages Leo Kim
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Leo Kim @ 2016-03-15  9:48 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE

This patches removes duplicate wilc variable setting.
This value has already been set to wl variable previously.
Replace wilc with wl as well.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/linux_wlan.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index 8a10831..1a5de2e 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -896,7 +896,6 @@ static int mac_init_fn(struct net_device *ndev)
 int wilc_mac_open(struct net_device *ndev)
 {
 	struct wilc_vif *vif;
-	struct wilc *wilc;
 
 	unsigned char mac_add[ETH_ALEN] = {0};
 	int ret = 0;
@@ -912,7 +911,6 @@ int wilc_mac_open(struct net_device *ndev)
 		return -ENODEV;
 	}
 
-	wilc = vif->wilc;
 	priv = wiphy_priv(vif->ndev->ieee80211_ptr->wiphy);
 	netdev_dbg(ndev, "MAC OPEN[%p]\n", ndev);
 
@@ -932,13 +930,13 @@ int wilc_mac_open(struct net_device *ndev)
 				wilc_set_wfi_drv_handler(vif,
 							 wilc_get_vif_idx(vif),
 							 0);
-			} else if (!wilc_wlan_get_num_conn_ifcs(wilc)) {
+			} else if (!wilc_wlan_get_num_conn_ifcs(wl)) {
 				wilc_set_wfi_drv_handler(vif,
 							 wilc_get_vif_idx(vif),
-							 wilc->open_ifcs);
+							 wl->open_ifcs);
 			} else {
-				if (memcmp(wilc->vif[i ^ 1]->bssid,
-					   wilc->vif[i ^ 1]->src_addr, 6))
+				if (memcmp(wl->vif[i ^ 1]->bssid,
+					   wl->vif[i ^ 1]->src_addr, 6))
 					wilc_set_wfi_drv_handler(vif,
 							 wilc_get_vif_idx(vif),
 							 0);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 5/7] staging: wilc1000: changes an ambiguous debug messages
  2016-03-15  9:48 [PATCH 1/7] staging: wilc1000: removes function 'init_tcp_tracking()' Leo Kim
                   ` (2 preceding siblings ...)
  2016-03-15  9:48 ` [PATCH 4/7] staging: wilc1000: removes duplicate wilc " Leo Kim
@ 2016-03-15  9:48 ` Leo Kim
  2016-03-15  9:48 ` [PATCH 6/7] staging: wilc1000: removes goto definitions from wilc_wlan_firmware_download Leo Kim
  2016-03-15  9:48 ` [PATCH 7/7] staging: wilc1000: removes an unnecessary if-condition Leo Kim
  5 siblings, 0 replies; 7+ messages in thread
From: Leo Kim @ 2016-03-15  9:48 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE

This patches changes an ambiguous debug messages.
The device types are both SDIO or SPI.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/linux_wlan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index 1a5de2e..e949f21 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -907,7 +907,7 @@ int wilc_mac_open(struct net_device *ndev)
 	wl = vif->wilc;
 
 	if (!wl || !wl->dev) {
-		netdev_err(ndev, "wilc1000: SPI device not ready\n");
+		netdev_err(ndev, "device not ready\n");
 		return -ENODEV;
 	}
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 6/7] staging: wilc1000: removes goto definitions from wilc_wlan_firmware_download
  2016-03-15  9:48 [PATCH 1/7] staging: wilc1000: removes function 'init_tcp_tracking()' Leo Kim
                   ` (3 preceding siblings ...)
  2016-03-15  9:48 ` [PATCH 5/7] staging: wilc1000: changes an ambiguous debug messages Leo Kim
@ 2016-03-15  9:48 ` Leo Kim
  2016-03-15  9:48 ` [PATCH 7/7] staging: wilc1000: removes an unnecessary if-condition Leo Kim
  5 siblings, 0 replies; 7+ messages in thread
From: Leo Kim @ 2016-03-15  9:48 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE

This patch removes goto definitions from wilc_wlan_firmware_download function.
Goto '_fail_1' feature is error return.
It returns error type directly without result variable replacement as well.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/wilc_wlan.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index ca9054a..ea671a9 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -946,10 +946,8 @@ int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer,
 	blksz = BIT(12);
 
 	dma_buffer = kmalloc(blksz, GFP_KERNEL);
-	if (!dma_buffer) {
-		ret = -EIO;
-		goto _fail_1;
-	}
+	if (!dma_buffer)
+		return -EIO;
 
 	offset = 0;
 	do {
@@ -987,8 +985,6 @@ _fail_:
 
 	kfree(dma_buffer);
 
-_fail_1:
-
 	return (ret < 0) ? ret : 0;
 }
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 7/7] staging: wilc1000: removes an unnecessary if-condition
  2016-03-15  9:48 [PATCH 1/7] staging: wilc1000: removes function 'init_tcp_tracking()' Leo Kim
                   ` (4 preceding siblings ...)
  2016-03-15  9:48 ` [PATCH 6/7] staging: wilc1000: removes goto definitions from wilc_wlan_firmware_download Leo Kim
@ 2016-03-15  9:48 ` Leo Kim
  5 siblings, 0 replies; 7+ messages in thread
From: Leo Kim @ 2016-03-15  9:48 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE

This patch removes an unnecessary if-condition.
Regardless of an if-condition is performed unconditionally '_end_' statement.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/wilc_wlan.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index ea671a9..08937fe 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -895,8 +895,6 @@ static void wilc_wlan_handle_isr_ext(struct wilc *wilc, u32 int_status)
 					      DATA_INT_CLR | ENABLE_RX_VMM);
 		ret = wilc->hif_func->hif_block_rx_ext(wilc, 0, buffer, size);
 
-		if (!ret)
-			goto _end_;
 _end_:
 		if (ret) {
 			offset += size;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-03-15  9:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-15  9:48 [PATCH 1/7] staging: wilc1000: removes function 'init_tcp_tracking()' Leo Kim
2016-03-15  9:48 ` [PATCH 2/7] staging: wilc1000: wilc_spi.c: removes debug print log Leo Kim
2016-03-15  9:48 ` [PATCH 3/7] staging: wilc1000: removes duplicate vif variable setting Leo Kim
2016-03-15  9:48 ` [PATCH 4/7] staging: wilc1000: removes duplicate wilc " Leo Kim
2016-03-15  9:48 ` [PATCH 5/7] staging: wilc1000: changes an ambiguous debug messages Leo Kim
2016-03-15  9:48 ` [PATCH 6/7] staging: wilc1000: removes goto definitions from wilc_wlan_firmware_download Leo Kim
2016-03-15  9:48 ` [PATCH 7/7] staging: wilc1000: removes an unnecessary if-condition Leo Kim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.