All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/10] staging: wilc1000: fix return type of host_int_set_mac_chnl_num
@ 2015-10-02 12:44 Chaehyun Lim
  2015-10-02 12:44 ` [PATCH 02/10] staging: wilc1000: fix NULL comparison style Chaehyun Lim
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: Chaehyun Lim @ 2015-10-02 12:44 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch changes return type of host_int_set_mac_chnl_num from s32 to
int. s32Error gets return value from wilc_mq_send function that
has return type of int. It should be changed return type of
host_int_set_mac_chnl_num function by int as well as data type of
s32Error.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 2cf82b2..c635b84 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -5315,9 +5315,9 @@ s32 host_int_get_rx_power_level(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8RxPowerLevel,
  *  @date		8 March 2012
  *  @version		1.0
  */
-s32 host_int_set_mac_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 u8ChNum)
+int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 u8ChNum)
 {
-	s32 s32Error = 0;
+	int s32Error = 0;
 	tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
 	struct host_if_msg msg;
 
diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h
index fb5cb8a..8bbb59e 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -819,7 +819,7 @@ s32 host_int_get_rx_power_level(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8RxPowerLevel,
  *  @date		8 March 2012
  *  @version		1.0
  */
-s32 host_int_set_mac_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 u8ChNum);
+int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 u8ChNum);
 
 /**
  *  @brief              gets the current channel index
-- 
2.6.0


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

* [PATCH 02/10] staging: wilc1000: fix NULL comparison style
  2015-10-02 12:44 [PATCH 01/10] staging: wilc1000: fix return type of host_int_set_mac_chnl_num Chaehyun Lim
@ 2015-10-02 12:44 ` Chaehyun Lim
  2015-10-02 12:44 ` [PATCH 03/10] staging: wilc1000: rename s32Error in host_int_set_mac_chnl_num Chaehyun Lim
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Chaehyun Lim @ 2015-10-02 12:44 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch changes NULL comparison style to use ! operator found by
checkpatch.pl

CHECK: Comparison to NULL could be written "!pstrWFIDrv"
drivers/staging/wilc1000/host_interface.c:5324:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/host_interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index c635b84..65bd325 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -5321,7 +5321,7 @@ int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 u8ChNum)
 	tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
 	struct host_if_msg msg;
 
-	if (pstrWFIDrv == NULL) {
+	if (!pstrWFIDrv) {
 		PRINT_ER("driver is null\n");
 		return -EFAULT;
 	}
-- 
2.6.0


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

* [PATCH 03/10] staging: wilc1000: rename s32Error in host_int_set_mac_chnl_num
  2015-10-02 12:44 [PATCH 01/10] staging: wilc1000: fix return type of host_int_set_mac_chnl_num Chaehyun Lim
  2015-10-02 12:44 ` [PATCH 02/10] staging: wilc1000: fix NULL comparison style Chaehyun Lim
@ 2015-10-02 12:44 ` Chaehyun Lim
  2015-10-04 23:50   ` Julian Calaby
  2015-10-02 12:44 ` [PATCH 04/10] staging: wilc1000: replace PRINT_ER with pr_err Chaehyun Lim
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 15+ messages in thread
From: Chaehyun Lim @ 2015-10-02 12:44 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch replaces s32Error with result to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/host_interface.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 65bd325..566e618 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -5317,7 +5317,7 @@ s32 host_int_get_rx_power_level(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8RxPowerLevel,
  */
 int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 u8ChNum)
 {
-	int s32Error = 0;
+	int result = 0;
 	tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
 	struct host_if_msg msg;
 
@@ -5332,13 +5332,13 @@ int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 u8ChNum)
 	msg.body.channel_info.u8SetChan = u8ChNum;
 	msg.drvHandler = hWFIDrv;
 
-	s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
-	if (s32Error) {
+	result = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+	if (result) {
 		PRINT_ER("wilc mq send fail\n");
-		s32Error = -EINVAL;
+		result = -EINVAL;
 	}
 
-	return s32Error;
+	return result;
 }
 
 
-- 
2.6.0


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

* [PATCH 04/10] staging: wilc1000: replace PRINT_ER with pr_err
  2015-10-02 12:44 [PATCH 01/10] staging: wilc1000: fix return type of host_int_set_mac_chnl_num Chaehyun Lim
  2015-10-02 12:44 ` [PATCH 02/10] staging: wilc1000: fix NULL comparison style Chaehyun Lim
  2015-10-02 12:44 ` [PATCH 03/10] staging: wilc1000: rename s32Error in host_int_set_mac_chnl_num Chaehyun Lim
@ 2015-10-02 12:44 ` Chaehyun Lim
  2015-10-04  8:40   ` Greg KH
  2015-10-02 12:44 ` [PATCH 05/10] staging: wilc1000: rename u8ChNum of host_int_set_mac_chnl_num Chaehyun Lim
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 15+ messages in thread
From: Chaehyun Lim @ 2015-10-02 12:44 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch replaces PRINT_ER with pr_err.
It would be better to use netdev_err, but it cannot use it in this
function, so just use pr_err.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 566e618..802d87a 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -5322,7 +5322,7 @@ int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 u8ChNum)
 	struct host_if_msg msg;
 
 	if (!pstrWFIDrv) {
-		PRINT_ER("driver is null\n");
+		pr_err("driver is null\n");
 		return -EFAULT;
 	}
 
@@ -5334,7 +5334,7 @@ int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 u8ChNum)
 
 	result = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
 	if (result) {
-		PRINT_ER("wilc mq send fail\n");
+		pr_err("wilc mq send fail\n");
 		result = -EINVAL;
 	}
 
-- 
2.6.0


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

* [PATCH 05/10] staging: wilc1000: rename u8ChNum of host_int_set_mac_chnl_num
  2015-10-02 12:44 [PATCH 01/10] staging: wilc1000: fix return type of host_int_set_mac_chnl_num Chaehyun Lim
                   ` (2 preceding siblings ...)
  2015-10-02 12:44 ` [PATCH 04/10] staging: wilc1000: replace PRINT_ER with pr_err Chaehyun Lim
@ 2015-10-02 12:44 ` Chaehyun Lim
  2015-10-02 12:44 ` [PATCH 06/10] staging: wilc1000: rename hWFIDrv " Chaehyun Lim
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Chaehyun Lim @ 2015-10-02 12:44 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch replaces u8ChNum with channel that is second argument of
host_int_set_mac_chnl_num to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 802d87a..133bb2d 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -5315,7 +5315,7 @@ s32 host_int_get_rx_power_level(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8RxPowerLevel,
  *  @date		8 March 2012
  *  @version		1.0
  */
-int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 u8ChNum)
+int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 channel)
 {
 	int result = 0;
 	tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
@@ -5329,7 +5329,7 @@ int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 u8ChNum)
 	/* prepare the set channel message */
 	memset(&msg, 0, sizeof(struct host_if_msg));
 	msg.id = HOST_IF_MSG_SET_CHANNEL;
-	msg.body.channel_info.u8SetChan = u8ChNum;
+	msg.body.channel_info.u8SetChan = channel;
 	msg.drvHandler = hWFIDrv;
 
 	result = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h
index 8bbb59e..139dad0 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -819,7 +819,7 @@ s32 host_int_get_rx_power_level(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8RxPowerLevel,
  *  @date		8 March 2012
  *  @version		1.0
  */
-int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 u8ChNum);
+int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 channel);
 
 /**
  *  @brief              gets the current channel index
-- 
2.6.0


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

* [PATCH 06/10] staging: wilc1000: rename hWFIDrv of host_int_set_mac_chnl_num
  2015-10-02 12:44 [PATCH 01/10] staging: wilc1000: fix return type of host_int_set_mac_chnl_num Chaehyun Lim
                   ` (3 preceding siblings ...)
  2015-10-02 12:44 ` [PATCH 05/10] staging: wilc1000: rename u8ChNum of host_int_set_mac_chnl_num Chaehyun Lim
@ 2015-10-02 12:44 ` Chaehyun Lim
  2015-10-04  8:41   ` Greg KH
  2015-10-02 12:44 ` [PATCH 07/10] staging: wilc1000: fix return type of host_int_wait_msg_queue_idle Chaehyun Lim
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 15+ messages in thread
From: Chaehyun Lim @ 2015-10-02 12:44 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch replaces hWFIDrv with wfi_drv that is first argument of
host_int_set_mac_chnl_num to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 133bb2d..d23d2dd 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -5315,10 +5315,10 @@ s32 host_int_get_rx_power_level(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8RxPowerLevel,
  *  @date		8 March 2012
  *  @version		1.0
  */
