staging: ks7010: Replace license boilerplate with SPDX identifiers
PATCH 1/7 staging: ks7010: Replace license boilerplate with SPDX identifiers
This satisfies a checkpatch.pl warning and is the preferred method for notating the license due to its lack of ambiguity.
--- drivers/staging/ks7010/ks7010_sdio.c | 5 +---- drivers/staging/ks7010/ks7010_sdio.h | 5 +---- drivers/staging/ks7010/ks_hostif.c | 5 +---- drivers/staging/ks7010/ks_hostif.h | 5 +---- drivers/staging/ks7010/ks_wlan.h | 5 +---- drivers/staging/ks7010/ks_wlan_ioctl.h | 5 +---- drivers/staging/ks7010/ks_wlan_net.c | 5 +---- drivers/staging/ks7010/michael_mic.c | 5 +---- drivers/staging/ks7010/michael_mic.h | 5 +---- 9 files changed, 9 insertions(+), 36 deletions(-)
drivers/staging/ks7010/ks7010_sdio.c +1 -4
@@ -1,13 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Driver for KeyStream, KS7010 based SDIO cards. * * Copyright (C) 2006-2008 KeyStream Corp. * Copyright (C) 2009 Renesas Technology Corp. * Copyright (C) 2016 Sang Engineering, Wolfram Sang -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. */ #include <linux/atomic.h>
drivers/staging/ks7010/ks7010_sdio.h +1 -4
@@ -1,12 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * Driver for KeyStream, KS7010 based SDIO cards. * * Copyright (C) 2006-2008 KeyStream Corp. * Copyright (C) 2009 Renesas Technology Corp. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. */ #ifndef _KS7010_SDIO_H#define _KS7010_SDIO_H
drivers/staging/ks7010/ks_hostif.c +1 -4
@@ -1,12 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Driver for KeyStream wireless LAN cards. * * Copyright (C) 2005-2008 KeyStream Corp. * Copyright (C) 2009 Renesas Technology Corp. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. */ #include <linux/if_arp.h>
drivers/staging/ks7010/ks_hostif.h +1 -4
@@ -1,12 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * Driver for KeyStream wireless LAN * * Copyright (c) 2005-2008 KeyStream Corp. * Copyright (C) 2009 Renesas Technology Corp. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. */ #ifndef _KS_HOSTIF_H_
drivers/staging/ks7010/ks_wlan.h +1 -4
@@ -1,12 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * Driver for KeyStream IEEE802.11 b/g wireless LAN cards. * * Copyright (C) 2006-2008 KeyStream Corp. * Copyright (C) 2009 Renesas Technology Corp. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. */ #ifndef _KS_WLAN_H
drivers/staging/ks7010/ks_wlan_ioctl.h +1 -4
@@ -1,12 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * Driver for KeyStream 11b/g wireless LAN * * Copyright (c) 2005-2008 KeyStream Corp. * Copyright (C) 2009 Renesas Technology Corp. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. */ #ifndef _KS_WLAN_IOCTL_H
drivers/staging/ks7010/ks_wlan_net.c +1 -4
@@ -1,12 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Driver for KeyStream 11b/g wireless LAN * * Copyright (C) 2005-2008 KeyStream Corp. * Copyright (C) 2009 Renesas Technology Corp. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. */ #include <linux/atomic.h>
drivers/staging/ks7010/michael_mic.c +1 -4
@@ -1,12 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Driver for KeyStream wireless LAN * * Copyright (C) 2005-2008 KeyStream Corp. * Copyright (C) 2009 Renesas Technology Corp. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. */ #include <asm/unaligned.h>
drivers/staging/ks7010/michael_mic.h +1 -4
@@ -1,12 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * Driver for KeyStream wireless LAN * * Copyright (C) 2005-2008 KeyStream Corp. * Copyright (C) 2009 Renesas Technology Corp. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. */ /* MichaelMIC routine define */
Signature · 6 lines
2.17.0 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 2/7 staging: ks7010: Remove unused variables
GCC warns these variables are all set but never used so remove them.
--- drivers/staging/ks7010/ks_hostif.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)
drivers/staging/ks7010/ks_hostif.c +1 -11
@@ -354,7 +354,6 @@ void hostif_data_indication(struct ks_wlan_private *priv)unsigned short auth_type;unsigned char temp[256 ];struct ether_hdr *eth_hdr; -unsigned short eth_proto;struct ieee802_1x_hdr *aa1x_hdr;size_t size;int ret;
@@ -369,7 +368,6 @@ void hostif_data_indication(struct ks_wlan_private *priv)get_word (priv);/* Reserve Area */ eth_hdr = (struct ether_hdr *)(priv->rxp); - eth_proto =ntohs (eth_hdr->h_proto);/* source address check */ if (ether_addr_equal (&priv->eth_addr[0 ], eth_hdr->h_source)) {
@@ -464,13 +462,9 @@ void hostif_mib_get_confirm(struct ks_wlan_private *priv)struct net_device *dev = priv->net_dev;u32 mib_status;u32 mib_attribute; -u16 mib_val_size; -u16 mib_val_type; mib_status =get_dword (priv);/* MIB status */ mib_attribute =get_dword (priv);/* MIB atttibute */ - mib_val_size =get_word (priv);/* MIB value size */ - mib_val_type =get_word (priv);/* MIB value type */ if (mib_status) { netdev_err(priv->net_dev, "attribute=%08X, status=%08X\n",
@@ -792,9 +786,6 @@ void hostif_ps_adhoc_set_confirm(struct ks_wlan_private *priv)static void hostif_infrastructure_set_confirm (struct ks_wlan_private *priv) { -u16 result_code; - - result_code =get_word (priv); priv->infra_status =1 ;/* infrastructure mode set */ hostif_sme_enqueue (priv,SME_MODE_SET_CONFIRM ); }
@@ -872,14 +863,13 @@ staticvoid hostif_phy_information_confirm (struct ks_wlan_private *priv) {struct iw_statistics *wstats = &priv->wstats; -unsigned char rssi, signal, noise; +unsigned char rssi, signal;unsigned char link_speed;unsigned int transmitted_frame_count, received_fragment_count;unsigned int failed_count, fcs_error_count; rssi =get_byte (priv); signal =get_byte (priv); - noise =get_byte (priv); link_speed =get_byte (priv); transmitted_frame_count =get_dword (priv); received_fragment_count =get_dword (priv);
Signature · 6 lines
2.17.0 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 2/7] staging: ks7010: Remove unused variables
Quoted 70 lines · Nathan Chancellor
GCC warns these variables are all set but never used so remove them.
Signed-off-by Nathan Chancellor <[email protected]>--- drivers/staging/ks7010/ks_hostif.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)drivers/staging/ks7010/ks_hostif.c +1
-11@@ -354,7 +354,6 @@ void hostif_data_indication(struct ks_wlan_private *priv)unsigned short auth_type;unsigned char temp[256 ];struct ether_hdr *eth_hdr; -unsigned short eth_proto;struct ieee802_1x_hdr *aa1x_hdr;size_t size;int ret;@@ -369,7 +368,6 @@ void hostif_data_indication(struct ks_wlan_private *priv)get_word (priv);/* Reserve Area */ eth_hdr = (struct ether_hdr *)(priv->rxp); - eth_proto =ntohs (eth_hdr->h_proto);/* source address check */ if (ether_addr_equal (&priv->eth_addr[0 ], eth_hdr->h_source)) {@@ -464,13 +462,9 @@ void hostif_mib_get_confirm(struct ks_wlan_private *priv)struct net_device *dev = priv->net_dev;u32 mib_status;u32 mib_attribute; -u16 mib_val_size; -u16 mib_val_type; mib_status =get_dword (priv);/* MIB status */ mib_attribute =get_dword (priv);/* MIB atttibute */ - mib_val_size =get_word (priv);/* MIB value size */ - mib_val_type =get_word (priv);/* MIB value type */ if (mib_status) { netdev_err(priv->net_dev, "attribute=%08X, status=%08X\n",@@ -792,9 +786,6 @@ void hostif_ps_adhoc_set_confirm(struct ks_wlan_private *priv)static void hostif_infrastructure_set_confirm (struct ks_wlan_private *priv) { -u16 result_code; - - result_code =get_word (priv); priv->infra_status =1 ;/* infrastructure mode set */ hostif_sme_enqueue (priv,SME_MODE_SET_CONFIRM ); }@@ -872,14 +863,13 @@ staticvoid hostif_phy_information_confirm (struct ks_wlan_private *priv) {struct iw_statistics *wstats = &priv->wstats; -unsigned char rssi, signal, noise; +unsigned char rssi, signal;unsigned char link_speed;unsigned int transmitted_frame_count, received_fragment_count;unsigned int failed_count, fcs_error_count; rssi =get_byte (priv); signal =get_byte (priv); - noise =get_byte (priv); link_speed =get_byte (priv); transmitted_frame_count =get_dword (priv); received_fragment_count =get_dword (priv);Signature · 1 line
2.17.0
On second glance, I did not realize most of these functions involve pointer semantics. Please do not apply this. I can send a v2 series if necessary although every other patch is fine.
Thanks,
Nathan
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 3/7 staging: ks7010: Remove unnecessary limit checks
In reply to Nathan Chancelloruwrq is an unsigned 32-bit integer, it cannot be less than zero.
--- drivers/staging/ks7010/ks_wlan_net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/ks7010/ks_wlan_net.c +3 -3
@@ -1928,7 +1928,7 @@ static int ks_wlan_set_beacon_lost(struct net_device *dev,if (priv->sleep_mode ==SLP_SLEEP )return -EPERM ;/* for SLEEP MODE */ -if (*uwrq <BEACON_LOST_COUNT_MIN || *uwrq >BEACON_LOST_COUNT_MAX ) +if (*uwrq >BEACON_LOST_COUNT_MAX )return -EINVAL ; priv->reg.beacon_lost_count = *uwrq;
@@ -2133,7 +2133,7 @@ static int ks_wlan_set_tx_gain(struct net_device *dev,if (priv->sleep_mode ==SLP_SLEEP )return -EPERM ;/* for SLEEP MODE */ -if (*uwrq <0 || *uwrq >0xFF ) +if (*uwrq >0xFF )return -EINVAL ; priv->gain.tx_gain = (uint8_t )*uwrq;
@@ -2165,7 +2165,7 @@ static int ks_wlan_set_rx_gain(struct net_device *dev,if (priv->sleep_mode ==SLP_SLEEP )return -EPERM ;/* for SLEEP MODE */ -if (*uwrq <0 || *uwrq >0xFF ) +if (*uwrq >0xFF )return -EINVAL ; priv->gain.rx_gain = (uint8_t )*uwrq;
Signature · 6 lines
2.17.0 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 3/7] staging: ks7010: Remove unnecessary limit checks
Quoted 12 lines · Nathan Chancellor
uwrq is an unsigned 32-bit integer, it cannot be less than zero.
Signed-off-by Nathan Chancellor <[email protected]>--- drivers/staging/ks7010/ks_wlan_net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/staging/ks7010/ks_wlan_net.c +0
-0
drivers/staging/ks7010/ks_wlan_net.c static int ks_wlan_set_beacon_lost(struct net_device *dev, · line 1931
Quoted 5 lines
drivers/staging/ks7010/ks_wlan_net.c +1
-1@@ -1928,7 +1928,7 @@ static int ks_wlan_set_beacon_lost(struct net_device *dev,if (priv->sleep_mode ==SLP_SLEEP )return -EPERM ;/* for SLEEP MODE */ -if (*uwrq <BEACON_LOST_COUNT_MIN || *uwrq >BEACON_LOST_COUNT_MAX ) +if (*uwrq >BEACON_LOST_COUNT_MAX )
I believe Smatch is supposed to ignore this sort of code because comparing "if (foo < 0 || foo > max) " is pretty readable and idiomatic.
Presumably this was so we could redefine BEACON_LOST_COUNT_MIN, but it's fine to unused code. The define isn't needed at all, so you can delete that as well.
regards,
dan carpenter
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 3/7] staging: ks7010: Remove unnecessary limit checks
Quoted 22 lines · Dan Carpenter
Quoted 12 lines · Nathan Chancellor
uwrq is an unsigned 32-bit integer, it cannot be less than zero.
Signed-off-by Nathan Chancellor <[email protected]>--- drivers/staging/ks7010/ks_wlan_net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/staging/ks7010/ks_wlan_net.c +0
-0drivers/staging/ks7010/ks_wlan_net.c static int ks_wlan_set_beacon_lost(struct net_device *dev, · line 1931
Quoted 5 lines
drivers/staging/ks7010/ks_wlan_net.c +1
-1@@ -1928,7 +1928,7 @@ static int ks_wlan_set_beacon_lost(struct net_device *dev,if (priv->sleep_mode ==SLP_SLEEP )return -EPERM ;/* for SLEEP MODE */ -if (*uwrq <BEACON_LOST_COUNT_MIN || *uwrq >BEACON_LOST_COUNT_MAX ) +if (*uwrq >BEACON_LOST_COUNT_MAX )I believe Smatch is supposed to ignore this sort of code because comparing "if (foo < 0 || foo > max) " is pretty readable and idiomatic.
Quoted 7 lines
Presumably this was so we could redefine
BEACON_LOST_COUNT_MIN, but it's fine to unused code. The define isn't needed at all, so you can delete that as well.regards,
dan carpenter
Hi Dan,
Thanks for the suggestion, I just sent a patch.
This warning came from GCC as a -Wtype-limit warning. I should have put that in the commit message to be more clear. I will keep this in mind for the future if I come across any more checks like this with defines.
Thanks!
Nathan Chancellor
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 3/7] staging: ks7010: Remove unnecessary limit checks
Quoted 31 lines · Nathan Chancellor
Quoted 22 lines · Dan Carpenter
Quoted 12 lines · Nathan Chancellor
uwrq is an unsigned 32-bit integer, it cannot be less than zero.
Signed-off-by Nathan Chancellor <[email protected]>--- drivers/staging/ks7010/ks_wlan_net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/staging/ks7010/ks_wlan_net.c +0
-0drivers/staging/ks7010/ks_wlan_net.c static int ks_wlan_set_beacon_lost(struct net_device *dev, · line 1931
Quoted 5 lines
drivers/staging/ks7010/ks_wlan_net.c +1
-1@@ -1928,7 +1928,7 @@ static int ks_wlan_set_beacon_lost(struct net_device *dev,if (priv->sleep_mode ==SLP_SLEEP )return -EPERM ;/* for SLEEP MODE */ -if (*uwrq <BEACON_LOST_COUNT_MIN || *uwrq >BEACON_LOST_COUNT_MAX ) +if (*uwrq >BEACON_LOST_COUNT_MAX )I believe Smatch is supposed to ignore this sort of code because comparing "if (foo < 0 || foo > max) " is pretty readable and idiomatic.
Quoted 7 lines
Presumably this was so we could redefine
BEACON_LOST_COUNT_MIN, but it's fine to unused code. The define isn't needed at all, so you can delete that as well.regards,
dan carpenter
Quoted 8 lines
Hi Dan,
Thanks for the suggestion, I just sent a patch.
This warning came from GCC as a -Wtype-limit warning. I should have put that in the commit message to be more clear. I will keep this in mind for the future if I come across any more checks like this with defines.
Anyway, please delete BEACON_LOST_COUNT_MIN entirely.
regards,
dan carpenter
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 4/7 staging: ks7010: Adjust spacing around functions and declarations
In reply to Nathan Chancellorcheckpatch.pl warns about too many or not enough spaces in these locations. Adjust them accordingly.
--- drivers/staging/ks7010/ks7010_sdio.c | 1 - drivers/staging/ks7010/ks_hostif.c | 2 +- drivers/staging/ks7010/michael_mic.c | 1 - 3 files changed, 1 insertion(+), 3 deletions(-)
drivers/staging/ks7010/ks7010_sdio.c +0 -1
@@ -776,7 +776,6 @@ static int ks7010_upload_firmware(struct ks_sdio_card *card)int ret;const struct firmware *fw_entry =NULL ; -sdio_claim_host (card->func);/* Firmware running ? */
drivers/staging/ks7010/ks_hostif.c +1 -1
@@ -191,7 +191,6 @@ static u8 read_ie(unsigned char *bp, u8 max, u8 *body)return size; } -static int get_ap_information (struct ks_wlan_private *priv,struct ap_info *ap_info,struct local_ap *ap)
@@ -2272,6 +2271,7 @@ void hostif_sme_enqueue(struct ks_wlan_private *priv, unsigned short event)static inline void hostif_aplist_init (struct ks_wlan_private *priv) {size_t size =LOCAL_APLIST_MAX *sizeof (struct local_ap ); + priv->aplist.size =0 ;memset (&priv->aplist.ap[0 ],0 , size); }
drivers/staging/ks7010/michael_mic.c +0 -1
@@ -11,7 +11,6 @@#include <linux/string.h> #include "michael_mic.h" -// Reset the state to the empty message. static inline void michael_clear (struct michael_mic *mic) {
Signature · 6 lines
2.17.0 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Greg Kroah-Hartman
maintainerRe: [PATCH 4/7] staging: ks7010: Adjust spacing around functions and declarations
Quoted 9 lines · Nathan Chancellor
checkpatch.pl warns about too many or not enough spaces in these locations. Adjust them accordingly.
Signed-off-by Nathan Chancellor <[email protected]>--- drivers/staging/ks7010/ks7010_sdio.c | 1 - drivers/staging/ks7010/ks_hostif.c | 2 +- drivers/staging/ks7010/michael_mic.c | 1 - 3 files changed, 1 insertion(+), 3 deletions(-)
Doesn't apply to my tree :(
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 5/7 staging: ks7010: Remove unnecessary parentheses
In reply to Nathan ChancellorFixes checkpatch.pl warnings.
--- drivers/staging/ks7010/ks_hostif.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/ks7010/ks_hostif.c +3 -3
@@ -35,7 +35,7 @@ static inline u8 get_byte(struct ks_wlan_private *priv) {u8 data; - data = *(priv->rxp)++; + data = *priv->rxp++;/* length check in advance ! */ --(priv->rx_size);return data;
@@ -171,7 +171,7 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info *ap_info)"- rate_set_size=%d\n" , ap->bssid[0 ], ap->bssid[1 ], ap->bssid[2 ], ap->bssid[3 ], ap->bssid[4 ], ap->bssid[5 ], - &(ap->ssid.body[0 ]), + &ap->ssid.body[0 ], ap->rate_set.body[0 ], ap->rate_set.body[1 ], ap->rate_set.body[2 ], ap->rate_set.body[3 ], ap->rate_set.body[4], ap->rate_set.body[5],
@@ -734,7 +734,7 @@ void hostif_scan_indication(struct ks_wlan_private *priv)netdev_dbg (priv->net_dev," scan_ind_count=%d :: aplist.size=%d\n" , priv->scan_ind_count, priv->aplist.size);get_ap_information (priv, (struct ap_info *)(priv->rxp), - &(priv->aplist.ap[priv->scan_ind_count -1 ])); + &priv->aplist.ap[priv->scan_ind_count -1 ]); priv->aplist.size = priv->scan_ind_count; }else { netdev_dbg(priv->net_dev, " count over :: scan_ind_count=%d\n",
Signature · 6 lines
2.17.0 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Greg Kroah-Hartman
maintainerRe: [PATCH 5/7] staging: ks7010: Remove unnecessary parentheses
Quoted 12 lines · Nathan Chancellor
Fixes checkpatch.pl warnings.
Signed-off-by Nathan Chancellor <[email protected]>--- drivers/staging/ks7010/ks_hostif.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/staging/ks7010/ks_hostif.c +0
-0
drivers/staging/ks7010/ks_hostif.c static inline u8 get_byte(struct ks_wlan_private *priv) · line 38
Quoted 5 lines
drivers/staging/ks7010/ks_hostif.c +1
-1@@ -35,7 +35,7 @@ static inline u8 get_byte(struct ks_wlan_private *priv) {u8 data; - data = *(priv->rxp)++; + data = *priv->rxp++;
Ick, no, the original is correct here. The changed one is now harder to read, I have to go look up order of operations here to figure this out :(
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 6/7 staging: ks7010: Adjust alignment to open parenthesis
In reply to Nathan ChancellorFixes a checkpatch.pl warning.
--- drivers/staging/ks7010/ks_hostif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/ks7010/ks_hostif.c +1 -1
@@ -732,7 +732,7 @@ void hostif_scan_indication(struct ks_wlan_private *priv) priv->scan_ind_count++;if (priv->scan_ind_count <LOCAL_APLIST_MAX +1 ) {netdev_dbg (priv->net_dev," scan_ind_count=%d :: aplist.size=%d\n" , - priv->scan_ind_count, priv->aplist.size); + priv->scan_ind_count, priv->aplist.size);get_ap_information (priv, (struct ap_info *)(priv->rxp), &priv->aplist.ap[priv->scan_ind_count -1 ]); priv->aplist.size = priv->scan_ind_count;
Signature · 6 lines
2.17.0 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Greg Kroah-Hartman
maintainerRe: [PATCH 6/7] staging: ks7010: Adjust alignment to open parenthesis
Quoted 6 lines · Nathan Chancellor
Fixes a checkpatch.pl warning.
Signed-off-by Nathan Chancellor <[email protected]>--- drivers/staging/ks7010/ks_hostif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Also does not apply :(
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
PATCH 7/7 staging: ks7010: Move from bool to int in structs
In reply to Nathan ChancellorFixes checkpatch.pl warnings.
--- drivers/staging/ks7010/ks_hostif.c | 4 ++-- drivers/staging/ks7010/ks_wlan.h | 4 ++-- drivers/staging/ks7010/ks_wlan_net.c | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-)
drivers/staging/ks7010/ks_hostif.c +2 -2
@@ -475,7 +475,7 @@ void hostif_mib_get_confirm(struct ks_wlan_private *priv)case DOT11_MAC_ADDRESS :hostif_sme_enqueue (priv,SME_GET_MAC_ADDRESS );ether_addr_copy (priv->eth_addr, priv->rxp); - priv->mac_address_valid = true; + priv->mac_address_valid =1 ;ether_addr_copy (dev->dev_addr, priv->eth_addr);netdev_info (dev,"MAC ADDRESS = %pM\n" , priv->eth_addr);break ;
@@ -582,7 +582,7 @@ void hostif_mib_set_confirm(struct ks_wlan_private *priv)hostif_sme_enqueue (priv,SME_MULTICAST_CONFIRM );break ;case LOCAL_CURRENTADDRESS : - priv->mac_address_valid = true; + priv->mac_address_valid =1 ;break ;case DOT11_RSN_CONFIG_MULTICAST_CIPHER :hostif_sme_enqueue (priv,SME_RSN_MCAST_CONFIRM );
drivers/staging/ks7010/ks_wlan.h +2 -2
@@ -411,7 +411,7 @@ struct ks_wlan_private {unsigned int need_commit;/* for ioctl */ /* DeviceIoControl */ -bool is_device_open; +int is_device_open;atomic_t event_count;atomic_t rec_count;int dev_count;
@@ -423,7 +423,7 @@ struct ks_wlan_private {unsigned char firmware_version[128 +1 ];int version_size; -bool mac_address_valid;/* Mac Address Status */ +int mac_address_valid;/* Mac Address Status */ int dev_state;
drivers/staging/ks7010/ks_wlan_net.c +4 -4
@@ -2504,7 +2504,7 @@ int ks_wlan_set_mac_address(struct net_device *dev, void *addr)memcpy (dev->dev_addr, mac_addr->sa_data, dev->addr_len);memcpy (priv->eth_addr, mac_addr->sa_data,ETH_ALEN ); - priv->mac_address_valid = false; + priv->mac_address_valid =0 ;hostif_sme_enqueue (priv,SME_MACADDRESS_SET_REQUEST );netdev_info (dev,"ks_wlan: MAC ADDRESS = %pM\n" , priv->eth_addr);return 0 ;
@@ -2627,8 +2627,8 @@ int ks_wlan_net_start(struct net_device *dev)/* int rc; */ priv =netdev_priv (dev); - priv->mac_address_valid = false; - priv->is_device_open = true; + priv->mac_address_valid =0 ; + priv->is_device_open =1 ; priv->need_commit =0 ;/* phy information update timer */ atomic_set (&update_phyinfo,0 );
@@ -2652,7 +2652,7 @@ int ks_wlan_net_stop(struct net_device *dev) {struct ks_wlan_private *priv =netdev_priv (dev); - priv->is_device_open = false; + priv->is_device_open =0 ;del_timer_sync (&update_phyinfo_timer);if (netif_running (dev))
Signature · 6 lines
2.17.0 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Greg Kroah-Hartman
maintainerRe: [PATCH 7/7] staging: ks7010: Move from bool to int in structs
Quoted 14 lines · Nathan Chancellor
Fixes checkpatch.pl warnings.
Signed-off-by Nathan Chancellor <[email protected]>--- drivers/staging/ks7010/ks_hostif.c | 4 ++-- drivers/staging/ks7010/ks_wlan.h | 4 ++-- drivers/staging/ks7010/ks_wlan_net.c | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-)drivers/staging/ks7010/ks_hostif.c +0
-0
drivers/staging/ks7010/ks_hostif.c void hostif_mib_get_confirm(struct ks_wlan_private *priv) · line 478
Quoted 5 lines
drivers/staging/ks7010/ks_hostif.c +1
-1@@ -475,7 +475,7 @@ void hostif_mib_get_confirm(struct ks_wlan_private *priv)case DOT11_MAC_ADDRESS :hostif_sme_enqueue (priv,SME_GET_MAC_ADDRESS );ether_addr_copy (priv->eth_addr, priv->rxp); - priv->mac_address_valid = true; + priv->mac_address_valid =1 ;
Wait, why? This should be bool, not an int. Why would checkpatch say this is incorrect?
confused,
greg k-h
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 7/7] staging: ks7010: Move from bool to int in structs
Quoted 24 lines · Greg Kroah-Hartman
Quoted 14 lines · Nathan Chancellor
Fixes checkpatch.pl warnings.
Signed-off-by Nathan Chancellor <[email protected]>--- drivers/staging/ks7010/ks_hostif.c | 4 ++-- drivers/staging/ks7010/ks_wlan.h | 4 ++-- drivers/staging/ks7010/ks_wlan_net.c | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-)drivers/staging/ks7010/ks_hostif.c +0
-0drivers/staging/ks7010/ks_hostif.c void hostif_mib_get_confirm(struct ks_wlan_private *priv) · line 478
Quoted 5 lines
drivers/staging/ks7010/ks_hostif.c +1
-1@@ -475,7 +475,7 @@ void hostif_mib_get_confirm(struct ks_wlan_private *priv)case DOT11_MAC_ADDRESS :hostif_sme_enqueue (priv,SME_GET_MAC_ADDRESS );ether_addr_copy (priv->eth_addr, priv->rxp); - priv->mac_address_valid = true; + priv->mac_address_valid =1 ;Wait, why? This should be bool, not an int. Why would checkpatch say this is incorrect?
Quoted 3 lines
confused,
greg k-h
CHECK: Avoid using bool structure members because of possible alignment issues - see: https://lkml.org/lkml/2017/11/21/384
#417: FILE: drivers/staging/ks7010/ks_wlan.h:417:
+ bool is_device_open;
Introduced by commit a4c4c0492dad ("checkpatch: add a --strict test for structs with bool member definitions"). If this is wrong, please feel free to ignore it!
Thanks,
Nathan
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Greg Kroah-Hartman
maintainerQuoted 4 lines · Nathan Chancellor
This satisfies a checkpatch.pl warning and is the preferred method for notating the license due to its lack of ambiguity.
Signed-off-by Nathan Chancellor <[email protected]>
Quoted 11 lines
--- drivers/staging/ks7010/ks7010_sdio.c | 5 +---- drivers/staging/ks7010/ks7010_sdio.h | 5 +---- drivers/staging/ks7010/ks_hostif.c | 5 +---- drivers/staging/ks7010/ks_hostif.h | 5 +---- drivers/staging/ks7010/ks_wlan.h | 5 +---- drivers/staging/ks7010/ks_wlan_ioctl.h | 5 +---- drivers/staging/ks7010/ks_wlan_net.c | 5 +---- drivers/staging/ks7010/michael_mic.c | 5 +---- drivers/staging/ks7010/michael_mic.h | 5 +---- 9 files changed, 9 insertions(+), 36 deletions(-)
This patch does not apply to my staging.git tree :(
_______________________________________________
devel mailing list [email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Quoted 17 lines · Greg Kroah-Hartman
Quoted 4 lines · Nathan Chancellor
This satisfies a checkpatch.pl warning and is the preferred method for notating the license due to its lack of ambiguity.
Signed-off-by Nathan Chancellor <[email protected]>Quoted 11 lines
--- drivers/staging/ks7010/ks7010_sdio.c | 5 +---- drivers/staging/ks7010/ks7010_sdio.h | 5 +---- drivers/staging/ks7010/ks_hostif.c | 5 +---- drivers/staging/ks7010/ks_hostif.h | 5 +---- drivers/staging/ks7010/ks_wlan.h | 5 +---- drivers/staging/ks7010/ks_wlan_ioctl.h | 5 +---- drivers/staging/ks7010/ks_wlan_net.c | 5 +---- drivers/staging/ks7010/michael_mic.c | 5 +---- drivers/staging/ks7010/michael_mic.h | 5 +---- 9 files changed, 9 insertions(+), 36 deletions(-)
Quoted 1 line
This patch does not apply to my staging.git tree :(
Looks like someone beat me to most if not all of my patches (they weren't pushed out when I did these on Sunday). I will take a look later today to see if any of them are still relevant.
Thanks!
Nathan
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel