* [PATCH v2 0/2] staging: wilc1000: fix checkpatch errors
@ 2016-02-15 5:34 Eva Rachel Retuya
2016-02-15 5:34 ` [PATCH v2 1/2] staging: wilc1000: Remove whitespace " Eva Rachel Retuya
2016-02-15 5:34 ` [PATCH v2 2/2] staging: wilc1000: Remove initialization of static variables Eva Rachel Retuya
0 siblings, 2 replies; 6+ messages in thread
From: Eva Rachel Retuya @ 2016-02-15 5:34 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Eva Rachel Retuya
Clean checkpatch errors found in wilc1000.
Change in v2:
* Split single patch into two separate patches of distinct change
Eva Rachel Retuya (2):
staging: wilc1000: Remove whitespace checkpatch errors
staging: wilc1000: Remove initialization of static variables
drivers/staging/wilc1000/host_interface.c | 2 +-
drivers/staging/wilc1000/linux_mon.c | 2 +-
drivers/staging/wilc1000/wilc_spi.c | 9 ++++++---
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 ++--
drivers/staging/wilc1000/wilc_wlan.c | 2 +-
5 files changed, 11 insertions(+), 8 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/2] staging: wilc1000: Remove whitespace checkpatch errors
2016-02-15 5:34 [PATCH v2 0/2] staging: wilc1000: fix checkpatch errors Eva Rachel Retuya
@ 2016-02-15 5:34 ` Eva Rachel Retuya
2016-02-16 2:19 ` [Outreachy kernel] " Greg KH
2016-02-15 5:34 ` [PATCH v2 2/2] staging: wilc1000: Remove initialization of static variables Eva Rachel Retuya
1 sibling, 1 reply; 6+ messages in thread
From: Eva Rachel Retuya @ 2016-02-15 5:34 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Eva Rachel Retuya
Address the following checkpatch errors concerning whitespace:
* ERROR: trailing whitespace
* ERROR: space required after that ',' (ctx:VxV)
* ERROR: spaces prohibited around that '->' (ctx:WxV)
Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
---
drivers/staging/wilc1000/host_interface.c | 2 +-
drivers/staging/wilc1000/linux_mon.c | 2 +-
drivers/staging/wilc1000/wilc_spi.c | 9 ++++++---
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +-
4 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index d1eedfb..04337c7 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3352,7 +3352,7 @@ static s32 host_int_get_assoc_res_info(struct wilc_vif *vif,
PRINT_ER("Failed to send association response config packet\n");
return -EINVAL;
}
-
+
*pu32RcvdAssocRespInfoLen = wid.size;
return result;
}
diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c
index 21f35d7..9fcb497 100644
--- a/drivers/staging/wilc1000/linux_mon.c
+++ b/drivers/staging/wilc1000/linux_mon.c
@@ -302,7 +302,7 @@ struct net_device *WILC_WFI_init_mon_interface(const char *name, struct net_devi
struct WILC_WFI_mon_priv *priv;
/*If monitor interface is already initialized, return it*/
- if (wilc_wfi_mon)
+ if (wilc_wfi_mon)
return wilc_wfi_mon;
wilc_wfi_mon = alloc_etherdev(sizeof(struct WILC_WFI_mon_priv));
diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c
index 2928712..339956e 100644
--- a/drivers/staging/wilc1000/wilc_spi.c
+++ b/drivers/staging/wilc1000/wilc_spi.c
@@ -514,7 +514,8 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 adr, u8 *b, u32 sz,
crc[0] = rb[rix++];
crc[1] = rb[rix++];
} else {
- dev_err(&spi->dev,"buffer overrun when reading crc.\n");
+ dev_err(&spi->dev,
+ "buffer overrun when reading crc.\n");
result = N_FAIL;
return result;
}
@@ -680,7 +681,8 @@ static int spi_data_write(struct wilc *wilc, u8 *b, u32 sz)
**/
if (!g_spi.crc_off) {
if (wilc_spi_tx(wilc, crc, 2)) {
- dev_err(&spi->dev,"Failed data block crc write, bus error...\n");
+ dev_err(&spi->dev,
+ "Failed data block crc write, bus error...\n");
result = N_FAIL;
break;
}
@@ -1074,7 +1076,8 @@ static int wilc_spi_clear_int_ext(struct wilc *wilc, u32 val)
ret = wilc_spi_write_reg(wilc,
WILC_VMM_CORE_CTL, 1);
if (!ret) {
- dev_err(&spi->dev,"fail write reg vmm_core_ctl...\n");
+ dev_err(&spi->dev,
+ "fail write reg vmm_core_ctl...\n");
goto _fail_;
}
}
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 81a2ee9..46c6e32 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -2126,7 +2126,7 @@ static int start_ap(struct wiphy *wiphy, struct net_device *dev,
priv = wiphy_priv(wiphy);
vif = netdev_priv(dev);
- wl = vif ->wilc;
+ wl = vif->wilc;
PRINT_D(HOSTAPD_DBG, "Starting ap\n");
PRINT_D(HOSTAPD_DBG, "Interval = %d\n DTIM period = %d\n Head length = %zu Tail length = %zu\n",
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/2] staging: wilc1000: Remove initialization of static variables
2016-02-15 5:34 [PATCH v2 0/2] staging: wilc1000: fix checkpatch errors Eva Rachel Retuya
2016-02-15 5:34 ` [PATCH v2 1/2] staging: wilc1000: Remove whitespace " Eva Rachel Retuya
@ 2016-02-15 5:34 ` Eva Rachel Retuya
1 sibling, 0 replies; 6+ messages in thread
From: Eva Rachel Retuya @ 2016-02-15 5:34 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Eva Rachel Retuya
Address the following checkpatch errors:
* ERROR: do not initialise statics to false
* ERROR: do not initialise statics to 0x00
Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
---
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +-
drivers/staging/wilc1000/wilc_wlan.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 46c6e32..5649476 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -157,7 +157,7 @@ static u8 wlan_channel = INVALID_CHANNEL;
static u8 curr_channel;
static u8 p2p_oui[] = {0x50, 0x6f, 0x9A, 0x09};
static u8 p2p_local_random = 0x01;
-static u8 p2p_recv_random = 0x00;
+static u8 p2p_recv_random;
static u8 p2p_vendor_spec[] = {0xdd, 0x05, 0x00, 0x08, 0x40, 0x03};
static bool wilc_ie;
diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index a396ac9..ef65e8e 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -325,7 +325,7 @@ static int wilc_wlan_txq_filter_dup_tcp_ack(struct net_device *dev)
return 1;
}
-static bool enabled = false;
+static bool enabled;
void wilc_enable_tcp_ack_filter(bool value)
{
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Outreachy kernel] [PATCH v2 1/2] staging: wilc1000: Remove whitespace checkpatch errors
2016-02-15 5:34 ` [PATCH v2 1/2] staging: wilc1000: Remove whitespace " Eva Rachel Retuya
@ 2016-02-16 2:19 ` Greg KH
2016-02-16 7:30 ` Eva Rachel Retuya
0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2016-02-16 2:19 UTC (permalink / raw)
To: Eva Rachel Retuya; +Cc: outreachy-kernel
On Mon, Feb 15, 2016 at 01:34:16PM +0800, Eva Rachel Retuya wrote:
> Address the following checkpatch errors concerning whitespace:
> * ERROR: trailing whitespace
> * ERROR: space required after that ',' (ctx:VxV)
> * ERROR: spaces prohibited around that '->' (ctx:WxV)
That's different things, please break this up, because:
>
> Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
> ---
> drivers/staging/wilc1000/host_interface.c | 2 +-
> drivers/staging/wilc1000/linux_mon.c | 2 +-
> drivers/staging/wilc1000/wilc_spi.c | 9 ++++++---
> drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +-
> 4 files changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
> index d1eedfb..04337c7 100644
> --- a/drivers/staging/wilc1000/host_interface.c
> +++ b/drivers/staging/wilc1000/host_interface.c
> @@ -3352,7 +3352,7 @@ static s32 host_int_get_assoc_res_info(struct wilc_vif *vif,
> PRINT_ER("Failed to send association response config packet\n");
> return -EINVAL;
> }
> -
> +
> *pu32RcvdAssocRespInfoLen = wid.size;
> return result;
> }
> diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c
> index 21f35d7..9fcb497 100644
> --- a/drivers/staging/wilc1000/linux_mon.c
> +++ b/drivers/staging/wilc1000/linux_mon.c
> @@ -302,7 +302,7 @@ struct net_device *WILC_WFI_init_mon_interface(const char *name, struct net_devi
> struct WILC_WFI_mon_priv *priv;
>
> /*If monitor interface is already initialized, return it*/
> - if (wilc_wfi_mon)
> + if (wilc_wfi_mon)
> return wilc_wfi_mon;
>
> wilc_wfi_mon = alloc_etherdev(sizeof(struct WILC_WFI_mon_priv));
> diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c
> index 2928712..339956e 100644
> --- a/drivers/staging/wilc1000/wilc_spi.c
> +++ b/drivers/staging/wilc1000/wilc_spi.c
> @@ -514,7 +514,8 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 adr, u8 *b, u32 sz,
> crc[0] = rb[rix++];
> crc[1] = rb[rix++];
> } else {
> - dev_err(&spi->dev,"buffer overrun when reading crc.\n");
> + dev_err(&spi->dev,
> + "buffer overrun when reading crc.\n");
That change is not ok, leave it as-is.
> result = N_FAIL;
> return result;
> }
> @@ -680,7 +681,8 @@ static int spi_data_write(struct wilc *wilc, u8 *b, u32 sz)
> **/
> if (!g_spi.crc_off) {
> if (wilc_spi_tx(wilc, crc, 2)) {
> - dev_err(&spi->dev,"Failed data block crc write, bus error...\n");
> + dev_err(&spi->dev,
> + "Failed data block crc write, bus error...\n");
Same here.
> result = N_FAIL;
> break;
> }
> @@ -1074,7 +1076,8 @@ static int wilc_spi_clear_int_ext(struct wilc *wilc, u32 val)
> ret = wilc_spi_write_reg(wilc,
> WILC_VMM_CORE_CTL, 1);
> if (!ret) {
> - dev_err(&spi->dev,"fail write reg vmm_core_ctl...\n");
> + dev_err(&spi->dev,
> + "fail write reg vmm_core_ctl...\n");
Same here.
> goto _fail_;
> }
> }
> diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> index 81a2ee9..46c6e32 100644
> --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> @@ -2126,7 +2126,7 @@ static int start_ap(struct wiphy *wiphy, struct net_device *dev,
>
> priv = wiphy_priv(wiphy);
> vif = netdev_priv(dev);
> - wl = vif ->wilc;
> + wl = vif->wilc;
That's just odd. The original code compiles?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Outreachy kernel] [PATCH v2 1/2] staging: wilc1000: Remove whitespace checkpatch errors
2016-02-16 2:19 ` [Outreachy kernel] " Greg KH
@ 2016-02-16 7:30 ` Eva Rachel Retuya
2016-02-16 9:52 ` Julia Lawall
0 siblings, 1 reply; 6+ messages in thread
From: Eva Rachel Retuya @ 2016-02-16 7:30 UTC (permalink / raw)
To: Greg KH; +Cc: outreachy-kernel
On Mon, Feb 15, 2016 at 06:19:48PM -0800, Greg KH wrote:
> On Mon, Feb 15, 2016 at 01:34:16PM +0800, Eva Rachel Retuya wrote:
> > Address the following checkpatch errors concerning whitespace:
> > * ERROR: trailing whitespace
> > * ERROR: space required after that ',' (ctx:VxV)
> > * ERROR: spaces prohibited around that '->' (ctx:WxV)
>
> That's different things, please break this up, because:
>
> >
> > Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
> > ---
> > drivers/staging/wilc1000/host_interface.c | 2 +-
> > drivers/staging/wilc1000/linux_mon.c | 2 +-
> > drivers/staging/wilc1000/wilc_spi.c | 9 ++++++---
> > drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +-
> > 4 files changed, 9 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
> > index d1eedfb..04337c7 100644
> > --- a/drivers/staging/wilc1000/host_interface.c
> > +++ b/drivers/staging/wilc1000/host_interface.c
> > @@ -3352,7 +3352,7 @@ static s32 host_int_get_assoc_res_info(struct wilc_vif *vif,
> > PRINT_ER("Failed to send association response config packet\n");
> > return -EINVAL;
> > }
> > -
> > +
> > *pu32RcvdAssocRespInfoLen = wid.size;
> > return result;
> > }
> > diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c
> > index 21f35d7..9fcb497 100644
> > --- a/drivers/staging/wilc1000/linux_mon.c
> > +++ b/drivers/staging/wilc1000/linux_mon.c
> > @@ -302,7 +302,7 @@ struct net_device *WILC_WFI_init_mon_interface(const char *name, struct net_devi
> > struct WILC_WFI_mon_priv *priv;
> >
> > /*If monitor interface is already initialized, return it*/
> > - if (wilc_wfi_mon)
> > + if (wilc_wfi_mon)
> > return wilc_wfi_mon;
> >
> > wilc_wfi_mon = alloc_etherdev(sizeof(struct WILC_WFI_mon_priv));
> > diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c
> > index 2928712..339956e 100644
> > --- a/drivers/staging/wilc1000/wilc_spi.c
> > +++ b/drivers/staging/wilc1000/wilc_spi.c
> > @@ -514,7 +514,8 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 adr, u8 *b, u32 sz,
> > crc[0] = rb[rix++];
> > crc[1] = rb[rix++];
> > } else {
> > - dev_err(&spi->dev,"buffer overrun when reading crc.\n");
> > + dev_err(&spi->dev,
> > + "buffer overrun when reading crc.\n");
>
> That change is not ok, leave it as-is.
>
> > result = N_FAIL;
> > return result;
> > }
> > @@ -680,7 +681,8 @@ static int spi_data_write(struct wilc *wilc, u8 *b, u32 sz)
> > **/
> > if (!g_spi.crc_off) {
> > if (wilc_spi_tx(wilc, crc, 2)) {
> > - dev_err(&spi->dev,"Failed data block crc write, bus error...\n");
> > + dev_err(&spi->dev,
> > + "Failed data block crc write, bus error...\n");
>
> Same here.
>
> > result = N_FAIL;
> > break;
> > }
> > @@ -1074,7 +1076,8 @@ static int wilc_spi_clear_int_ext(struct wilc *wilc, u32 val)
> > ret = wilc_spi_write_reg(wilc,
> > WILC_VMM_CORE_CTL, 1);
> > if (!ret) {
> > - dev_err(&spi->dev,"fail write reg vmm_core_ctl...\n");
> > + dev_err(&spi->dev,
> > + "fail write reg vmm_core_ctl...\n");
>
> Same here.
>
>
>
> > goto _fail_;
> > }
> > }
> > diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> > index 81a2ee9..46c6e32 100644
> > --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> > +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> > @@ -2126,7 +2126,7 @@ static int start_ap(struct wiphy *wiphy, struct net_device *dev,
> >
> > priv = wiphy_priv(wiphy);
> > vif = netdev_priv(dev);
> > - wl = vif ->wilc;
> > + wl = vif->wilc;
>
> That's just odd. The original code compiles?
>
> thanks,
>
> greg k-h
Yes the original code compiles. I used 'make -j2' and also 'make
drivers/staging/wilc1000'. The latter produced the .o files fine.
I will break down the patch as you suggested.
Thanks,
Eva
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Outreachy kernel] [PATCH v2 1/2] staging: wilc1000: Remove whitespace checkpatch errors
2016-02-16 7:30 ` Eva Rachel Retuya
@ 2016-02-16 9:52 ` Julia Lawall
0 siblings, 0 replies; 6+ messages in thread
From: Julia Lawall @ 2016-02-16 9:52 UTC (permalink / raw)
To: Eva Rachel Retuya; +Cc: Greg KH, outreachy-kernel
> > > priv = wiphy_priv(wiphy);
> > > vif = netdev_priv(dev);
> > > - wl = vif ->wilc;
> > > + wl = vif->wilc;
> >
> > That's just odd. The original code compiles?
> >
> > thanks,
> >
> > greg k-h
>
> Yes the original code compiles. I used 'make -j2' and also 'make
> drivers/staging/wilc1000'. The latter produced the .o files fine.
The compiler doesn't care about spaces around ->. Newlines are also
possible,
julia
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-02-16 9:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-15 5:34 [PATCH v2 0/2] staging: wilc1000: fix checkpatch errors Eva Rachel Retuya
2016-02-15 5:34 ` [PATCH v2 1/2] staging: wilc1000: Remove whitespace " Eva Rachel Retuya
2016-02-16 2:19 ` [Outreachy kernel] " Greg KH
2016-02-16 7:30 ` Eva Rachel Retuya
2016-02-16 9:52 ` Julia Lawall
2016-02-15 5:34 ` [PATCH v2 2/2] staging: wilc1000: Remove initialization of static variables Eva Rachel Retuya
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.