* [PATCH 1/3] staging: wilc1000: change handle_set_ip_address's return type to void
@ 2016-04-19 0:35 Chaehyun Lim
2016-04-19 0:35 ` [PATCH 2/3] staging: wilc1000: change data type of result in handle_set_ip_address Chaehyun Lim
2016-04-19 0:35 ` [PATCH 3/3] staging: wilc1000: rename " Chaehyun Lim
0 siblings, 2 replies; 3+ messages in thread
From: Chaehyun Lim @ 2016-04-19 0:35 UTC (permalink / raw)
To: gregkh
Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
linux-wireless, devel, Chaehyun Lim
When handle_set_ip_address is called in hostIFthread that is a kernel
thread, it is not checked return type of this function. This patch
changes return type to void and removes braces if statement due to have
a single statement.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
drivers/staging/wilc1000/host_interface.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index ac620fb..87c8789 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -349,7 +349,7 @@ static void handle_set_operation_mode(struct wilc_vif *vif,
netdev_err(vif->ndev, "Failed to set driver handler\n");
}
-static s32 handle_set_ip_address(struct wilc_vif *vif, u8 *ip_addr, u8 idx)
+static void handle_set_ip_address(struct wilc_vif *vif, u8 *ip_addr, u8 idx)
{
s32 result = 0;
struct wid wid;
@@ -370,12 +370,8 @@ static s32 handle_set_ip_address(struct wilc_vif *vif, u8 *ip_addr, u8 idx)
host_int_get_ipaddress(vif, firmware_ip_addr, idx);
- if (result) {
+ if (result)
netdev_err(vif->ndev, "Failed to set IP address\n");
- return -EINVAL;
- }
-
- return result;
}
static s32 handle_get_ip_address(struct wilc_vif *vif, u8 idx)
--
2.8.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/3] staging: wilc1000: change data type of result in handle_set_ip_address
2016-04-19 0:35 [PATCH 1/3] staging: wilc1000: change handle_set_ip_address's return type to void Chaehyun Lim
@ 2016-04-19 0:35 ` Chaehyun Lim
2016-04-19 0:35 ` [PATCH 3/3] staging: wilc1000: rename " Chaehyun Lim
1 sibling, 0 replies; 3+ messages in thread
From: Chaehyun Lim @ 2016-04-19 0:35 UTC (permalink / raw)
To: gregkh
Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
linux-wireless, devel, Chaehyun Lim
This patch changes data type of result variable from s32 to int. result
is used to get return value from wilc_send_config_pkt that has return
type of int.
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 87c8789..9ddb238 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -351,7 +351,7 @@ static void handle_set_operation_mode(struct wilc_vif *vif,
static void handle_set_ip_address(struct wilc_vif *vif, u8 *ip_addr, u8 idx)
{
- s32 result = 0;
+ int result = 0;
struct wid wid;
char firmware_ip_addr[4] = {0};
--
2.8.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 3/3] staging: wilc1000: rename result in handle_set_ip_address
2016-04-19 0:35 [PATCH 1/3] staging: wilc1000: change handle_set_ip_address's return type to void Chaehyun Lim
2016-04-19 0:35 ` [PATCH 2/3] staging: wilc1000: change data type of result in handle_set_ip_address Chaehyun Lim
@ 2016-04-19 0:35 ` Chaehyun Lim
1 sibling, 0 replies; 3+ messages in thread
From: Chaehyun Lim @ 2016-04-19 0:35 UTC (permalink / raw)
To: gregkh
Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
linux-wireless, devel, Chaehyun Lim
This patch renames result to ret that is used to get return value from
wilc_send_config_pkt. Some handle_*() functions are used as result,
others are used as ret. It will be changed as ret in all handle_*()
functions to match variable name.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
drivers/staging/wilc1000/host_interface.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 9ddb238..5d352aa 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -351,7 +351,7 @@ static void handle_set_operation_mode(struct wilc_vif *vif,
static void handle_set_ip_address(struct wilc_vif *vif, u8 *ip_addr, u8 idx)
{
- int result = 0;
+ int ret = 0;
struct wid wid;
char firmware_ip_addr[4] = {0};
@@ -365,12 +365,12 @@ static void handle_set_ip_address(struct wilc_vif *vif, u8 *ip_addr, u8 idx)
wid.val = (u8 *)ip_addr;
wid.size = IP_ALEN;
- result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
- wilc_get_vif_idx(vif));
+ ret = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
+ wilc_get_vif_idx(vif));
host_int_get_ipaddress(vif, firmware_ip_addr, idx);
- if (result)
+ if (ret)
netdev_err(vif->ndev, "Failed to set IP address\n");
}
--
2.8.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-19 0:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-19 0:35 [PATCH 1/3] staging: wilc1000: change handle_set_ip_address's return type to void Chaehyun Lim
2016-04-19 0:35 ` [PATCH 2/3] staging: wilc1000: change data type of result in handle_set_ip_address Chaehyun Lim
2016-04-19 0:35 ` [PATCH 3/3] staging: wilc1000: rename " 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.