Re: [PATCH 0/5] staging: rtl8712: Fixed Multiple FSF address checkpatch warnings

2016-03-20 Thread Roger H Newell
On Sun, Mar 20, 2016 at 1:28 PM, Parth Sane  wrote:
> *** BLURB HERE ***
>
> Parth Sane (5):
>   staging: rtl8712: Fixed FSF address warning in basic_types.h
>   staging: rtl8712: Fixed FSF address warning in drv_types.h
>   staging: rtl9712: Fixed FSF address warning in ethernet.h
>   staging: rtl9712: Fixed FSF address warning in hal_init.c
>   staging: rtl9712: Fixed FSF address warning in ieee80211.c
>
>  drivers/staging/rtl8712/basic_types.h | 4 
>  drivers/staging/rtl8712/drv_types.h   | 4 
>  drivers/staging/rtl8712/ethernet.h| 4 
>  drivers/staging/rtl8712/hal_init.c| 4 
>  drivers/staging/rtl8712/ieee80211.c   | 4 
>  5 files changed, 20 deletions(-)
>
> --
> 1.9.1
>
> ___
> devel mailing list
> de...@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

It looks like all the patches in this set do not contain a commit log
in the body. It's up to the maintainer but I'm fairly certain they
won't be accepted without a body.


On Sun, Mar 20, 2016 at 1:32 PM, Parth Sane  wrote:
> Fixed Multiple FSF address checkpatch warnings to conform to kernel coding 
> style.
>
> Parth Sane (5):
>   staging: rtl8712: Fixed FSF address warning in basic_types.h
>   staging: rtl8712: Fixed FSF address warning in drv_types.h
>   staging: rtl9712: Fixed FSF address warning in ethernet.h
>   staging: rtl9712: Fixed FSF address warning in hal_init.c
>   staging: rtl9712: Fixed FSF address warning in ieee80211.c
>
>  drivers/staging/rtl8712/basic_types.h | 4 
>  drivers/staging/rtl8712/drv_types.h   | 4 
>  drivers/staging/rtl8712/ethernet.h| 4 
>  drivers/staging/rtl8712/hal_init.c| 4 
>  drivers/staging/rtl8712/ieee80211.c   | 4 
>  5 files changed, 20 deletions(-)
>
> --
> 1.9.1
>
> ___
> devel mailing list
> de...@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: netlogic: removed 1 multiple assignment checkpatch warning

2016-03-19 Thread Roger H Newell
On Sat, Mar 19, 2016 at 2:04 PM, Parth Sane  wrote:
> Hi,
> I haven’t received any feedback as to whether my patch has been accepted. 
> Would request someone to kindly help me out. Maybe you could weigh in here 
> Greg?
> Regards,
> Parth Sane
>> On 15-Mar-2016, at 10:16 PM, laerdevstud...@gmail.com wrote:
>>
>> From: Parth Sane 
>>
>> Fixed multiple assignment checkpatch warning by rearranging code.
>>
>> Signed-off-by: Parth Sane 
>>
>> ---
>> drivers/staging/netlogic/platform_net.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/staging/netlogic/platform_net.c 
>> b/drivers/staging/netlogic/platform_net.c
>> index 7806c2b..daee1b2 100644
>> --- a/drivers/staging/netlogic/platform_net.c
>> +++ b/drivers/staging/netlogic/platform_net.c
>> @@ -86,7 +86,8 @@ static void xlr_resource_init(struct resource *res, int 
>> offset, int irq)
>>
>>   res++;
>>   res->name = "gmac";
>> - res->start = res->end = irq;
>> + res->end = irq;
>> + res->start = res->end;
>>   res->flags = IORESOURCE_IRQ;
>> }
>>
>> --
>> 2.1.4
>>
>
>
> ___
> devel mailing list
> de...@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
>

This patch is only 4 days old. It's likely in Gregs queue and you just
have to wait a bit longer.  I don't think you need the From: line in
the body of the patch. The Signed-off-by: should suffice.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/2] staging: wilc1000: Replaced comparison to NULL statements

