* [PATCH 0/2] staging: wilc1000: Modify return statement
@ 2019-03-30 17:01 Sanjana Sanikommu
2019-03-30 17:02 ` [PATCH v3 1/2] staging: wilc1000: wilc_spi.c: " Sanjana Sanikommu
` (5 more replies)
0 siblings, 6 replies; 16+ messages in thread
From: Sanjana Sanikommu @ 2019-03-30 17:01 UTC (permalink / raw)
To: gregkh; +Cc: outreachy-kernel
This patchset does the following things.
1.Modify return statement in wilc_spi.c
2.Modify return statement in host_interface.c
Changes in v3:
Make a patch series.
Changes in v2:
Adjust spaces for last argument in return statement host_interface.c.
Adjust space for last argument in return statement in wilc_spi.c.
Sanjana Sanikommu (2):
staging: wilc1000: wilc_spi.c: Modify return statement.
staging: wilc1000: host_interface.c: Modify return statement.
drivers/staging/wilc1000/host_interface.c | 31 +++++++----------------
drivers/staging/wilc1000/wilc_spi.c | 10 +++-----
2 files changed, 13 insertions(+), 28 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v3 1/2] staging: wilc1000: wilc_spi.c: Modify return statement.
2019-03-30 17:01 [PATCH 0/2] staging: wilc1000: Modify return statement Sanjana Sanikommu
@ 2019-03-30 17:02 ` Sanjana Sanikommu
2019-03-30 17:04 ` [PATCH v3 2/2] staging: wilc1000: host_interface.c: " Sanjana Sanikommu
` (4 subsequent siblings)
5 siblings, 0 replies; 16+ messages in thread
From: Sanjana Sanikommu @ 2019-03-30 17:02 UTC (permalink / raw)
To: gregkh; +Cc: outreachy-kernel
Challenge suggested by coccinelle.
Remove return variable and directly return the value
Issue found using ret.cocci
Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
---
Changes in v3:
Make a patch series.
Changes in v2:
Adjust space for last argument in return statement.
drivers/staging/wilc1000/wilc_spi.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c
index 4a1be9e60d74..47c777c5d1a7 100644
--- a/drivers/staging/wilc1000/wilc_spi.c
+++ b/drivers/staging/wilc1000/wilc_spi.c
@@ -934,9 +934,8 @@ static int wilc_spi_read_int(struct wilc *wilc, u32 *int_status)
int k = IRG_FLAGS_OFFSET + 5;
if (spi_priv->has_thrpt_enh) {
- ret = spi_internal_read(wilc, 0xe840 - WILC_SPI_REG_BASE,
- int_status);
- return ret;
+ return spi_internal_read(wilc, 0xe840 - WILC_SPI_REG_BASE,
+ int_status);
}
ret = wilc_spi_read_reg(wilc, WILC_VMM_TO_HOST_SIZE, &byte_cnt);
if (!ret) {
@@ -982,9 +981,8 @@ static int wilc_spi_clear_int_ext(struct wilc *wilc, u32 val)
u32 tbl_ctl;
if (spi_priv->has_thrpt_enh) {
- ret = spi_internal_write(wilc, 0xe844 - WILC_SPI_REG_BASE,
- val);
- return ret;
+ return spi_internal_write(wilc, 0xe844 - WILC_SPI_REG_BASE,
+ val);
}
flags = val & (BIT(MAX_NUM_INT) - 1);
--
2.17.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v3 2/2] staging: wilc1000: host_interface.c: Modify return statement.
2019-03-30 17:01 [PATCH 0/2] staging: wilc1000: Modify return statement Sanjana Sanikommu
2019-03-30 17:02 ` [PATCH v3 1/2] staging: wilc1000: wilc_spi.c: " Sanjana Sanikommu
@ 2019-03-30 17:04 ` Sanjana Sanikommu
2019-03-30 17:05 ` [Outreachy kernel] [PATCH 0/2] staging: wilc1000: " Julia Lawall
` (3 subsequent siblings)
5 siblings, 0 replies; 16+ messages in thread
From: Sanjana Sanikommu @ 2019-03-30 17:04 UTC (permalink / raw)
To: gregkh; +Cc: outreachy-kernel
Challenge suggested by coccinelle.
Remove return variable and directly return the value
Issue found using ret.cocci
Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
---
Changes in v3:
Make a patch series.
Changes in v2:
Adjust space for last argument in return statement.
drivers/staging/wilc1000/host_interface.c | 31 +++++++----------------
1 file changed, 9 insertions(+), 22 deletions(-)
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 4dd9a20f6a0b..09c3095c0392 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1358,17 +1358,14 @@ int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *rx_gtk, u8 gtk_key_len,
int wilc_set_pmkid_info(struct wilc_vif *vif, struct wilc_pmkid_attr *pmkid)
{
struct wid wid;
- int result;
wid.id = WID_PMKID_INFO;
wid.type = WID_STR;
wid.size = (pmkid->numpmkid * sizeof(struct wilc_pmkid)) + 1;
wid.val = (u8 *)pmkid;
- result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
- wilc_get_vif_idx(vif));
-
- return result;
+ return wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
+ wilc_get_vif_idx(vif));
}
int wilc_get_mac_address(struct wilc_vif *vif, u8 *mac_addr)
@@ -1403,8 +1400,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ies,
conn_info->req_ies_len = ies_len;
conn_info->req_ies = kmemdup(ies, ies_len, GFP_KERNEL);
if (!conn_info->req_ies) {
- result = -ENOMEM;
- return result;
+ return -ENOMEM;
}
}
@@ -1570,7 +1566,6 @@ int wilc_hif_set_cfg(struct wilc_vif *vif, struct cfg_param_attr *param)
{
struct wid wid_list[4];
int i = 0;
- int result;
if (param->flag & WILC_CFG_PARAM_RETRY_SHORT) {
wid_list[i].id = WID_SHORT_RETRY_LIMIT;
@@ -1601,10 +1596,8 @@ int wilc_hif_set_cfg(struct wilc_vif *vif, struct cfg_param_attr *param)
i++;
}
- result = wilc_send_config_pkt(vif, WILC_SET_CFG, wid_list,
- i, wilc_get_vif_idx(vif));
-
- return result;
+ return wilc_send_config_pkt(vif, WILC_SET_CFG, wid_list,
+ i, wilc_get_vif_idx(vif));
}
static void get_periodic_rssi(struct timer_list *t)
@@ -2121,7 +2114,6 @@ int wilc_setup_multicast_filter(struct wilc_vif *vif, u32 enabled, u32 count,
int wilc_set_tx_power(struct wilc_vif *vif, u8 tx_power)
{
- int ret;
struct wid wid;
wid.id = WID_TX_POWER;
@@ -2129,15 +2121,12 @@ int wilc_set_tx_power(struct wilc_vif *vif, u8 tx_power)
wid.val = &tx_power;
wid.size = sizeof(char);
- ret = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
- wilc_get_vif_idx(vif));
-
- return ret;
+ return wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
+ wilc_get_vif_idx(vif));
}
int wilc_get_tx_power(struct wilc_vif *vif, u8 *tx_power)
{
- int ret;
struct wid wid;
wid.id = WID_TX_POWER;
@@ -2145,8 +2134,6 @@ int wilc_get_tx_power(struct wilc_vif *vif, u8 *tx_power)
wid.val = tx_power;
wid.size = sizeof(char);
- ret = wilc_send_config_pkt(vif, WILC_GET_CFG, &wid, 1,
- wilc_get_vif_idx(vif));
-
- return ret;
+ return wilc_send_config_pkt(vif, WILC_GET_CFG, &wid, 1,
+ wilc_get_vif_idx(vif));
}
--
2.17.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [Outreachy kernel] [PATCH 0/2] staging: wilc1000: Modify return statement
2019-03-30 17:01 [PATCH 0/2] staging: wilc1000: Modify return statement Sanjana Sanikommu
2019-03-30 17:02 ` [PATCH v3 1/2] staging: wilc1000: wilc_spi.c: " Sanjana Sanikommu
2019-03-30 17:04 ` [PATCH v3 2/2] staging: wilc1000: host_interface.c: " Sanjana Sanikommu
@ 2019-03-30 17:05 ` Julia Lawall
2019-03-30 17:08 ` Sanjana Sanikommu
2019-03-30 17:34 ` [PATCH v4 " Sanjana Sanikommu
` (2 subsequent siblings)
5 siblings, 1 reply; 16+ messages in thread
From: Julia Lawall @ 2019-03-30 17:05 UTC (permalink / raw)
To: Sanjana Sanikommu; +Cc: gregkh, outreachy-kernel
The cover letter should also be v3.
julia
On Sat, 30 Mar 2019, Sanjana Sanikommu wrote:
> This patchset does the following things.
> 1.Modify return statement in wilc_spi.c
> 2.Modify return statement in host_interface.c
>
> Changes in v3:
> Make a patch series.
>
> Changes in v2:
> Adjust spaces for last argument in return statement host_interface.c.
> Adjust space for last argument in return statement in wilc_spi.c.
>
> Sanjana Sanikommu (2):
> staging: wilc1000: wilc_spi.c: Modify return statement.
> staging: wilc1000: host_interface.c: Modify return statement.
>
> drivers/staging/wilc1000/host_interface.c | 31 +++++++----------------
> drivers/staging/wilc1000/wilc_spi.c | 10 +++-----
> 2 files changed, 13 insertions(+), 28 deletions(-)
>
> --
> 2.17.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20190330170116.4761-1-sanjana99reddy99%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Outreachy kernel] [PATCH 0/2] staging: wilc1000: Modify return statement
2019-03-30 17:05 ` [Outreachy kernel] [PATCH 0/2] staging: wilc1000: " Julia Lawall
@ 2019-03-30 17:08 ` Sanjana Sanikommu
2019-03-30 17:30 ` Julia Lawall
0 siblings, 1 reply; 16+ messages in thread
From: Sanjana Sanikommu @ 2019-03-30 17:08 UTC (permalink / raw)
To: Julia Lawall; +Cc: Greg KH, outreachy-kernel
[-- Attachment #1: Type: text/plain, Size: 1587 bytes --]
On Sat, 30 Mar 2019, 22:35 Julia Lawall, <julia.lawall@lip6.fr> wrote:
> The cover letter should also be v3.
>
Shall I change the version number for only cover letter or send again
the whole series in v4?plz let me know.
Sanjana.
>
> julia
>
> On Sat, 30 Mar 2019, Sanjana Sanikommu wrote:
>
> > This patchset does the following things.
> > 1.Modify return statement in wilc_spi.c
> > 2.Modify return statement in host_interface.c
> >
> > Changes in v3:
> > Make a patch series.
> >
> > Changes in v2:
> > Adjust spaces for last argument in return statement host_interface.c.
> > Adjust space for last argument in return statement in wilc_spi.c.
> >
> > Sanjana Sanikommu (2):
> > staging: wilc1000: wilc_spi.c: Modify return statement.
> > staging: wilc1000: host_interface.c: Modify return statement.
> >
> > drivers/staging/wilc1000/host_interface.c | 31 +++++++----------------
> > drivers/staging/wilc1000/wilc_spi.c | 10 +++-----
> > 2 files changed, 13 insertions(+), 28 deletions(-)
> >
> > --
> > 2.17.1
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To post to this group, send email to outreachy-kernel@googlegroups.com.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/outreachy-kernel/20190330170116.4761-1-sanjana99reddy99%40gmail.com
> .
> > For more options, visit https://groups.google.com/d/optout.
> >
>
[-- Attachment #2: Type: text/html, Size: 2942 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Outreachy kernel] [PATCH 0/2] staging: wilc1000: Modify return statement
2019-03-30 17:08 ` Sanjana Sanikommu
@ 2019-03-30 17:30 ` Julia Lawall
2019-03-30 17:31 ` sanjana99reddy99
0 siblings, 1 reply; 16+ messages in thread
From: Julia Lawall @ 2019-03-30 17:30 UTC (permalink / raw)
To: Sanjana Sanikommu; +Cc: Greg KH, outreachy-kernel
[-- Attachment #1: Type: text/plain, Size: 2538 bytes --]
On Sat, 30 Mar 2019, Sanjana Sanikommu wrote:
>
>
> On Sat, 30 Mar 2019, 22:35 Julia Lawall, <julia.lawall@lip6.fr> wrote:
> The cover letter should also be v3.
>
>
> Shall I change the version number for only cover letter or send again
> the whole series in v4?plz let me know.
Sendng the whole thing again as v4 would be more clear.
julia
>
> Sanjana.
>
> julia
>
> On Sat, 30 Mar 2019, Sanjana Sanikommu wrote:
>
> > This patchset does the following things.
> > 1.Modify return statement in wilc_spi.c
> > 2.Modify return statement in host_interface.c
> >
> > Changes in v3:
> > Make a patch series.
> >
> > Changes in v2:
> > Adjust spaces for last argument in return statement
> host_interface.c.
> > Adjust space for last argument in return statement in
> wilc_spi.c.
> >
> > Sanjana Sanikommu (2):
> > staging: wilc1000: wilc_spi.c: Modify return statement.
> > staging: wilc1000: host_interface.c: Modify return
> statement.
> >
> > drivers/staging/wilc1000/host_interface.c | 31
> +++++++----------------
> > drivers/staging/wilc1000/wilc_spi.c | 10 +++-----
> > 2 files changed, 13 insertions(+), 28 deletions(-)
> >
> > --
> > 2.17.1
> >
> > --
> > You received this message because you are subscribed to the
> Google Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from
> it, send an email to
> outreachy-kernel+unsubscribe@googlegroups.com.
> > To post to this group, send email to
> outreachy-kernel@googlegroups.com.
> > To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/20190330170116.4761-1-sa
> njana99reddy99%40gmail.com.
> > For more options, visit https://groups.google.com/d/optout.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/CAO-bXGDmAJVPyODMynGrPTu
> ttnKkJbivpaVYQSUYAOmj8v4e%2BQ%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Outreachy kernel] [PATCH 0/2] staging: wilc1000: Modify return statement
2019-03-30 17:30 ` Julia Lawall
@ 2019-03-30 17:31 ` sanjana99reddy99
0 siblings, 0 replies; 16+ messages in thread
From: sanjana99reddy99 @ 2019-03-30 17:31 UTC (permalink / raw)
To: outreachy-kernel
[-- Attachment #1.1: Type: text/plain, Size: 2897 bytes --]
On Saturday, March 30, 2019 at 11:00:10 PM UTC+5:30, Julia Lawall wrote:
>
>
>
> On Sat, 30 Mar 2019, Sanjana Sanikommu wrote:
>
> >
> >
> > On Sat, 30 Mar 2019, 22:35 Julia Lawall, <julia...@lip6.fr <javascript:>>
> wrote:
> > The cover letter should also be v3.
> >
> >
> > Shall I change the version number for only cover letter or send
> again
> > the whole series in v4?plz let me know.
>
> Sendng the whole thing again as v4 would be more clear.
>
Sure, I would send :)
Sanjana
>
> julia
>
>
> >
> > Sanjana.
> >
> > julia
> >
> > On Sat, 30 Mar 2019, Sanjana Sanikommu wrote:
> >
> > > This patchset does the following things.
> > > 1.Modify return statement in wilc_spi.c
> > > 2.Modify return statement in host_interface.c
> > >
> > > Changes in v3:
> > > Make a patch series.
> > >
> > > Changes in v2:
> > > Adjust spaces for last argument in return statement
> > host_interface.c.
> > > Adjust space for last argument in return statement in
> > wilc_spi.c.
> > >
> > > Sanjana Sanikommu (2):
> > > staging: wilc1000: wilc_spi.c: Modify return statement.
> > > staging: wilc1000: host_interface.c: Modify return
> > statement.
> > >
> > > drivers/staging/wilc1000/host_interface.c | 31
> > +++++++----------------
> > > drivers/staging/wilc1000/wilc_spi.c | 10 +++-----
> > > 2 files changed, 13 insertions(+), 28 deletions(-)
> > >
> > > --
> > > 2.17.1
> > >
> > > --
> > > You received this message because you are subscribed to the
> > Google Groups "outreachy-kernel" group.
> > > To unsubscribe from this group and stop receiving emails from
> > it, send an email to
> > outreach...@googlegroups.com <javascript:>.
> > > To post to this group, send email to
> > outreach...@googlegroups.com <javascript:>.
> > > To view this discussion on the web visithttps://
> groups.google.com/d/msgid/outreachy-kernel/20190330170116.4761-1-sa
> > njana99reddy99%40gmail.com.
> > > For more options, visit https://groups.google.com/d/optout.
> > >
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups
> > "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an
> > email to outreach...@googlegroups.com <javascript:>.
> > To post to this group, send email to outreach...@googlegroups.com
> <javascript:>.
> > To view this discussion on the web visithttps://
> groups.google.com/d/msgid/outreachy-kernel/CAO-bXGDmAJVPyODMynGrPTu
> > ttnKkJbivpaVYQSUYAOmj8v4e%2BQ%40mail.gmail.com.
> > For more options, visit https://groups.google.com/d/optout.
> >
> >
[-- Attachment #1.2: Type: text/html, Size: 6645 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v4 0/2] staging: wilc1000: Modify return statement
2019-03-30 17:01 [PATCH 0/2] staging: wilc1000: Modify return statement Sanjana Sanikommu
` (2 preceding siblings ...)
2019-03-30 17:05 ` [Outreachy kernel] [PATCH 0/2] staging: wilc1000: " Julia Lawall
@ 2019-03-30 17:34 ` Sanjana Sanikommu
2019-03-30 17:36 ` [PATCH v4 1/2] staging: wilc1000: wilc_spi.c: " Sanjana Sanikommu
2019-03-30 17:38 ` [PATCH v4 2/2] staging: wilc1000: host_interface.c: " Sanjana Sanikommu
5 siblings, 0 replies; 16+ messages in thread
From: Sanjana Sanikommu @ 2019-03-30 17:34 UTC (permalink / raw)
To: gregkh; +Cc: outreachy-kernel
This patchset does the following things.
1.Modify return statement in wilc_spi.c
2.Modify return statement in host_interface.c
Changes in v4:
Correct the version number for [PATCH 0/2] i.e
rename it as [PATCH V4 0/2]
No changes from [PATCH v3 1/2]
No changes from [PATCH v3 2/2]
Changes in v3:
Make a patch series.
Changes in v2:
Adjust spaces for last argument in return statement host_interface.c.
Adjust space for last argument in return statement in wilc_spi.c.
Sanjana Sanikommu (2):
staging: wilc1000: wilc_spi.c: Modify return statement.
staging: wilc1000: host_interface.c: Modify return statement.
drivers/staging/wilc1000/host_interface.c | 31 +++++++----------------
drivers/staging/wilc1000/wilc_spi.c | 10 +++-----
2 files changed, 13 insertions(+), 28 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v4 1/2] staging: wilc1000: wilc_spi.c: Modify return statement.
2019-03-30 17:01 [PATCH 0/2] staging: wilc1000: Modify return statement Sanjana Sanikommu
` (3 preceding siblings ...)
2019-03-30 17:34 ` [PATCH v4 " Sanjana Sanikommu
@ 2019-03-30 17:36 ` Sanjana Sanikommu
2019-03-30 19:37 ` [Outreachy kernel] " Greg KH
2019-03-30 17:38 ` [PATCH v4 2/2] staging: wilc1000: host_interface.c: " Sanjana Sanikommu
5 siblings, 1 reply; 16+ messages in thread
From: Sanjana Sanikommu @ 2019-03-30 17:36 UTC (permalink / raw)
To: gregkh; +Cc: outreachy-kernel
Challenge suggested by coccinelle.
Remove return variable and directly return the value
Issue found using ret.cocci
Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
---
Changes in v4:
No changes
Changes in v3:
Make a patch series.
Changes in v2:
Adjust space for last argument in return statement.
drivers/staging/wilc1000/wilc_spi.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c
index 4a1be9e60d74..47c777c5d1a7 100644
--- a/drivers/staging/wilc1000/wilc_spi.c
+++ b/drivers/staging/wilc1000/wilc_spi.c
@@ -934,9 +934,8 @@ static int wilc_spi_read_int(struct wilc *wilc, u32 *int_status)
int k = IRG_FLAGS_OFFSET + 5;
if (spi_priv->has_thrpt_enh) {
- ret = spi_internal_read(wilc, 0xe840 - WILC_SPI_REG_BASE,
- int_status);
- return ret;
+ return spi_internal_read(wilc, 0xe840 - WILC_SPI_REG_BASE,
+ int_status);
}
ret = wilc_spi_read_reg(wilc, WILC_VMM_TO_HOST_SIZE, &byte_cnt);
if (!ret) {
@@ -982,9 +981,8 @@ static int wilc_spi_clear_int_ext(struct wilc *wilc, u32 val)
u32 tbl_ctl;
if (spi_priv->has_thrpt_enh) {
- ret = spi_internal_write(wilc, 0xe844 - WILC_SPI_REG_BASE,
- val);
- return ret;
+ return spi_internal_write(wilc, 0xe844 - WILC_SPI_REG_BASE,
+ val);
}
flags = val & (BIT(MAX_NUM_INT) - 1);
--
2.17.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v4 2/2] staging: wilc1000: host_interface.c: Modify return statement.
2019-03-30 17:01 [PATCH 0/2] staging: wilc1000: Modify return statement Sanjana Sanikommu
` (4 preceding siblings ...)
2019-03-30 17:36 ` [PATCH v4 1/2] staging: wilc1000: wilc_spi.c: " Sanjana Sanikommu
@ 2019-03-30 17:38 ` Sanjana Sanikommu
2019-03-30 19:37 ` Greg KH
5 siblings, 1 reply; 16+ messages in thread
From: Sanjana Sanikommu @ 2019-03-30 17:38 UTC (permalink / raw)
To: gregkh; +Cc: outreachy-kernel
Challenge suggested by coccinelle.
Remove return variable and directly return the value
Issue found using ret.cocci
Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
---
Changes in v4:
No changes
Changes in v3:
Make a patch series.
Changes in v2:
Adjust space for last argument in return statement.
drivers/staging/wilc1000/host_interface.c | 31 +++++++----------------
1 file changed, 9 insertions(+), 22 deletions(-)
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 4dd9a20f6a0b..09c3095c0392 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1358,17 +1358,14 @@ int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *rx_gtk, u8 gtk_key_len,
int wilc_set_pmkid_info(struct wilc_vif *vif, struct wilc_pmkid_attr *pmkid)
{
struct wid wid;
- int result;
wid.id = WID_PMKID_INFO;
wid.type = WID_STR;
wid.size = (pmkid->numpmkid * sizeof(struct wilc_pmkid)) + 1;
wid.val = (u8 *)pmkid;
- result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
- wilc_get_vif_idx(vif));
-
- return result;
+ return wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
+ wilc_get_vif_idx(vif));
}
int wilc_get_mac_address(struct wilc_vif *vif, u8 *mac_addr)
@@ -1403,8 +1400,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ies,
conn_info->req_ies_len = ies_len;
conn_info->req_ies = kmemdup(ies, ies_len, GFP_KERNEL);
if (!conn_info->req_ies) {
- result = -ENOMEM;
- return result;
+ return -ENOMEM;
}
}
@@ -1570,7 +1566,6 @@ int wilc_hif_set_cfg(struct wilc_vif *vif, struct cfg_param_attr *param)
{
struct wid wid_list[4];
int i = 0;
- int result;
if (param->flag & WILC_CFG_PARAM_RETRY_SHORT) {
wid_list[i].id = WID_SHORT_RETRY_LIMIT;
@@ -1601,10 +1596,8 @@ int wilc_hif_set_cfg(struct wilc_vif *vif, struct cfg_param_attr *param)
i++;
}
- result = wilc_send_config_pkt(vif, WILC_SET_CFG, wid_list,
- i, wilc_get_vif_idx(vif));
-
- return result;
+ return wilc_send_config_pkt(vif, WILC_SET_CFG, wid_list,
+ i, wilc_get_vif_idx(vif));
}
static void get_periodic_rssi(struct timer_list *t)
@@ -2121,7 +2114,6 @@ int wilc_setup_multicast_filter(struct wilc_vif *vif, u32 enabled, u32 count,
int wilc_set_tx_power(struct wilc_vif *vif, u8 tx_power)
{
- int ret;
struct wid wid;
wid.id = WID_TX_POWER;
@@ -2129,15 +2121,12 @@ int wilc_set_tx_power(struct wilc_vif *vif, u8 tx_power)
wid.val = &tx_power;
wid.size = sizeof(char);
- ret = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
- wilc_get_vif_idx(vif));
-
- return ret;
+ return wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
+ wilc_get_vif_idx(vif));
}
int wilc_get_tx_power(struct wilc_vif *vif, u8 *tx_power)
{
- int ret;
struct wid wid;
wid.id = WID_TX_POWER;
@@ -2145,8 +2134,6 @@ int wilc_get_tx_power(struct wilc_vif *vif, u8 *tx_power)
wid.val = tx_power;
wid.size = sizeof(char);
- ret = wilc_send_config_pkt(vif, WILC_GET_CFG, &wid, 1,
- wilc_get_vif_idx(vif));
-
- return ret;
+ return wilc_send_config_pkt(vif, WILC_GET_CFG, &wid, 1,
+ wilc_get_vif_idx(vif));
}
--
2.17.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [Outreachy kernel] [PATCH v4 1/2] staging: wilc1000: wilc_spi.c: Modify return statement.
2019-03-30 17:36 ` [PATCH v4 1/2] staging: wilc1000: wilc_spi.c: " Sanjana Sanikommu
@ 2019-03-30 19:37 ` Greg KH
2019-03-31 9:01 ` sanjana99reddy99
0 siblings, 1 reply; 16+ messages in thread
From: Greg KH @ 2019-03-30 19:37 UTC (permalink / raw)
To: Sanjana Sanikommu; +Cc: outreachy-kernel
On Sat, Mar 30, 2019 at 11:06:05PM +0530, Sanjana Sanikommu wrote:
> Challenge suggested by coccinelle.
> Remove return variable and directly return the value
> Issue found using ret.cocci
>
> Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
Patch does not apply to my tree at all. Please rebase and resend.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v4 2/2] staging: wilc1000: host_interface.c: Modify return statement.
2019-03-30 17:38 ` [PATCH v4 2/2] staging: wilc1000: host_interface.c: " Sanjana Sanikommu
@ 2019-03-30 19:37 ` Greg KH
2019-03-31 10:50 ` sanjana99reddy99
0 siblings, 1 reply; 16+ messages in thread
From: Greg KH @ 2019-03-30 19:37 UTC (permalink / raw)
To: Sanjana Sanikommu; +Cc: outreachy-kernel
On Sat, Mar 30, 2019 at 11:08:36PM +0530, Sanjana Sanikommu wrote:
> Challenge suggested by coccinelle.
> Remove return variable and directly return the value
> Issue found using ret.cocci
>
> Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
Are you sure this isn't already in the tree? It does not apply.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Outreachy kernel] [PATCH v4 1/2] staging: wilc1000: wilc_spi.c: Modify return statement.
2019-03-30 19:37 ` [Outreachy kernel] " Greg KH
@ 2019-03-31 9:01 ` sanjana99reddy99
0 siblings, 0 replies; 16+ messages in thread
From: sanjana99reddy99 @ 2019-03-31 9:01 UTC (permalink / raw)
To: outreachy-kernel
[-- Attachment #1.1: Type: text/plain, Size: 505 bytes --]
On Sunday, March 31, 2019 at 1:09:38 AM UTC+5:30, gregkh wrote:
>
> On Sat, Mar 30, 2019 at 11:06:05PM +0530, Sanjana Sanikommu wrote:
> > Challenge suggested by coccinelle.
> > Remove return variable and directly return the value
> > Issue found using ret.cocci
> >
> > Signed-off-by: Sanjana Sanikommu <sanjana9...@gmail.com <javascript:>>
>
> Patch does not apply to my tree at all. Please rebase and resend.
>
> Sure I will remove them. Thanks
Sanjana
> thanks,
>
> greg k-h
>
[-- Attachment #1.2: Type: text/html, Size: 1184 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v4 2/2] staging: wilc1000: host_interface.c: Modify return statement.
2019-03-30 19:37 ` Greg KH
@ 2019-03-31 10:50 ` sanjana99reddy99
2019-03-31 11:21 ` [Outreachy kernel] " Julia Lawall
0 siblings, 1 reply; 16+ messages in thread
From: sanjana99reddy99 @ 2019-03-31 10:50 UTC (permalink / raw)
To: outreachy-kernel
[-- Attachment #1.1: Type: text/plain, Size: 565 bytes --]
On Sunday, March 31, 2019 at 1:09:44 AM UTC+5:30, gregkh wrote:
>
> On Sat, Mar 30, 2019 at 11:08:36PM +0530, Sanjana Sanikommu wrote:
> > Challenge suggested by coccinelle.
> > Remove return variable and directly return the value
> > Issue found using ret.cocci
> >
> > Signed-off-by: Sanjana Sanikommu <sanjana9...@gmail.com <javascript:>>
>
> Are you sure this isn't already in the tree? It does not apply.
Changes are made in drivers/staging/wilc1000/
I don't know where it went wrong.
Thank you
Sanjana
>
> thanks,
>
> greg k-h
>
[-- Attachment #1.2: Type: text/html, Size: 1154 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Outreachy kernel] Re: [PATCH v4 2/2] staging: wilc1000: host_interface.c: Modify return statement.
2019-03-31 10:50 ` sanjana99reddy99
@ 2019-03-31 11:21 ` Julia Lawall
2019-03-31 14:00 ` sanjana99reddy99
0 siblings, 1 reply; 16+ messages in thread
From: Julia Lawall @ 2019-03-31 11:21 UTC (permalink / raw)
To: sanjana99reddy99; +Cc: outreachy-kernel
[-- Attachment #1: Type: text/plain, Size: 1265 bytes --]
On Sun, 31 Mar 2019, sanjana99reddy99@gmail.com wrote:
>
>
> On Sunday, March 31, 2019 at 1:09:44 AM UTC+5:30, gregkh wrote:
> On Sat, Mar 30, 2019 at 11:08:36PM +0530, Sanjana Sanikommu
> wrote:
> > Challenge suggested by coccinelle.
> > Remove return variable and directly return the value
> > Issue found using ret.cocci
> >
> > Signed-off-by: Sanjana Sanikommu <sanjana9...@gmail.com>
>
> Are you sure this isn't already in the tree? It does not apply.
>
>
> Changes are made in drivers/staging/wilc1000/
> I don't know where it went wrong.
Perhaps you need to do git pull?
julia
> Thank you
> Sanjana
>
> thanks,
>
> greg k-h
>
> --
> You received this message because you are subscribed to the Google Groups
> "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/9d78f23f-4105-4dd7-ab9e-
> 05faa57f23fb%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Outreachy kernel] Re: [PATCH v4 2/2] staging: wilc1000: host_interface.c: Modify return statement.
2019-03-31 11:21 ` [Outreachy kernel] " Julia Lawall
@ 2019-03-31 14:00 ` sanjana99reddy99
0 siblings, 0 replies; 16+ messages in thread
From: sanjana99reddy99 @ 2019-03-31 14:00 UTC (permalink / raw)
To: outreachy-kernel
[-- Attachment #1.1: Type: text/plain, Size: 1524 bytes --]
On Sunday, March 31, 2019 at 4:52:00 PM UTC+5:30, Julia Lawall wrote:
>
>
>
> On Sun, 31 Mar 2019, sanjana9...@gmail.com <javascript:> wrote:
>
> >
> >
> > On Sunday, March 31, 2019 at 1:09:44 AM UTC+5:30, gregkh wrote:
> > On Sat, Mar 30, 2019 at 11:08:36PM +0530, Sanjana Sanikommu
> > wrote:
> > > Challenge suggested by coccinelle.
> > > Remove return variable and directly return the value
> > > Issue found using ret.cocci
> > >
> > > Signed-off-by: Sanjana Sanikommu <sanjana9...@gmail.com>
> >
> > Are you sure this isn't already in the tree? It does not apply.
> >
> >
> > Changes are made in drivers/staging/wilc1000/
> > I don't know where it went wrong.
>
> Perhaps you need to do git pull?
>
I will try that.
Thank you.
Sanjana
>
> julia
>
>
> > Thank you
> > Sanjana
> >
> > thanks,
> >
> > greg k-h
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups
> > "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an
> > email to outreach...@googlegroups.com <javascript:>.
> > To post to this group, send email to outreach...@googlegroups.com
> <javascript:>.
> > To view this discussion on the web visithttps://
> groups.google.com/d/msgid/outreachy-kernel/9d78f23f-4105-4dd7-ab9e-
> > 05faa57f23fb%40googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
> >
> >
[-- Attachment #1.2: Type: text/html, Size: 3765 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2019-03-31 14:00 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-30 17:01 [PATCH 0/2] staging: wilc1000: Modify return statement Sanjana Sanikommu
2019-03-30 17:02 ` [PATCH v3 1/2] staging: wilc1000: wilc_spi.c: " Sanjana Sanikommu
2019-03-30 17:04 ` [PATCH v3 2/2] staging: wilc1000: host_interface.c: " Sanjana Sanikommu
2019-03-30 17:05 ` [Outreachy kernel] [PATCH 0/2] staging: wilc1000: " Julia Lawall
2019-03-30 17:08 ` Sanjana Sanikommu
2019-03-30 17:30 ` Julia Lawall
2019-03-30 17:31 ` sanjana99reddy99
2019-03-30 17:34 ` [PATCH v4 " Sanjana Sanikommu
2019-03-30 17:36 ` [PATCH v4 1/2] staging: wilc1000: wilc_spi.c: " Sanjana Sanikommu
2019-03-30 19:37 ` [Outreachy kernel] " Greg KH
2019-03-31 9:01 ` sanjana99reddy99
2019-03-30 17:38 ` [PATCH v4 2/2] staging: wilc1000: host_interface.c: " Sanjana Sanikommu
2019-03-30 19:37 ` Greg KH
2019-03-31 10:50 ` sanjana99reddy99
2019-03-31 11:21 ` [Outreachy kernel] " Julia Lawall
2019-03-31 14:00 ` sanjana99reddy99
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.