-int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 channel)
+int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *wfi_drv, u8 channel)
 {
 	int result = 0;
-	tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
+	tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)wfi_drv;
 	struct host_if_msg msg;
 
 	if (!pstrWFIDrv) {
@@ -5330,7 +5330,7 @@ int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 channel)
 	memset(&msg, 0, sizeof(struct host_if_msg));
 	msg.id = HOST_IF_MSG_SET_CHANNEL;
 	msg.body.channel_info.u8SetChan = channel;
-	msg.drvHandler = hWFIDrv;
+	msg.drvHandler = wfi_drv;
 
 	result = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
 	if (result) {
diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h
index 139dad0..edcaf5a 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -819,7 +819,7 @@ s32 host_int_get_rx_power_level(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8RxPowerLevel,
  *  @date		8 March 2012
  *  @version		1.0
  */
-int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 channel);
+int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *wfi_drv, u8 channel);
 
 /**
  *  @brief              gets the current channel index
-- 
2.6.0


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

* [PATCH 07/10] staging: wilc1000: fix return type of host_int_wait_msg_queue_idle
  2015-10-02 12:44 [PATCH 01/10] staging: wilc1000: fix return type of host_int_set_mac_chnl_num Chaehyun Lim
                   ` (4 preceding siblings ...)
  2015-10-02 12:44 ` [PATCH 06/10] staging: wilc1000: rename hWFIDrv " Chaehyun Lim
@ 2015-10-02 12:44 ` Chaehyun Lim
  2015-10-02 12:44 ` [PATCH 08/10] staging: wilc1000: rename s32Error in host_int_wait_msg_queue_idle Chaehyun Lim
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Chaehyun Lim @ 2015-10-02 12:44 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch changes return type of host_int_wait_msg_queue_idle from s32
to int. s32Error gets return value from wilc_mq_send that has return
type of int. It should be changed return type of
host_int_wait_msg_queue_idle by int as well as data type of s32Error.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index d23d2dd..e5b7689 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -5342,9 +5342,9 @@ int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *wfi_drv, u8 channel)
 }
 
 
-s32 host_int_wait_msg_queue_idle(void)
+int host_int_wait_msg_queue_idle(void)
 {
-	s32 s32Error = 0;
+	int s32Error = 0;
 
 	struct host_if_msg msg;
 
diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h
index edcaf5a..bc8acde 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -648,7 +648,7 @@ s32 host_int_set_MacAddress(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8MacAddress);
  *  @date		19 march 2014
  *  @version		1.0
  */
-s32 host_int_wait_msg_queue_idle(void);
+int host_int_wait_msg_queue_idle(void);
 
 /**
  *  @brief              sets a start scan request
-- 
2.6.0


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

* [PATCH 08/10] staging: wilc1000: rename s32Error in host_int_wait_msg_queue_idle
  2015-10-02 12:44 [PATCH 01/10] staging: wilc1000: fix return type of host_int_set_mac_chnl_num Chaehyun Lim
                   ` (5 preceding siblings ...)
  2015-10-02 12:44 ` [PATCH 07/10] staging: wilc1000: fix return type of host_int_wait_msg_queue_idle Chaehyun Lim
@ 2015-10-02 12:44 ` Chaehyun Lim
  2015-10-04 23:51   ` Julian Calaby
  2015-10-02 12:44 ` [PATCH 09/10] staging: wilc1000: use pr_err " Chaehyun Lim
  2015-10-02 12:44 ` [PATCH 10/10] staging: wilc1000: remove blank lines before close brace Chaehyun Lim
  8 siblings, 1 reply; 15+ messages in thread
From: Chaehyun Lim @ 2015-10-02 12:44 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch replaces s32Error with result to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/host_interface.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index e5b7689..69a4e79 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -5344,7 +5344,7 @@ int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *wfi_drv, u8 channel)
 
 int host_int_wait_msg_queue_idle(void)
 {
-	int s32Error = 0;
+	int result = 0;
 
 	struct host_if_msg msg;
 
@@ -5352,16 +5352,16 @@ int host_int_wait_msg_queue_idle(void)
 
 	memset(&msg, 0, sizeof(struct host_if_msg));
 	msg.id = HOST_IF_MSG_Q_IDLE;
-	s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
-	if (s32Error) {
+	result = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
+	if (result) {
 		PRINT_ER("wilc mq send fail\n");
-		s32Error = -EINVAL;
+		result = -EINVAL;
 	}
 
 	/* wait untill MSG Q is empty */
 	down(&hWaitResponse);
 
-	return s32Error;
+	return result;
 
 }
 