2016-03-19 Thread Roger H. Newell
This patch corrects checks generated by checkpatch.pl by
replacing comparison to null statements with equivalent
statements in the form "x" or "!x"

Signed-off-by: Roger H. Newell 
---
 drivers/staging/wilc1000/host_interface.c | 2 +-
 drivers/staging/wilc1000/wilc_wlan_cfg.c  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 0a922c7..5c0125a 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1647,7 +1647,7 @@ static int Handle_Key(struct wilc_vif *vif,
up(&hif_drv->sem_test_key_block);
} else if (pstrHostIFkeyAttr->action & ADDKEY) {
pu8keybuf = kzalloc(RX_MIC_KEY_MSG_LEN, GFP_KERNEL);
-   if (pu8keybuf == NULL) {
+   if (!pu8keybuf) {
ret = -ENOMEM;
goto _WPARxGtk_end_case_;
}
diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.c 
b/drivers/staging/wilc1000/wilc_wlan_cfg.c
index b9711ca..926fc16 100644
--- a/drivers/staging/wilc1000/wilc_wlan_cfg.c
+++ b/drivers/staging/wilc1000/wilc_wlan_cfg.c
@@ -230,7 +230,7 @@ static int wilc_wlan_cfg_set_str(u8 *frame, u32 offset, u16 
id, u8 *str, u32 siz
buf[1] = (u8)(id >> 8);
buf[2] = (u8)size;
 
-   if ((str != NULL) && (size != 0))
+   if ((str) && (size != 0))
memcpy(&buf[3], str, size);
 
return (size + 3);
@@ -251,7 +251,7 @@ static int wilc_wlan_cfg_set_bin(u8 *frame, u32 offset, u16 
id, u8 *b, u32 size)
buf[2] = (u8)size;
buf[3] = (u8)(size >> 8);
 
-   if ((b != NULL) && (size != 0)) {
+   if ((b) && (size != 0)) {
memcpy(&buf[4], b, size);
for (i = 0; i < size; i++)
checksum += buf[i + 4];
-- 
2.5.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/2] staging: wilc1000: Removed braces from single block statements

2016-03-19 Thread Roger H. Newell
This patch corrects warnings generated by checkpatch.pl by
removing braces from single block statements.

Signed-ff-by: Roger H. Newell 
---
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 31 +--
 drivers/staging/wilc1000/wilc_wlan_cfg.c  |  3 +--
 2 files changed, 13 insertions(+), 21 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index b76622d..c360797 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -558,11 +558,11 @@ static void CfgConnectResult(enum conn_event 
enuConnDisconnEvent,
 
if (!pstrWFIDrv->p2p_connect)
wlan_channel = INVALID_CHANNEL;
-   if ((pstrWFIDrv->IFC_UP) && (dev == wl->vif[1]->ndev)) {
+   if ((pstrWFIDrv->IFC_UP) && (dev == wl->vif[1]->ndev))
pstrDisconnectNotifInfo->reason = 3;
-   } else if ((!pstrWFIDrv->IFC_UP) && (dev == wl->vif[1]->ndev)) {
+   else if ((!pstrWFIDrv->IFC_UP) && (dev == wl->vif[1]->ndev))
pstrDisconnectNotifInfo->reason = 1;
-   }
+
cfg80211_disconnected(dev, pstrDisconnectNotifInfo->reason, 
pstrDisconnectNotifInfo->ie,
  pstrDisconnectNotifInfo->ie_len, false,
  GFP_KERNEL);
@@ -739,18 +739,15 @@ static int connect(struct wiphy *wiphy, struct net_device 
*dev,
wilc_add_wep_key_bss_sta(vif, sme->key, sme->key_len,
 sme->key_idx);
} else if (sme->crypto.wpa_versions & NL80211_WPA_VERSION_2)   {
-   if (sme->crypto.cipher_group == WLAN_CIPHER_SUITE_TKIP) 
{
+   if (sme->crypto.cipher_group == WLAN_CIPHER_SUITE_TKIP)
u8security = ENCRYPT_ENABLED | WPA2 | TKIP;
-   } else {
+   else
u8security = ENCRYPT_ENABLED | WPA2 | AES;
-   }
} else if (sme->crypto.wpa_versions & NL80211_WPA_VERSION_1)   {
-   if (sme->crypto.cipher_group == WLAN_CIPHER_SUITE_TKIP) 
{
+   if (sme->crypto.cipher_group == WLAN_CIPHER_SUITE_TKIP)
u8security = ENCRYPT_ENABLED | WPA | TKIP;
-   } else {
+   else
u8security = ENCRYPT_ENABLED | WPA | AES;
-   }
-
} else {
s32Error = -ENOTSUPP;
netdev_err(dev, "Not supported cipher\n");
@@ -762,11 +759,10 @@ static int connect(struct wiphy *wiphy, struct net_device 
*dev,
if ((sme->crypto.wpa_versions & NL80211_WPA_VERSION_1)
|| (sme->crypto.wpa_versions & NL80211_WPA_VERSION_2)) {
for (i = 0; i < sme->crypto.n_ciphers_pairwise; i++) {
-   if (sme->crypto.ciphers_pairwise[i] == 
WLAN_CIPHER_SUITE_TKIP) {
+   if (sme->crypto.ciphers_pairwise[i] == 
WLAN_CIPHER_SUITE_TKIP)
u8security = u8security | TKIP;
-   } else {
+   else
u8security = u8security | AES;
-   }
}
}
 
@@ -1355,9 +1351,8 @@ static void WILC_WFI_CfgParseRxAction(u8 *buf, u32 len)
u8 channel_list_attr_index = 0;
 
while (index < len) {
-   if (buf[index] == GO_INTENT_ATTR_ID) {
+   if (buf[index] == GO_INTENT_ATTR_ID)
buf[index + 3] = (buf[index + 3]  & 0x01) | (0x00 << 1);
-   }
 
if (buf[index] ==  CHANLIST_ATTR_ID)
channel_list_attr_index = index;
@@ -1369,9 +1364,8 @@ static void WILC_WFI_CfgParseRxAction(u8 *buf, u32 len)
if (channel_list_attr_index) {
for (i = channel_list_attr_index + 3; i < 
((channel_list_attr_index + 3) + buf[channel_list_attr_index + 1]); i++) {
if (buf[i] == 0x51) {
-   for (j = i + 2; j < ((i + 2) + buf[i + 
1]); j++) {
+   for (j = i + 2; j < ((i + 2) + buf[i + 
1]); j++)
buf[j] = wlan_channel;
-   }
break;
}
}
@@ -1409,9 +1403,8 @@ static void WILC_WFI_CfgParseTxAction(u8 *buf, u32 len, 
bool bOperChan, u8 iftyp

Re: [PATCH] staging: xgifb: Fix comment style

2016-02-21 Thread Roger H Newell
Hello:

I think you need to make sure your staging-testing tree is current
before creating a patch.

git checkout staging-testing && git fetch origin
git checkout my-branch && git rebase origin/staging-testing

As I understand it any patch you create after those commands will be
on-top of the current state of Gregs tree and should apply.

Regards:
Roger H. Newell

On Sun, Feb 21, 2016 at 5:29 AM, Bo YU  wrote:
> Hello,
>
> On Sat, Feb 20, 2016 at 03:38:15PM -0800, Kroah-Hartman wrote:
>>On Wed, Feb 17, 2016 at 02:53:34PM +0800, Bo YU wrote:
>>> Fix comments to use trailing */ on separate lines.
>>>
>>> Signed-off-by: YU BO 
>>> ---
>>>   drivers/staging/xgifb/vb_init.c |   10 +-
>>>   1 file changed, 5 insertions(+), 5 deletions(-)
>>
>>Patch doesn't apply :(
> I don't know that whether i am doing wrong something with git.
> Because when i run `git am the-codingfixed-patch` ,it reports error.
> But run `patch -p1 the-codingfixed-patch` it is ok.
>
> Perhaps i am wrong with others.
>
> Could you tell me a little hit?
>
> Sorry for the noisy.:)
> --
> Best Regards
> ___
> devel mailing list
> de...@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/2] staging: wilc1000: Removed braces from single block statements

2016-02-16 Thread Roger H. Newell
This patch corrects warnings generated by checkpatch.pl by
removing braces from single block statements.

Signed-off-by: Roger H. Newell 
---
 drivers/staging/wilc1000/wilc_spi.c | 25 +
 1 file changed, 9 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_spi.c 
b/drivers/staging/wilc1000/wilc_spi.c
index d03e03a..cfec982 100644
--- a/drivers/staging/wilc1000/wilc_spi.c
+++ b/drivers/staging/wilc1000/wilc_spi.c
@@ -380,9 +380,8 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 
adr, u8 *b, u32 sz,
break;
}
 
-   if (result != N_OK) {
+   if (result != N_OK)
return result;
-   }
 
if (!g_spi.crc_off)
wb[len - 1] = (crc7(0x7f, (const u8 *)&wb[0], len - 1)) << 1;
@@ -419,9 +418,8 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 
adr, u8 *b, u32 sz,
return result;
}
/* zero spi write buffers. */
-   for (wix = len; wix < len2; wix++) {
+   for (wix = len; wix < len2; wix++)
wb[wix] = 0;
-   }
rix = len;
 
if (wilc_spi_tx_rx(wilc, wb, rb, len2)) {
@@ -523,9 +521,8 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 
adr, u8 *b, u32 sz,
int ix;
 
/* some data may be read in response to dummy bytes. */
-   for (ix = 0; (rix < len2) && (ix < sz); ) {
+   for (ix = 0; (rix < len2) && (ix < sz); )
b[ix++] = rb[rix++];
-   }
 
sz -= ix;
 
@@ -711,9 +708,8 @@ static int spi_internal_write(struct wilc *wilc, u32 adr, 
u32 dat)
dat = cpu_to_le32(dat);
result = spi_cmd_complete(wilc, CMD_INTERNAL_WRITE, adr, (u8 *)&dat, 4,
  0);
-   if (result != N_OK) {
+   if (result != N_OK)
dev_err(&spi->dev, "Failed internal write cmd...\n");
-   }
 
return result;
 }
@@ -756,9 +752,8 @@ static int wilc_spi_write_reg(struct wilc *wilc, u32 addr, 
u32 data)
}
 
result = spi_cmd_complete(wilc, cmd, addr, (u8 *)&data, 4, clockless);
-   if (result != N_OK) {
+   if (result != N_OK)
dev_err(&spi->dev, "Failed cmd, write reg (%08x)...\n", addr);
-   }
 
return result;
 }
@@ -786,9 +781,8 @@ static int wilc_spi_write(struct wilc *wilc, u32 addr, u8 
*buf, u32 size)
 *  Data
 **/
result = spi_data_write(wilc, buf, size);
-   if (result != N_OK) {
+   if (result != N_OK)
dev_err(&spi->dev, "Failed block data write...\n");
-   }
 
return 1;
 }
@@ -1124,9 +1118,9 @@ static int wilc_spi_sync_ext(struct wilc *wilc, int nint)
return 0;
}
 
-   for (i = 0; (i < 5) && (nint > 0); i++, nint--) {
+   for (i = 0; (i < 5) && (nint > 0); i++, nint--)
reg |= (BIT((27 + i)));
-   }
+
ret = wilc_spi_write_reg(wilc, WILC_INTR_ENABLE, reg);
if (!ret) {
dev_err(&spi->dev, "Failed write reg (%08x)...\n",
@@ -1141,9 +1135,8 @@ static int wilc_spi_sync_ext(struct wilc *wilc, int nint)
return 0;
}
 
-   for (i = 0; (i < 3) && (nint > 0); i++, nint--) {
+   for (i = 0; (i < 3) && (nint > 0); i++, nint--)
reg |= BIT(i);
-   }
 
ret = wilc_spi_read_reg(wilc, WILC_INTR2_ENABLE, ®);
if (!ret) {
-- 
2.5.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/2] staging: wilc1000: Whitespaces removed from function call

2016-02-16 Thread Roger H. Newell
This patch corrects errors generated by checkpatch.pl by
removing whitespace between parameters passed to dev_err()

Signed-off-by: Roger H. Newell 
---
 drivers/staging/wilc1000/wilc_spi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_spi.c 
b/drivers/staging/wilc1000/wilc_spi.c
index 2928712..d03e03a 100644
--- a/drivers/staging/wilc1000/wilc_spi.c
+++ b/drivers/staging/wilc1000/wilc_spi.c
@@ -514,7 +514,7 @@ 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 +680,7 @@ 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 +1074,7 @@ 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_;
}
}
-- 
2.5.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/2] staging: wilc1000: codestyle fix removes unnecessary braces

2016-02-14 Thread Roger H. Newell
This patch removes braces {} for single block statements as prescribed
by checkpatch.pl

Signed-off-by: Roger H. Newell 
---
 drivers/staging/wilc1000/wilc_spi.c | 25 +
 1 file changed, 9 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_spi.c 
b/drivers/staging/wilc1000/wilc_spi.c
index d03e03a..cfec982 100644
--- a/drivers/staging/wilc1000/wilc_spi.c
+++ b/drivers/staging/wilc1000/wilc_spi.c
@@ -380,9 +380,8 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 
adr, u8 *b, u32 sz,
break;
}
 
-   if (result != N_OK) {
+   if (result != N_OK)
return result;
-   }
 
if (!g_spi.crc_off)
wb[len - 1] = (crc7(0x7f, (const u8 *)&wb[0], len - 1)) << 1;
@@ -419,9 +418,8 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 
adr, u8 *b, u32 sz,
return result;
}
/* zero spi write buffers. */
-   for (wix = len; wix < len2; wix++) {
+   for (wix = len; wix < len2; wix++)
wb[wix] = 0;
-   }
rix = len;
 
if (wilc_spi_tx_rx(wilc, wb, rb, len2)) {
@@ -523,9 +521,8 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 
adr, u8 *b, u32 sz,
int ix;
 
/* some data may be read in response to dummy bytes. */
-   for (ix = 0; (rix < len2) && (ix < sz); ) {
+   for (ix = 0; (rix < len2) && (ix < sz); )
b[ix++] = rb[rix++];
-   }
 
sz -= ix;
 
@@ -711,9 +708,8 @@ static int spi_internal_write(struct wilc *wilc, u32 adr, 
u32 dat)
dat = cpu_to_le32(dat);
result = spi_cmd_complete(wilc, CMD_INTERNAL_WRITE, adr, (u8 *)&dat, 4,
  0);
-   if (result != N_OK) {
+   if (result != N_OK)
dev_err(&spi->dev, "Failed internal write cmd...\n");
-   }
 
return result;
 }
