Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1252891 > unrolled thread
| Started by | Punit Vara <punitvara@gmail.com> |
|---|---|
| First post | 2015-10-21 17:00 +0200 |
| Last post | 2015-10-21 17:00 +0200 |
| Articles | 20 on this page of 24 — 5 participants |
Back to article view | Back to linux.kernel
[PATCH 00/15] Fix warnings reported by coccicheck Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
[PATCH 08/15] net: wireless: simplify return flow for usb_control_msg Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
Re: [PATCH 08/15] net: wireless: simplify return flow for usb_control_msg Jiri Slaby <jslaby@suse.cz> - 2015-10-21 17:10 +0200
Re: [PATCH 08/15] net: wireless: simplify return flow for usb_control_msg punit vara <punitvara@gmail.com> - 2015-10-21 20:10 +0200
[PATCH 02/15] net: wireless: ath: Remove unnecessary semicolon Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
[PATCH 15/15] net: wireless: ath: Remove unneeded variable ret returning 0 Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
Re: [PATCH 15/15] net: wireless: ath: Remove unneeded variable ret returning 0 Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-10-21 23:50 +0200
Re: [PATCH 15/15] net: wireless: ath: Remove unneeded variable ret returning 0 punit vara <punitvara@gmail.com> - 2015-10-22 20:30 +0200
[PATCH 09/15] net: wireless: simplify return flow for zd1201_setconfig16 Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
[PATCH 10/15] net: wireless: ath: simplify return flow for carl9170_regwrite_result() Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
[PATCH 03/15] net: wireless: ath: Remove unnecessary semicolon Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
[PATCH 14/15] net: wireless: ath: Remove unneeded variable ret returning 0 Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
[PATCH 12/15] net: wireless: brcm80211: Remove unneeded variable which return 0 Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
[PATCH 13/15] net: wireless: brcm80211: Remove unneeded variable ret_code returning 0 Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
Re: [PATCH 01/15] net: wireless: ath: use | instead of + for summing bitmasks Jiri Slaby <jirislaby@gmail.com> - 2015-10-21 17:00 +0200
[PATCH 05/15] net: wireless: ti: Return flow can be simplified for wl1271_cmd_interrogate Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
[PATCH 04/15] net: wireless: ipw2x00: use | instead of + for summing bitmasks Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
[PATCH 11/15] net: wireless: iwlegacy: Remove unneeded variable ret Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
Re: [PATCH 11/15] net: wireless: iwlegacy: Remove unneeded variable ret Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-10-21 23:50 +0200
[PATCH 01/15] net: wireless: ath: use | instead of + for summing bitmasks Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
Re: [PATCH 01/15] net: wireless: ath: use | instead of + for summing bitmasks Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-10-21 23:50 +0200
Re: [PATCH 01/15] net: wireless: ath: use | instead of + for summing bitmasks punit vara <punitvara@gmail.com> - 2015-10-22 20:30 +0200
[PATCH 06/15] net: wireless: rtwifi: Remove duplicated arguments to | Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
[PATCH 07/15] net: wireless: brcm80211: Remove duplicated arguments to | Punit Vara <punitvara@gmail.com> - 2015-10-21 17:00 +0200
Page 1 of 2 [1] 2 Next page →
| From | Punit Vara <punitvara@gmail.com> |
|---|---|
| Date | 2015-10-21 17:00 +0200 |
| Subject | [PATCH 00/15] Fix warnings reported by coccicheck |
| Message-ID | <qm31T-6dh-3@gated-at.bofh.it> |
Fix various warning reported by coccicheck:
make coccicheck M=drivers/net/wireless
Punit Vara (15):
net: wireless: ath: use | instead of + for summing bitmasks
net: wireless: ath: Remove unnecessary semicolon
net: wireless: ath: Remove unnecessary semicolon
net: wireless: ipw2x00: use | instead of + for summing bitmasks
net: wireless: ti: Return flow can be simplified for
wl1271_cmd_interrogate
net: wireless: rtwifi: Remove duplicated arguments to |
net: wireless: brcm80211: Remove duplicated arguments to |
net: wireless: simplify return flow for usb_msg_control
net: wireless: simplify return flow for zd1201_setconfig16
net: wireless: ath: simplify return flow for
carl9170_regwrite_result()
net: wireless: iwlegacy: Remove unneeded variable ret
net: wireless: brcm80211: Remove unneeded variable which return 0
net: wireless: brcm80211: Remove unneeded variable ret_code returning
0
net: wireless: ath: Remove unneeded variable ret returning 0
net: wireless: ath: Remove unneeded variable ret returning 0
drivers/net/wireless/at76c50x-usb.c | 5 +----
drivers/net/wireless/ath/ath10k/htt_rx.c | 2 +-
drivers/net/wireless/ath/ath10k/pci.c | 10 +++++-----
drivers/net/wireless/ath/ath10k/wmi.h | 2 +-
drivers/net/wireless/ath/ath5k/eeprom.c | 4 ++--
drivers/net/wireless/ath/carl9170/phy.c | 7 +------
drivers/net/wireless/ath/wcn36xx/main.c | 3 +--
drivers/net/wireless/brcm80211/brcmsmac/channel.c | 1 -
drivers/net/wireless/brcm80211/brcmsmac/main.c | 3 +--
drivers/net/wireless/brcm80211/brcmsmac/stf.c | 5 ++---
drivers/net/wireless/ipw2x00/libipw_rx.c | 4 ++--
drivers/net/wireless/iwlegacy/3945-mac.c | 5 +----
drivers/net/wireless/rtlwifi/debug.c | 6 +++---
drivers/net/wireless/ti/wlcore/acx.c | 6 +-----
drivers/net/wireless/zd1201.c | 6 +-----
15 files changed, 23 insertions(+), 46 deletions(-)
--
2.5.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Punit Vara <punitvara@gmail.com> |
|---|---|
| Date | 2015-10-21 17:00 +0200 |
| Subject | [PATCH 08/15] net: wireless: simplify return flow for usb_control_msg |
| Message-ID | <qm31T-6dh-5@gated-at.bofh.it> |
| In reply to | #1252891 |
This patch is to the at76c50x-usb.c file that fixes up warning
reported by coccicheck:
WARNING: end returns can be simplified if negative or 0 value
Prefer direct return value instead of writing 2-3 more sentence.
Signed-off-by: Punit Vara <punitvara@gmail.com>
---
drivers/net/wireless/at76c50x-usb.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c
index dab2513..09427f6 100644
--- a/drivers/net/wireless/at76c50x-usb.c
+++ b/drivers/net/wireless/at76c50x-usb.c
@@ -544,13 +544,10 @@ static void at76_ledtrig_tx_activity(void)
static int at76_remap(struct usb_device *udev)
{
int ret;
- ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x0a,
+ return usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x0a,
USB_TYPE_VENDOR | USB_DIR_OUT |
USB_RECIP_INTERFACE, 0, 0, NULL, 0,
USB_CTRL_GET_TIMEOUT);
- if (ret < 0)
- return ret;
- return 0;
}
static int at76_get_op_mode(struct usb_device *udev)
--
2.5.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Jiri Slaby <jslaby@suse.cz> |
|---|---|
| Date | 2015-10-21 17:10 +0200 |
| Subject | Re: [PATCH 08/15] net: wireless: simplify return flow for usb_control_msg |
| Message-ID | <qm3bA-6Fw-13@gated-at.bofh.it> |
| In reply to | #1252892 |
On 10/21/2015, 04:55 PM, Punit Vara wrote:
> @@ -544,13 +544,10 @@ static void at76_ledtrig_tx_activity(void)
> static int at76_remap(struct usb_device *udev)
> {
> int ret;
> - ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x0a,
> + return usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x0a,
> USB_TYPE_VENDOR | USB_DIR_OUT |
> USB_RECIP_INTERFACE, 0, 0, NULL, 0,
> USB_CTRL_GET_TIMEOUT);
> - if (ret < 0)
> - return ret;
> - return 0;
ret is now unused, right?
--
js
suse labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | punit vara <punitvara@gmail.com> |
|---|---|
| Date | 2015-10-21 20:10 +0200 |
| Subject | Re: [PATCH 08/15] net: wireless: simplify return flow for usb_control_msg |
| Message-ID | <qm5ZM-2ld-19@gated-at.bofh.it> |
| In reply to | #1252919 |
On Wed, Oct 21, 2015 at 8:30 PM, Jiri Slaby <jslaby@suse.cz> wrote:
> On 10/21/2015, 04:55 PM, Punit Vara wrote:
>> @@ -544,13 +544,10 @@ static void at76_ledtrig_tx_activity(void)
>> static int at76_remap(struct usb_device *udev)
>> {
>> int ret;
>> - ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x0a,
>> + return usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x0a,
>> USB_TYPE_VENDOR | USB_DIR_OUT |
>> USB_RECIP_INTERFACE, 0, 0, NULL, 0,
>> USB_CTRL_GET_TIMEOUT);
>> - if (ret < 0)
>> - return ret;
>> - return 0;
>
> ret is now unused, right?
>
> --
> js
> suse labs
Oppp..Sorry I have missed int ret to remove . I will resend the
updated patch soon
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Punit Vara <punitvara@gmail.com> |
|---|---|
| Date | 2015-10-21 17:00 +0200 |
| Subject | [PATCH 02/15] net: wireless: ath: Remove unnecessary semicolon |
| Message-ID | <qm31T-6dh-7@gated-at.bofh.it> |
| In reply to | #1252891 |
This patch is to the htt_rx.c that removes unneeded semicolon which is reported by coccicheck. Here semicolon just create empty statement so please remote it. Signed-off-by: Punit Vara <punitvara@gmail.com> --- drivers/net/wireless/ath/ath10k/htt_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index 1b7a043..002a633 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -2077,7 +2077,7 @@ void ath10k_htt_t2h_msg_handler(struct ath10k *ar, struct sk_buff *skb) ath10k_dbg_dump(ar, ATH10K_DBG_HTT_DUMP, NULL, "htt event: ", skb->data, skb->len); break; - }; + } /* Free the indication buffer */ dev_kfree_skb_any(skb); -- 2.5.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Punit Vara <punitvara@gmail.com> |
|---|---|
| Date | 2015-10-21 17:00 +0200 |
| Subject | [PATCH 15/15] net: wireless: ath: Remove unneeded variable ret returning 0 |
| Message-ID | <qm31T-6dh-9@gated-at.bofh.it> |
| In reply to | #1252891 |
This patch is to the ath5k/eeprom.c that fixes up warning caught by
coccicheck:
Unneeded variable: "ret". Return "0" on line 980
Remove unneeded variable ret created to return zero.
Signed-off-by: Punit Vara <punitvara@gmail.com>
---
drivers/net/wireless/ath/wcn36xx/main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
index 7c169ab..82982d5 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -935,7 +935,6 @@ static const struct ieee80211_ops wcn36xx_ops = {
static int wcn36xx_init_ieee80211(struct wcn36xx *wcn)
{
- int ret = 0;
static const u32 cipher_suites[] = {
WLAN_CIPHER_SUITE_WEP40,
@@ -977,7 +976,7 @@ static int wcn36xx_init_ieee80211(struct wcn36xx *wcn)
wcn->hw->sta_data_size = sizeof(struct wcn36xx_sta);
wcn->hw->vif_data_size = sizeof(struct wcn36xx_vif);
- return ret;
+ return 0;
}
static int wcn36xx_platform_get_resources(struct wcn36xx *wcn,
--
2.5.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> |
|---|---|
| Date | 2015-10-21 23:50 +0200 |
| Subject | Re: [PATCH 15/15] net: wireless: ath: Remove unneeded variable ret returning 0 |
| Message-ID | <qm9qF-7aO-1@gated-at.bofh.it> |
| In reply to | #1252894 |
On 10/21/2015 05:55 PM, Punit Vara wrote:
> This patch is to the ath5k/eeprom.c that fixes up warning caught by
> coccicheck:
>
> Unneeded variable: "ret". Return "0" on line 980
>
> Remove unneeded variable ret created to return zero.
>
> Signed-off-by: Punit Vara <punitvara@gmail.com>
> ---
> drivers/net/wireless/ath/wcn36xx/main.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
> index 7c169ab..82982d5 100644
> --- a/drivers/net/wireless/ath/wcn36xx/main.c
> +++ b/drivers/net/wireless/ath/wcn36xx/main.c
> @@ -935,7 +935,6 @@ static const struct ieee80211_ops wcn36xx_ops = {
>
> static int wcn36xx_init_ieee80211(struct wcn36xx *wcn)
> {
> - int ret = 0;
>
This empty line should be removed too.
> static const u32 cipher_suites[] = {
> WLAN_CIPHER_SUITE_WEP40,
[...]
MBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | punit vara <punitvara@gmail.com> |
|---|---|
| Date | 2015-10-22 20:30 +0200 |
| Subject | Re: [PATCH 15/15] net: wireless: ath: Remove unneeded variable ret returning 0 |
| Message-ID | <qmsMH-299-45@gated-at.bofh.it> |
| In reply to | #1253274 |
On Thu, Oct 22, 2015 at 3:16 AM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> On 10/21/2015 05:55 PM, Punit Vara wrote:
>
>> This patch is to the ath5k/eeprom.c that fixes up warning caught by
>> coccicheck:
>>
>> Unneeded variable: "ret". Return "0" on line 980
>>
>> Remove unneeded variable ret created to return zero.
>>
>> Signed-off-by: Punit Vara <punitvara@gmail.com>
>> ---
>> drivers/net/wireless/ath/wcn36xx/main.c | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/wcn36xx/main.c
>> b/drivers/net/wireless/ath/wcn36xx/main.c
>> index 7c169ab..82982d5 100644
>> --- a/drivers/net/wireless/ath/wcn36xx/main.c
>> +++ b/drivers/net/wireless/ath/wcn36xx/main.c
>> @@ -935,7 +935,6 @@ static const struct ieee80211_ops wcn36xx_ops = {
>>
>> static int wcn36xx_init_ieee80211(struct wcn36xx *wcn)
>> {
>> - int ret = 0;
>>
>
> This empty line should be removed too.
>
>> static const u32 cipher_suites[] = {
>> WLAN_CIPHER_SUITE_WEP40,
>
> [...]
>
> MBR, Sergei
>
I have resend this patch as you said Sergei . Thanks for feedback ..
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Punit Vara <punitvara@gmail.com> |
|---|---|
| Date | 2015-10-21 17:00 +0200 |
| Subject | [PATCH 09/15] net: wireless: simplify return flow for zd1201_setconfig16 |
| Message-ID | <qm31T-6dh-11@gated-at.bofh.it> |
| In reply to | #1252891 |
This patch is to the zd1201.c file that fixes up warning
reported by coccicheck:
WARNING: end returns can be simplified and declaration on line 1658 can
be dropped
Prefer direct return value instead of writing 2-3 more sentence.
Signed-off-by: Punit Vara <punitvara@gmail.com>
---
drivers/net/wireless/zd1201.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/net/wireless/zd1201.c b/drivers/net/wireless/zd1201.c
index 6f5c793..d9e67d9 100644
--- a/drivers/net/wireless/zd1201.c
+++ b/drivers/net/wireless/zd1201.c
@@ -1655,15 +1655,11 @@ static int zd1201_set_maxassoc(struct net_device *dev,
struct iw_request_info *info, struct iw_param *rrq, char *extra)
{
struct zd1201 *zd = netdev_priv(dev);
- int err;
if (!zd->ap)
return -EOPNOTSUPP;
- err = zd1201_setconfig16(zd, ZD1201_RID_CNFMAXASSOCSTATIONS, rrq->value);
- if (err)
- return err;
- return 0;
+ return zd1201_setconfig16(zd, ZD1201_RID_CNFMAXASSOCSTATIONS, rrq->value);
}
static int zd1201_get_maxassoc(struct net_device *dev,
--
2.5.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Punit Vara <punitvara@gmail.com> |
|---|---|
| Date | 2015-10-21 17:00 +0200 |
| Subject | [PATCH 10/15] net: wireless: ath: simplify return flow for carl9170_regwrite_result() |
| Message-ID | <qm31U-6dh-13@gated-at.bofh.it> |
| In reply to | #1252891 |
This patch is to the carl9170/phy.c file that fixes warning reported by
coccicheck :
WARNING: end returns can be simplified
I have removed unneccessary variable declaration and simply return flow
for carl9170_regwrite_result()
Signed-off-by: Punit Vara <punitvara@gmail.com>
---
drivers/net/wireless/ath/carl9170/phy.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/net/wireless/ath/carl9170/phy.c b/drivers/net/wireless/ath/carl9170/phy.c
index dca6df1..f3b5434 100644
--- a/drivers/net/wireless/ath/carl9170/phy.c
+++ b/drivers/net/wireless/ath/carl9170/phy.c
@@ -966,7 +966,6 @@ static const struct carl9170_phy_freq_entry carl9170_phy_freq_params[] = {
static int carl9170_init_rf_bank4_pwr(struct ar9170 *ar, bool band5ghz,
u32 freq, enum carl9170_bw bw)
{
- int err;
u32 d0, d1, td0, td1, fd0, fd1;
u8 chansel;
u8 refsel0 = 1, refsel1 = 0;
@@ -1024,11 +1023,7 @@ static int carl9170_init_rf_bank4_pwr(struct ar9170 *ar, bool band5ghz,
carl9170_regwrite(0x1c58e8, fd1);
carl9170_regwrite_finish();
- err = carl9170_regwrite_result();
- if (err)
- return err;
-
- return 0;
+ return carl9170_regwrite_result();
}
static const struct carl9170_phy_freq_params *
--
2.5.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Punit Vara <punitvara@gmail.com> |
|---|---|
| Date | 2015-10-21 17:00 +0200 |
| Subject | [PATCH 03/15] net: wireless: ath: Remove unnecessary semicolon |
| Message-ID | <qm31U-6dh-21@gated-at.bofh.it> |
| In reply to | #1252891 |
This patch is to the ath10k/wmi.h that removes unneeded semicolon which is reported by coccicheck. Here semicolon just create empty statement so please remote it. Signed-off-by: Punit Vara <punitvara@gmail.com> --- drivers/net/wireless/ath/ath10k/wmi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h index 52d3503..21d5b6b 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h @@ -1675,7 +1675,7 @@ static inline const char *ath10k_wmi_phymode_str(enum wmi_phy_mode mode) /* no default handler to allow compiler to check that the * enum is fully handled */ - }; + } return "<unknown>"; } -- 2.5.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Punit Vara <punitvara@gmail.com> |
|---|---|
| Date | 2015-10-21 17:00 +0200 |
| Subject | [PATCH 14/15] net: wireless: ath: Remove unneeded variable ret returning 0 |
| Message-ID | <qm31U-6dh-25@gated-at.bofh.it> |
| In reply to | #1252891 |
This patch is to the ath5k/eeprom.c that fixes up warning caught by coccicheck: -Unneeded variable: "ret". Return "0" on line 1733 Remove unneccesary variable ret created to return zero. Signed-off-by: Punit Vara <punitvara@gmail.com> --- drivers/net/wireless/ath/ath5k/eeprom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath5k/eeprom.c b/drivers/net/wireless/ath/ath5k/eeprom.c index 94d34ee..673ab8d 100644 --- a/drivers/net/wireless/ath/ath5k/eeprom.c +++ b/drivers/net/wireless/ath/ath5k/eeprom.c @@ -1707,7 +1707,7 @@ ath5k_eeprom_read_spur_chans(struct ath5k_hw *ah) struct ath5k_eeprom_info *ee = &ah->ah_capabilities.cap_eeprom; u32 offset; u16 val; - int ret = 0, i; + int i; offset = AR5K_EEPROM_CTL(ee->ee_version) + AR5K_EEPROM_N_CTLS(ee->ee_version); @@ -1730,7 +1730,7 @@ ath5k_eeprom_read_spur_chans(struct ath5k_hw *ah) } } - return ret; + return 0; } -- 2.5.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Punit Vara <punitvara@gmail.com> |
|---|---|
| Date | 2015-10-21 17:00 +0200 |
| Subject | [PATCH 12/15] net: wireless: brcm80211: Remove unneeded variable which return 0 |
| Message-ID | <qm31V-6dh-41@gated-at.bofh.it> |
| In reply to | #1252891 |
This is patch to the brcmsmac/main.c that removes unnecessary variable
which was declared to return zero.
This patch fixes up warning reported by coccicheck:
-Unneeded variable: "err". Return "0" on line 3788
Signed-off-by: Punit Vara <punitvara@gmail.com>
---
drivers/net/wireless/brcm80211/brcmsmac/main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c
index 9728be0..9d717b6 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
@@ -3777,7 +3777,6 @@ static void brcms_c_set_ps_ctrl(struct brcms_c_info *wlc)
*/
static int brcms_c_set_mac(struct brcms_bss_cfg *bsscfg)
{
- int err = 0;
struct brcms_c_info *wlc = bsscfg->wlc;
/* enter the MAC addr into the RXE match registers */
@@ -3785,7 +3784,7 @@ static int brcms_c_set_mac(struct brcms_bss_cfg *bsscfg)
brcms_c_ampdu_macaddr_upd(wlc);
- return err;
+ return 0;
}
/* Write the BSS config's BSSID address to core (set_bssid in d11procs.tcl).
--
2.5.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Punit Vara <punitvara@gmail.com> |
|---|---|
| Date | 2015-10-21 17:00 +0200 |
| Subject | [PATCH 13/15] net: wireless: brcm80211: Remove unneeded variable ret_code returning 0 |
| Message-ID | <qm31V-6dh-35@gated-at.bofh.it> |
| In reply to | #1252891 |
This patch is to the brcmsmac/stf.c that fixes up warning caught by
coccicheck:
-Unneeded variable: "ret_code". Return "0" on line 328
Remove unneccesary variable ret_code created to return zero.
Siged-off-by: Punit Vara <punitvara@gmail.com>
---
drivers/net/wireless/brcm80211/brcmsmac/stf.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/stf.c b/drivers/net/wireless/brcm80211/brcmsmac/stf.c
index dd91627..71ddf42 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/stf.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/stf.c
@@ -306,7 +306,6 @@ int brcms_c_stf_txchain_set(struct brcms_c_info *wlc, s32 int_val, bool force)
*/
int brcms_c_stf_ss_update(struct brcms_c_info *wlc, struct brcms_band *band)
{
- int ret_code = 0;
u8 prev_stf_ss;
u8 upd_stf_ss;
@@ -325,7 +324,7 @@ int brcms_c_stf_ss_update(struct brcms_c_info *wlc, struct brcms_band *band)
PHY_TXC1_MODE_SISO : PHY_TXC1_MODE_CDD;
} else {
if (wlc->band != band)
- return ret_code;
+ return 0;
upd_stf_ss = (wlc->stf->txstreams == 1) ?
PHY_TXC1_MODE_SISO : band->band_stf_ss_mode;
}
@@ -334,7 +333,7 @@ int brcms_c_stf_ss_update(struct brcms_c_info *wlc, struct brcms_band *band)
brcms_b_band_stf_ss_set(wlc->hw, upd_stf_ss);
}
- return ret_code;
+ return 0;
}
int brcms_c_stf_attach(struct brcms_c_info *wlc)
--
2.5.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Jiri Slaby <jirislaby@gmail.com> |
|---|---|
| Date | 2015-10-21 17:00 +0200 |
| Subject | Re: [PATCH 01/15] net: wireless: ath: use | instead of + for summing bitmasks |
| Message-ID | <qm31V-6dh-47@gated-at.bofh.it> |
| In reply to | #1252891 |
On 10/21/2015, 04:55 PM, Punit Vara wrote:
> This patch is to the ath10k/pci.h file that fixes following warning
> reported by coccicheck:
>
> WARNING: sum of probable bitmasks, consider |
>
> I have replaced + with OR operator | for summing bitmasks
>
> Signed-off-by: Punit Vara <punitvara@gmail.com>
> ---
> drivers/net/wireless/ath/ath10k/pci.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
> index 1046ab6..165a318 100644
> --- a/drivers/net/wireless/ath/ath10k/pci.c
> +++ b/drivers/net/wireless/ath/ath10k/pci.c
> @@ -775,7 +775,7 @@ static u32 ath10k_pci_targ_cpu_to_ce_addr(struct ath10k *ar, u32 addr)
> switch (ar->hw_rev) {
> case ATH10K_HW_QCA988X:
> case ATH10K_HW_QCA6174:
> - val = (ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS +
> + val = (ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS |
> CORE_CTRL_ADDRESS) &
Could you explain where exactly are 2 bitmasks here?
thanks,
--
js
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Punit Vara <punitvara@gmail.com> |
|---|---|
| Date | 2015-10-21 17:00 +0200 |
| Subject | [PATCH 05/15] net: wireless: ti: Return flow can be simplified for wl1271_cmd_interrogate |
| Message-ID | <qm31V-6dh-57@gated-at.bofh.it> |
| In reply to | #1252891 |
This patch is to the wlcore/acx.c file that fixes up warning reported by coccicheck: WARNING: end returns can be simplified if negative or 0 value Prefer direct return value instead of writing 2-3 more sentence. Signed-off-by: Punit Vara <punitvara@gmail.com> --- drivers/net/wireless/ti/wlcore/acx.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/net/wireless/ti/wlcore/acx.c b/drivers/net/wireless/ti/wlcore/acx.c index f28fa3b..331382c 100644 --- a/drivers/net/wireless/ti/wlcore/acx.c +++ b/drivers/net/wireless/ti/wlcore/acx.c @@ -162,12 +162,8 @@ int wl1271_acx_mem_map(struct wl1271 *wl, struct acx_header *mem_map, wl1271_debug(DEBUG_ACX, "acx mem map"); - ret = wl1271_cmd_interrogate(wl, ACX_MEM_MAP, mem_map, + return wl1271_cmd_interrogate(wl, ACX_MEM_MAP, mem_map, sizeof(struct acx_header), len); - if (ret < 0) - return ret; - - return 0; } int wl1271_acx_rx_msdu_life_time(struct wl1271 *wl) -- 2.5.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Punit Vara <punitvara@gmail.com> |
|---|---|
| Date | 2015-10-21 17:00 +0200 |
| Subject | [PATCH 04/15] net: wireless: ipw2x00: use | instead of + for summing bitmasks |
| Message-ID | <qm31V-6dh-55@gated-at.bofh.it> |
| In reply to | #1252891 |
This patch is to the libipw_rx.c file that fixes following warning
reported by coccicheck:
WARNING: sum of probable bitmasks, consider |
I have replaced + with OR operator | for summing bitmasks
Signed-off-by: Punit Vara <punitvara@gmail.com>
---
drivers/net/wireless/ipw2x00/libipw_rx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ipw2x00/libipw_rx.c b/drivers/net/wireless/ipw2x00/libipw_rx.c
index cef7f7d..310b2ff 100644
--- a/drivers/net/wireless/ipw2x00/libipw_rx.c
+++ b/drivers/net/wireless/ipw2x00/libipw_rx.c
@@ -875,7 +875,7 @@ void libipw_rx_any(struct libipw_device *ieee,
case IW_MODE_ADHOC:
/* our BSS and not from/to DS */
if (ether_addr_equal(hdr->addr3, ieee->bssid))
- if ((fc & (IEEE80211_FCTL_TODS+IEEE80211_FCTL_FROMDS)) == 0) {
+ if ((fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) == 0) {
/* promisc: get all */
if (ieee->dev->flags & IFF_PROMISC)
is_packet_for_us = 1;
@@ -890,7 +890,7 @@ void libipw_rx_any(struct libipw_device *ieee,
case IW_MODE_INFRA:
/* our BSS (== from our AP) and from DS */
if (ether_addr_equal(hdr->addr2, ieee->bssid))
- if ((fc & (IEEE80211_FCTL_TODS+IEEE80211_FCTL_FROMDS)) == IEEE80211_FCTL_FROMDS) {
+ if ((fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) == IEEE80211_FCTL_FROMDS) {
/* promisc: get all */
if (ieee->dev->flags & IFF_PROMISC)
is_packet_for_us = 1;
--
2.5.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Punit Vara <punitvara@gmail.com> |
|---|---|
| Date | 2015-10-21 17:00 +0200 |
| Subject | [PATCH 11/15] net: wireless: iwlegacy: Remove unneeded variable ret |
| Message-ID | <qm31W-6dh-61@gated-at.bofh.it> |
| In reply to | #1252891 |
This patch is to the 3945-mac.c file that fixes up following warning
by coccicheck:
drivers/net/wireless/iwlegacy/3945-mac.c:247:5-8: Unneeded variable:
"ret". Return "- EOPNOTSUPP" on line 249
Return -EOPNOTSUPP directly instead of return using ret
Signed-off-by: Punit Vara <punitvara@gmail.com>
---
drivers/net/wireless/iwlegacy/3945-mac.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c
index af1b3e6..ff4dc44 100644
--- a/drivers/net/wireless/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/iwlegacy/3945-mac.c
@@ -244,9 +244,7 @@ il3945_set_dynamic_key(struct il_priv *il, struct ieee80211_key_conf *keyconf,
static int
il3945_remove_static_key(struct il_priv *il)
{
- int ret = -EOPNOTSUPP;
-
- return ret;
+ return -EOPNOTSUPP;
}
static int
@@ -529,7 +527,6 @@ il3945_tx_skb(struct il_priv *il,
if (unlikely(tid >= MAX_TID_COUNT))
goto drop;
}
-
/* Descriptor for chosen Tx queue */
txq = &il->txq[txq_id];
q = &txq->q;
--
2.5.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> |
|---|---|
| Date | 2015-10-21 23:50 +0200 |
| Subject | Re: [PATCH 11/15] net: wireless: iwlegacy: Remove unneeded variable ret |
| Message-ID | <qm9qF-7aO-3@gated-at.bofh.it> |
| In reply to | #1252910 |
On 10/21/2015 05:55 PM, Punit Vara wrote:
> This patch is to the 3945-mac.c file that fixes up following warning
> by coccicheck:
>
> drivers/net/wireless/iwlegacy/3945-mac.c:247:5-8: Unneeded variable:
> "ret". Return "- EOPNOTSUPP" on line 249
>
> Return -EOPNOTSUPP directly instead of return using ret
>
> Signed-off-by: Punit Vara <punitvara@gmail.com>
> ---
> drivers/net/wireless/iwlegacy/3945-mac.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c
> index af1b3e6..ff4dc44 100644
> --- a/drivers/net/wireless/iwlegacy/3945-mac.c
> +++ b/drivers/net/wireless/iwlegacy/3945-mac.c
[...]
> @@ -529,7 +527,6 @@ il3945_tx_skb(struct il_priv *il,
> if (unlikely(tid >= MAX_TID_COUNT))
> goto drop;
> }
> -
Unrelated whitespace change.
> /* Descriptor for chosen Tx queue */
> txq = &il->txq[txq_id];
> q = &txq->q;
MBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Punit Vara <punitvara@gmail.com> |
|---|---|
| Date | 2015-10-21 17:00 +0200 |
| Subject | [PATCH 01/15] net: wireless: ath: use | instead of + for summing bitmasks |
| Message-ID | <qm31V-6dh-49@gated-at.bofh.it> |
| In reply to | #1252891 |
This patch is to the ath10k/pci.h file that fixes following warning
reported by coccicheck:
WARNING: sum of probable bitmasks, consider |
I have replaced + with OR operator | for summing bitmasks
Signed-off-by: Punit Vara <punitvara@gmail.com>
---
drivers/net/wireless/ath/ath10k/pci.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index 1046ab6..165a318 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -775,7 +775,7 @@ static u32 ath10k_pci_targ_cpu_to_ce_addr(struct ath10k *ar, u32 addr)
switch (ar->hw_rev) {
case ATH10K_HW_QCA988X:
case ATH10K_HW_QCA6174:
- val = (ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS +
+ val = (ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS |
CORE_CTRL_ADDRESS) &
0x7ff) << 21;
break;
@@ -1443,10 +1443,10 @@ static void ath10k_pci_irq_msi_fw_mask(struct ath10k *ar)
switch (ar->hw_rev) {
case ATH10K_HW_QCA988X:
case ATH10K_HW_QCA6174:
- val = ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS +
+ val = ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS |
CORE_CTRL_ADDRESS);
val &= ~CORE_CTRL_PCIE_REG_31_MASK;
- ath10k_pci_write32(ar, SOC_CORE_BASE_ADDRESS +
+ ath10k_pci_write32(ar, SOC_CORE_BASE_ADDRESS |
CORE_CTRL_ADDRESS, val);
break;
case ATH10K_HW_QCA99X0:
@@ -1464,10 +1464,10 @@ static void ath10k_pci_irq_msi_fw_unmask(struct ath10k *ar)
switch (ar->hw_rev) {
case ATH10K_HW_QCA988X:
case ATH10K_HW_QCA6174:
- val = ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS +
+ val = ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS |
CORE_CTRL_ADDRESS);
val |= CORE_CTRL_PCIE_REG_31_MASK;
- ath10k_pci_write32(ar, SOC_CORE_BASE_ADDRESS +
+ ath10k_pci_write32(ar, SOC_CORE_BASE_ADDRESS |
CORE_CTRL_ADDRESS, val);
break;
case ATH10K_HW_QCA99X0:
--
2.5.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | linux.kernel
csiph-web