-- 
2.6.0


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

* [PATCH 09/10] staging: wilc1000: use pr_err in host_int_wait_msg_queue_idle
  2015-10-02 12:44 [PATCH 01/10] staging: wilc1000: fix return type of host_int_set_mac_chnl_num Chaehyun Lim
                   ` (6 preceding siblings ...)
  2015-10-02 12:44 ` [PATCH 08/10] staging: wilc1000: rename s32Error in host_int_wait_msg_queue_idle Chaehyun Lim
@ 2015-10-02 12:44 ` Chaehyun Lim
  2015-10-04  8:42   ` Greg KH
  2015-10-02 12:44 ` [PATCH 10/10] staging: wilc1000: remove blank lines before close brace Chaehyun Lim
  8 siblings, 1 reply; 15+ messages in thread
From: Chaehyun Lim @ 2015-10-02 12:44 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch changes PRINT_ER by pr_err.
It would be better to use netdev_err, but it cannot use it in this
function, so just use pr_err.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/host_interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 69a4e79..79014ab 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -5354,7 +5354,7 @@ int host_int_wait_msg_queue_idle(void)
 	msg.id = HOST_IF_MSG_Q_IDLE;
 	result = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
 	if (result) {
-		PRINT_ER("wilc mq send fail\n");
+		pr_err("wilc mq send fail\n");
 		result = -EINVAL;
 	}
 
-- 
2.6.0


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

* [PATCH 10/10] staging: wilc1000: remove blank lines before close brace
  2015-10-02 12:44 [PATCH 01/10] staging: wilc1000: fix return type of host_int_set_mac_chnl_num Chaehyun Lim
                   ` (7 preceding siblings ...)
  2015-10-02 12:44 ` [PATCH 09/10] staging: wilc1000: use pr_err " Chaehyun Lim
@ 2015-10-02 12:44 ` Chaehyun Lim
  8 siblings, 0 replies; 15+ messages in thread
From: Chaehyun Lim @ 2015-10-02 12:44 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch removes blank lines before close brace '}'

CHECK: Blank lines aren't necessary before a close brace '}'
drivers/staging/wilc1000/host_interface.c:5366:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/host_interface.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 79014ab..e9b58c7 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -5362,7 +5362,6 @@ int host_int_wait_msg_queue_idle(void)
 	down(&hWaitResponse);
 
 	return result;
-
 }
 
 s32 host_int_set_wfi_drv_handler(tstrWILC_WFIDrv *u32address)
-- 
2.6.0


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

* Re: [PATCH 04/10] staging: wilc1000: replace PRINT_ER with pr_err
  2015-10-02 12:44 ` [PATCH 04/10] staging: wilc1000: replace PRINT_ER with pr_err Chaehyun Lim
@ 2015-10-04  8:40   ` Greg KH
  0 siblings, 0 replies; 15+ messages in thread
From: Greg KH @ 2015-10-04  8:40 UTC (permalink / raw)
  To: Chaehyun Lim
  Cc: rachel.kim, devel, chris.park, linux-wireless, johnny.kim,
	tony.cho, leo.kim

On Fri, Oct 02, 2015 at 09:44:50PM +0900, Chaehyun Lim wrote:
> This patch replaces PRINT_ER with pr_err.
> It would be better to use netdev_err, but it cannot use it in this
> function, so just use pr_err.
> 
> Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
> ---
>  drivers/staging/wilc1000/host_interface.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
> index 566e618..802d87a 100644
> --- a/drivers/staging/wilc1000/host_interface.c
> +++ b/drivers/staging/wilc1000/host_interface.c
> @@ -5322,7 +5322,7 @@ int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 u8ChNum)
>  	struct host_if_msg msg;
>  
>  	if (!pstrWFIDrv) {
> -		PRINT_ER("driver is null\n");
> +		pr_err("driver is null\n");
>  		return -EFAULT;
>  	}

I don't see how this check will ever trigger, do you?  If not, it should
just be removed.