@@ -756,9 +752,8 @@ static int wilc_spi_write_reg(struct wilc *wilc, u32 addr, 
u32 data)
}
 
result = spi_cmd_complete(wilc, cmd, addr, (u8 *)&data, 4, clockless);
-   if (result != N_OK) {
+   if (result != N_OK)
dev_err(&spi->dev, "Failed cmd, write reg (%08x)...\n", addr);
-   }
 
return result;
 }
@@ -786,9 +781,8 @@ static int wilc_spi_write(struct wilc *wilc, u32 addr, u8 
*buf, u32 size)
 *  Data
 **/
result = spi_data_write(wilc, buf, size);
-   if (result != N_OK) {
+   if (result != N_OK)
dev_err(&spi->dev, "Failed block data write...\n");
-   }
 
return 1;
 }
@@ -1124,9 +1118,9 @@ static int wilc_spi_sync_ext(struct wilc *wilc, int nint)
return 0;
}
 
-   for (i = 0; (i < 5) && (nint > 0); i++, nint--) {
+   for (i = 0; (i < 5) && (nint > 0); i++, nint--)
reg |= (BIT((27 + i)));
-   }
+
ret = wilc_spi_write_reg(wilc, WILC_INTR_ENABLE, reg);
if (!ret) {
dev_err(&spi->dev, "Failed write reg (%08x)...\n",
@@ -1141,9 +1135,8 @@ static int wilc_spi_sync_ext(struct wilc *wilc, int nint)
return 0;
}
 
-   for (i = 0; (i < 3) && (nint > 0); i++, nint--) {
+   for (i = 0; (i < 3) && (nint > 0); i++, nint--)
reg |= BIT(i);
-   }
 
ret = wilc_spi_read_reg(wilc, WILC_INTR2_ENABLE, ®);
if (!ret) {
-- 
2.5.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/2] staging: wilc1000: codestyle fix removes unnecessary braces

2016-02-14 Thread Roger H. Newell
This patch removes braces {} for single block statements as prescribed
by checkpatch.pl

Signed-off-by: Roger H. Newell 
---
 drivers/staging/wilc1000/wilc_spi.c | 25 +
 1 file changed, 9 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_spi.c 
b/drivers/staging/wilc1000/wilc_spi.c
index d03e03a..cfec982 100644
--- a/drivers/staging/wilc1000/wilc_spi.c
+++ b/drivers/staging/wilc1000/wilc_spi.c
@@ -380,9 +380,8 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 
adr, u8 *b, u32 sz,
break;
}
 
-   if (result != N_OK) {
+   if (result != N_OK)
return result;
-   }
 
if (!g_spi.crc_off)
wb[len - 1] = (crc7(0x7f, (const u8 *)&wb[0], len - 1)) << 1;
@@ -419,9 +418,8 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 
adr, u8 *b, u32 sz,
return result;
}
/* zero spi write buffers. */
-   for (wix = len; wix < len2; wix++) {
+   for (wix = len; wix < len2; wix++)
wb[wix] = 0;
-   }
rix = len;
 
if (wilc_spi_tx_rx(wilc, wb, rb, len2)) {
@@ -523,9 +521,8 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 
adr, u8 *b, u32 sz,
int ix;
 
/* some data may be read in response to dummy bytes. */
-   for (ix = 0; (rix < len2) && (ix < sz); ) {
+   for (ix = 0; (rix < len2) && (ix < sz); )
b[ix++] = rb[rix++];
-   }
 
sz -= ix;
 
@@ -711,9 +708,8 @@ static int spi_internal_write(struct wilc *wilc, u32 adr, 
u32 dat)
dat = cpu_to_le32(dat);
result = spi_cmd_complete(wilc, CMD_INTERNAL_WRITE, adr, (u8 *)&dat, 4,
  0);
-   if (result != N_OK) {
+   if (result != N_OK)
dev_err(&spi->dev, "Failed internal write cmd...\n");
-   }
 
return result;
 }
@@ -756,9 +752,8 @@ static int wilc_spi_write_reg(struct wilc *wilc, u32 addr, 
u32 data)
}
 
result = spi_cmd_complete(wilc, cmd, addr, (u8 *)&data, 4, clockless);
-   if (result != N_OK) {
+   if (result != N_OK)
dev_err(&spi->dev, "Failed cmd, write reg (%08x)...\n", addr);
-   }
 
return result;
 }
@@ -786,9 +781,8 @@ static int wilc_spi_write(struct wilc *wilc, u32 addr, u8 
*buf, u32 size)
 *  Data
 **/
result = spi_data_write(wilc, buf, size);
-   if (result != N_OK) {
+   if (result != N_OK)
dev_err(&spi->dev, "Failed block data write...\n");
-   }
 
return 1;
 }
@@ -1124,9 +1118,9 @@ static int wilc_spi_sync_ext(struct wilc *wilc, int nint)
return 0;
}
 
-   for (i = 0; (i < 5) && (nint > 0); i++, nint--) {
+   for (i = 0; (i < 5) && (nint > 0); i++, nint--)
reg |= (BIT((27 + i)));
-   }
+
ret = wilc_spi_write_reg(wilc, WILC_INTR_ENABLE, reg);
if (!ret) {
dev_err(&spi->dev, "Failed write reg (%08x)...\n",
@@ -1141,9 +1135,8 @@ static int wilc_spi_sync_ext(struct wilc *wilc, int nint)
return 0;
}
 
-   for (i = 0; (i < 3) && (nint > 0); i++, nint--) {
+   for (i = 0; (i < 3) && (nint > 0); i++, nint--)
reg |= BIT(i);
-   }
 
ret = wilc_spi_read_reg(wilc, WILC_INTR2_ENABLE, ®);
if (!ret) {
-- 
2.5.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/2] staging: wilc1000: codestyle fix removes unnecessary spaces

2016-02-14 Thread Roger H. Newell
This patch corrects spacing errors generated by checkpatch.pl

Signed-off-by: Roger H. Newell 
---
 drivers/staging/wilc1000/wilc_spi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_spi.c 
b/drivers/staging/wilc1000/wilc_spi.c
index 2928712..d03e03a 100644
--- a/drivers/staging/wilc1000/wilc_spi.c
+++ b/drivers/staging/wilc1000/wilc_spi.c
@@ -514,7 +514,7 @@ 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 +680,7 @@ 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 +1074,7 @@ 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_;
}
}
-- 
2.5.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: wilc1000: codestyle corrections