>  
> @@ -5334,7 +5334,7 @@ int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 u8ChNum)
>  
>  	result = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
>  	if (result) {
> -		PRINT_ER("wilc mq send fail\n");
> +		pr_err("wilc mq send fail\n");

You should have a network device pointer somewhere here, dig around, it
should be possible to use netdev_err().

thanks,

greg k-h

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

* Re: [PATCH 06/10] staging: wilc1000: rename hWFIDrv of host_int_set_mac_chnl_num
  2015-10-02 12:44 ` [PATCH 06/10] staging: wilc1000: rename hWFIDrv " Chaehyun Lim
@ 2015-10-04  8:41   ` Greg KH
  0 siblings, 0 replies; 15+ messages in thread
From: Greg KH @ 2015-10-04  8:41 UTC (permalink / raw)
  To: Chaehyun Lim
  Cc: rachel.kim, devel, chris.park, linux-wireless, johnny.kim,
	tony.cho, leo.kim

On Fri, Oct 02, 2015 at 09:44:52PM +0900, Chaehyun Lim wrote:
> This patch replaces hWFIDrv with wfi_drv that is first argument of
> host_int_set_mac_chnl_num to avoid camelcase.
> 
> Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
> ---
>  drivers/staging/wilc1000/host_interface.c | 6 +++---
>  drivers/staging/wilc1000/host_interface.h | 2 +-
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
> index 133bb2d..d23d2dd 100644
> --- a/drivers/staging/wilc1000/host_interface.c
> +++ b/drivers/staging/wilc1000/host_interface.c
> @@ -5315,10 +5315,10 @@ s32 host_int_get_rx_power_level(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8RxPowerLevel,
>   *  @date		8 March 2012
>   *  @version		1.0
>   */
> -int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 channel)
> +int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *wfi_drv, u8 channel)
>  {
>  	int result = 0;
> -	tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
> +	tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)wfi_drv;

Not the issue here, but in the future, why is this cast needed?  Heck,
why is this local variable even needed, why not just use wifi_drv
everywhere in this function?

thanks,

greg k-h

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

* Re: [PATCH 09/10] staging: wilc1000: use pr_err in host_int_wait_msg_queue_idle
  2015-10-02 12:44 ` [PATCH 09/10] staging: wilc1000: use pr_err " Chaehyun Lim
@ 2015-10-04  8:42   ` Greg KH
  0 siblings, 0 replies; 15+ messages in thread
From: Greg KH @ 2015-10-04  8:42 UTC (permalink / raw)
  To: Chaehyun Lim
  Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel

On Fri, Oct 02, 2015 at 09:44:55PM +0900, Chaehyun Lim wrote:
> This patch changes PRINT_ER by pr_err.
> It would be better to use netdev_err, but it cannot use it in this
> function, so just use pr_err.
> 
> Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
> ---
>  drivers/staging/wilc1000/host_interface.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
> index 69a4e79..79014ab 100644
> --- a/drivers/staging/wilc1000/host_interface.c
> +++ b/drivers/staging/wilc1000/host_interface.c
> @@ -5354,7 +5354,7 @@ int host_int_wait_msg_queue_idle(void)
>  	msg.id = HOST_IF_MSG_Q_IDLE;
>  	result = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
>  	if (result) {
> -		PRINT_ER("wilc mq send fail\n");
> +		pr_err("wilc mq send fail\n");

Same as before, you should be able to get to a network device, please
use netdev_err().

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

* Re: [PATCH 03/10] staging: wilc1000: rename s32Error in host_int_set_mac_chnl_num
  2015-10-02 12:44 ` [PATCH 03/10] staging: wilc1000: rename s32Error in host_int_set_mac_chnl_num Chaehyun Lim
@ 2015-10-04 23:50   ` Julian Calaby
  0 siblings, 0 replies; 15+ messages in thread
From: Julian Calaby @ 2015-10-04 23:50 UTC (permalink / raw)
  To: Chaehyun Lim
  Cc: Greg KH, Johnny Kim, Rachel Kim, Chris Park, Tony Cho, glen.lee,
	leo.kim, linux-wireless, devel

Hi Chaehyun,

On Fri, Oct 2, 2015 at 10:44 PM, Chaehyun Lim <chaehyun.lim@gmail.com> wrote:
> This patch replaces s32Error with result to avoid camelcase.
>
> Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
> ---
>  drivers/staging/wilc1000/host_interface.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
> index 65bd325..566e618 100644
> --- a/drivers/staging/wilc1000/host_interface.c
> +++ b/drivers/staging/wilc1000/host_interface.c
> @@ -5317,7 +5317,7 @@ s32 host_int_get_rx_power_level(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8RxPowerLevel,
>   */
>  int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 u8ChNum)
>  {
> -       int s32Error = 0;
> +       int result = 0;
>         tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
>         struct host_if_msg msg;
>
> @@ -5332,13 +5332,13 @@ int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 u8ChNum)
>         msg.body.channel_info.u8SetChan = u8ChNum;
>         msg.drvHandler = hWFIDrv;
>
> -       s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
> -       if (s32Error) {
> +       result = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
> +       if (result) {
>                 PRINT_ER("wilc mq send fail\n");
> -               s32Error = -EINVAL;
> +               result = -EINVAL;

Why not just have

return -EINVAL;

here?

>         }
>
> -       return s32Error;
> +       return result;

and

return 0;

here?

Thanks,

-- 
Julian Calaby

Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/

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

* Re: [PATCH 08/10] staging: wilc1000: rename s32Error in host_int_wait_msg_queue_idle
  2015-10-02 12:44 ` [PATCH 08/10] staging: wilc1000: rename s32Error in host_int_wait_msg_queue_idle Chaehyun Lim
@ 2015-10-04 23:51   ` Julian Calaby
  0 siblings, 0 replies; 15+ messages in thread
From: Julian Calaby @ 2015-10-04 23:51 UTC (permalink / raw)
  To: Chaehyun Lim
  Cc: Greg KH, Johnny Kim, Rachel Kim, Chris Park, Tony Cho, glen.lee,
	leo.kim, linux-wireless, devel

Hi Chaehyun,

On Fri, Oct 2, 2015 at 10:44 PM, Chaehyun Lim <chaehyun.lim@gmail.com> wrote:
> This patch replaces s32Error with result to avoid camelcase.
>
> Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
> ---
>  drivers/staging/wilc1000/host_interface.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
> index e5b7689..69a4e79 100644
> --- a/drivers/staging/wilc1000/host_interface.c
> +++ b/drivers/staging/wilc1000/host_interface.c
> @@ -5344,7 +5344,7 @@ int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *wfi_drv, u8 channel)
>
>  int host_int_wait_msg_queue_idle(void)
>  {
> -       int s32Error = 0;
> +       int result = 0;
>
>         struct host_if_msg msg;
>
> @@ -5352,16 +5352,16 @@ int host_int_wait_msg_queue_idle(void)
>
>         memset(&msg, 0, sizeof(struct host_if_msg));
>         msg.id = HOST_IF_MSG_Q_IDLE;
> -       s32Error = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
> -       if (s32Error) {
> +       result = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
> +       if (result) {
>                 PRINT_ER("wilc mq send fail\n");
> -               s32Error = -EINVAL;
> +               result = -EINVAL;

Same comments here: Why not

return -EINVAL;

>         }
>
>         /* wait untill MSG Q is empty */
>         down(&hWaitResponse);
>
> -       return s32Error;
> +       return result;

and

return 0;

Thanks,

-- 
Julian Calaby

Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/

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

end of thread, other threads:[~2015-10-04 23:51 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-02 12:44 [PATCH 01/10] staging: wilc1000: fix return type of host_int_set_mac_chnl_num Chaehyun Lim
2015-10-02 12:44 ` [PATCH 02/10] staging: wilc1000: fix NULL comparison style Chaehyun Lim
2015-10-02 12:44 ` [PATCH 03/10] staging: wilc1000: rename s32Error in host_int_set_mac_chnl_num Chaehyun Lim
2015-10-04 23:50   ` Julian Calaby
2015-10-02 12:44 ` [PATCH 04/10] staging: wilc1000: replace PRINT_ER with pr_err Chaehyun Lim
2015-10-04  8:40   ` Greg KH
2015-10-02 12:44 ` [PATCH 05/10] staging: wilc1000: rename u8ChNum of host_int_set_mac_chnl_num Chaehyun Lim
2015-10-02 12:44 ` [PATCH 06/10] staging: wilc1000: rename hWFIDrv " Chaehyun Lim
2015-10-04  8:41   ` Greg KH
2015-10-02 12:44 ` [PATCH 07/10] staging: wilc1000: fix return type of host_int_wait_msg_queue_idle Chaehyun Lim
2015-10-02 12:44 ` [PATCH 08/10] staging: wilc1000: rename s32Error in host_int_wait_msg_queue_idle Chaehyun Lim
2015-10-04 23:51   ` Julian Calaby
2015-10-02 12:44 ` [PATCH 09/10] staging: wilc1000: use pr_err " Chaehyun Lim
2015-10-04  8:42   ` Greg KH
2015-10-02 12:44 ` [PATCH 10/10] staging: wilc1000: remove blank lines before close brace Chaehyun Lim

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.