2016-02-12 Thread Roger H. Newell
This patch removes braces {} for single block statements as prescribed
by checkpatch.pl

Signed-off-by: Roger H. Newell 
---
 drivers/staging/wilc1000/wilc_spi.c | 25 +
 1 file changed, 9 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_spi.c 
b/drivers/staging/wilc1000/wilc_spi.c
index d03e03a..cfec982 100644
--- a/drivers/staging/wilc1000/wilc_spi.c
+++ b/drivers/staging/wilc1000/wilc_spi.c
@@ -380,9 +380,8 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 
adr, u8 *b, u32 sz,
break;
}
 
-   if (result != N_OK) {
+   if (result != N_OK)
return result;
-   }
 
if (!g_spi.crc_off)
wb[len - 1] = (crc7(0x7f, (const u8 *)&wb[0], len - 1)) << 1;
@@ -419,9 +418,8 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 
adr, u8 *b, u32 sz,
return result;
}
/* zero spi write buffers. */
-   for (wix = len; wix < len2; wix++) {
+   for (wix = len; wix < len2; wix++)
wb[wix] = 0;
-   }
rix = len;
 
if (wilc_spi_tx_rx(wilc, wb, rb, len2)) {
@@ -523,9 +521,8 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 
adr, u8 *b, u32 sz,
int ix;
 
/* some data may be read in response to dummy bytes. */
-   for (ix = 0; (rix < len2) && (ix < sz); ) {
+   for (ix = 0; (rix < len2) && (ix < sz); )
b[ix++] = rb[rix++];
-   }
 
sz -= ix;
 
@@ -711,9 +708,8 @@ static int spi_internal_write(struct wilc *wilc, u32 adr, 
u32 dat)
dat = cpu_to_le32(dat);
result = spi_cmd_complete(wilc, CMD_INTERNAL_WRITE, adr, (u8 *)&dat, 4,
  0);
-   if (result != N_OK) {
+   if (result != N_OK)
dev_err(&spi->dev, "Failed internal write cmd...\n");
-   }
 
return result;
 }
@@ -756,9 +752,8 @@ static int wilc_spi_write_reg(struct wilc *wilc, u32 addr, 
u32 data)
}
 
result = spi_cmd_complete(wilc, cmd, addr, (u8 *)&data, 4, clockless);
-   if (result != N_OK) {
+   if (result != N_OK)
dev_err(&spi->dev, "Failed cmd, write reg (%08x)...\n", addr);
-   }
 
return result;
 }
@@ -786,9 +781,8 @@ static int wilc_spi_write(struct wilc *wilc, u32 addr, u8 
*buf, u32 size)
 *  Data
 **/
result = spi_data_write(wilc, buf, size);
-   if (result != N_OK) {
+   if (result != N_OK)
dev_err(&spi->dev, "Failed block data write...\n");
-   }
 
return 1;
 }
@@ -1124,9 +1118,9 @@ static int wilc_spi_sync_ext(struct wilc *wilc, int nint)
return 0;
}
 
-   for (i = 0; (i < 5) && (nint > 0); i++, nint--) {
+   for (i = 0; (i < 5) && (nint > 0); i++, nint--)
reg |= (BIT((27 + i)));
-   }
+
ret = wilc_spi_write_reg(wilc, WILC_INTR_ENABLE, reg);
if (!ret) {
dev_err(&spi->dev, "Failed write reg (%08x)...\n",
@@ -1141,9 +1135,8 @@ static int wilc_spi_sync_ext(struct wilc *wilc, int nint)
return 0;
}
 
-   for (i = 0; (i < 3) && (nint > 0); i++, nint--) {
+   for (i = 0; (i < 3) && (nint > 0); i++, nint--)
reg |= BIT(i);
-   }
 
ret = wilc_spi_read_reg(wilc, WILC_INTR2_ENABLE, ®);
if (!ret) {
-- 
2.5.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: wilc1000: codestyle corrections

2016-02-12 Thread Roger H. Newell
This patch corrects spacing errors generated by checkpatch.pl

Signed-off-by: Roger H. Newell 
---
 drivers/staging/wilc1000/wilc_spi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_spi.c 
b/drivers/staging/wilc1000/wilc_spi.c
index 2928712..d03e03a 100644
--- a/drivers/staging/wilc1000/wilc_spi.c
+++ b/drivers/staging/wilc1000/wilc_spi.c
@@ -514,7 +514,7 @@ 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 +680,7 @@ 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 +1074,7 @@ 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_;
}
}
-- 
2.5.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: wilc1000: spelling corrections

2016-02-11 Thread Roger H. Newell
This patch fixes spelling warnings generated by checkpatch.pl

Signed-off-by: Roger H. Newell 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index c42286a..5570707 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -543,7 +543,7 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
wid_list[wid_cnt].size = sizeof(char);
hif_drv->cfg_values.power_mgmt_mode = 
(u8)cfg_param_attr->cfg_attr_info.power_mgmt_mode;
} else {
-   PRINT_ER("Invalide power mode\n");
+   PRINT_ER("Invalid power mode\n");
result = -EINVAL;
goto ERRORHANDLER;
}
@@ -881,7 +881,7 @@ static s32 Handle_Scan(struct wilc_vif *vif,
  wilc_get_vif_idx(vif));
 
if (result)
-   PRINT_ER("Failed to send scan paramters config packet\n");
+   PRINT_ER("Failed to send scan parameters config packet\n");
 
 ERRORHANDLER:
if (result) {
@@ -2081,7 +2081,7 @@ static s32 Handle_GetStatistics(struct wilc_vif *vif,
  wilc_get_vif_idx(vif));
 
if (result)
-   PRINT_ER("Failed to send scan paramters config packet\n");
+   PRINT_ER("Failed to send scan parameters config packet\n");
 
if (pstrStatistics->link_speed > TCP_ACK_FILTER_LINK_SPEED_THRESH &&
pstrStatistics->link_speed != DEFAULT_LINK_SPEED)
-- 
2.5.0

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel