usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Arvind Yadav (20):
[PATCH v2 01/20] ar5523: constify usb_device_id
[PATCH v2 02/20] ath6kl: constify usb_device_id
[PATCH v2 03/20] ath9k: constify usb_device_id
[PATCH v2 04/20] carl9170: constify usb_device_id
[PATCH v2 05/20] at76c50x: constify usb_device_id
[PATCH v2 06/20] brcm80211: constify usb_device_id
[PATCH v2 07/20] orinoco: constify usb_device_id
[PATCH v2 08/20] p54: constify usb_device_id
[PATCH v2 09/20] libertas: constify usb_device_id
[PATCH v2 10/20] libertas_tf: constify usb_device_id
[PATCH v2 11/20] marvell: mwifiex: constify usb_device_id
[PATCH v2 12/20] mt7601u: constify usb_device_id
[PATCH v2 13/20] rt2500usb: constify usb_device_id
[PATCH v2 14/20] rt2800usb: constify usb_device_id
[PATCH v2 15/20] rt73usb: constify usb_device_id
[PATCH v2 16/20] rtl8187: constify usb_device_id
[PATCH v2 17/20] realtek: rtl8xxxu: constify usb_device_id
[PATCH v2 18/20] realtek: rtl8192cu: constify usb_device_id
[PATCH v2 19/20] zd1201: constify usb_device_id
[PATCH v2 20/20] zd1211rw: constify usb_device_id
drivers/net/wireless/ath/ar5523/ar5523.c | 2 +-
drivers/net/wireless/ath/ath6kl/usb.c | 2 +-
drivers/net/wireless/ath/ath9k/hif_usb.c | 2 +-
drivers/net/wireless/ath/carl9170/usb.c | 2 +-
drivers/net/wireless/atmel/at76c50x-usb.c | 2 +-
drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 2 +-
drivers/net/wireless/intersil/orinoco/orinoco_usb.c | 2 +-
drivers/net/wireless/intersil/p54/p54usb.c | 2 +-
drivers/net/wireless/marvell/libertas/if_usb.c | 2 +-
drivers/net/wireless/marvell/libertas_tf/if_usb.c | 2 +-
drivers/net/wireless/marvell/mwifiex/usb.c | 2 +-
drivers/net/wireless/mediatek/mt7601u/usb.c | 2 +-
drivers/net/wireless/ralink/rt2x00/rt2500usb.c | 2 +-
drivers/net/wireless/ralink/rt2x00/rt2800usb.c | 2 +-
drivers/net/wireless/ralink/rt2x00/rt73usb.c | 2 +-
drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c | 2 +-
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 2 +-
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.c | 2 +-
drivers/net/wireless/zydas/zd1201.c | 2 +-
drivers/net/wireless/zydas/zd1211rw/zd_usb.c | 2 +-
20 files changed, 20 insertions(+), 20 deletions(-)
--
2.7.4
Arvind Yadav <[email protected]> wrote:
> usb_device_id are not supposed to change at runtime. All functions
> working with usb_device_id provided by <linux/usb.h> work with
> const usb_device_id. So mark the non-const structs as const.
>
> Signed-off-by: Arvind Yadav <[email protected]>
17 patches applied to wireless-drivers-next.git, thanks.
c5c60b2d577e ar5523: constify usb_device_id
76f6a5c80a4b carl9170: constify usb_device_id
22796d149229 at76c50x: constify usb_device_id
c4291319b6fe orinoco: constify usb_device_id
54c9f21605d8 p54: constify usb_device_id
3673c417f509 libertas: constify usb_device_id
8a3132fa6bbb libertas_tf: constify usb_device_id
7516dbd470e3 mwifiex: constify usb_device_id
e2717b312750 mt7601u: constify usb_device_id
88ee79a1a11c rt2500usb: constify usb_device_id
c7bb7d79cf4f rt2800usb: constify usb_device_id
543e4f87508b rt73usb: constify usb_device_id
e0b081b20523 rtl8187: constify usb_device_id
5033d70de169 rtl8xxxu: constify usb_device_id
3a55a4afd187 rtl8192cu: constify usb_device_id
b924ffd7a4cd zd1201: constify usb_device_id
ecf23a788e13 zd1211rw: constify usb_device_id
--
https://patchwork.kernel.org/patch/9890989/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
On Wed, Aug 9, 2017 at 9:23 AM, Arvind Yadav <[email protected]> wrote:
> usb_device_id are not supposed to change at runtime. All functions
> working with usb_device_id provided by <linux/usb.h> work with
> const usb_device_id. So mark the non-const structs as const.
>
> Signed-off-by: Arvind Yadav <[email protected]>
> ---
> changes in v2:
> Re-submitting wireless separately.
>
> drivers/net/wireless/ath/ath6kl/usb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath6kl/usb.c b/drivers/net/wireless/ath/ath6kl/usb.c
> index 9da3594..4defb7a 100644
> --- a/drivers/net/wireless/ath/ath6kl/usb.c
> +++ b/drivers/net/wireless/ath/ath6kl/usb.c
> @@ -1201,7 +1201,7 @@ static int ath6kl_usb_pm_resume(struct usb_interface *interface)
> #endif
>
> /* table of devices that work with this driver */
> -static struct usb_device_id ath6kl_usb_ids[] = {
> +static const struct usb_device_id ath6kl_usb_ids[] = {
> {USB_DEVICE(0x0cf3, 0x9375)},
> {USB_DEVICE(0x0cf3, 0x9374)},
> { /* Terminating entry */ },
> --
> 2.7.4
>
Looks good. Also builds and works properly.
Reviewed-by: Steve deRosier <[email protected]>
Tested-by: Steve deRosier <[email protected]>
- Steve
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <[email protected]>
---
changes in v2:
Re-submitting wireless separately.
drivers/net/wireless/ath/ath6kl/usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath6kl/usb.c b/drivers/net/wireless/ath/ath6kl/usb.c
index 9da3594..4defb7a 100644
--- a/drivers/net/wireless/ath/ath6kl/usb.c
+++ b/drivers/net/wireless/ath/ath6kl/usb.c
@@ -1201,7 +1201,7 @@ static int ath6kl_usb_pm_resume(struct usb_interface *interface)
#endif
/* table of devices that work with this driver */
-static struct usb_device_id ath6kl_usb_ids[] = {
+static const struct usb_device_id ath6kl_usb_ids[] = {
{USB_DEVICE(0x0cf3, 0x9375)},
{USB_DEVICE(0x0cf3, 0x9374)},
{ /* Terminating entry */ },
--
2.7.4
usb_device_id are not supposed to change at runtime. All functions
working with usb_device_id provided by <linux/usb.h> work with
const usb_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <[email protected]>
---
changes in v2:
Re-submitting wireless separately.
drivers/net/wireless/ath/ar5523/ar5523.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ar5523/ar5523.c b/drivers/net/wireless/ath/ar5523/ar5523.c
index 106d6f8..68f0463 100644
--- a/drivers/net/wireless/ath/ar5523/ar5523.c
+++ b/drivers/net/wireless/ath/ar5523/ar5523.c
@@ -1749,7 +1749,7 @@ static void ar5523_disconnect(struct usb_interface *intf)
{ USB_DEVICE((vendor), (device) + 1), \
.driver_info = AR5523_FLAG_ABG|AR5523_FLAG_PRE_FIRMWARE }
-static struct usb_device_id ar5523_id_table[] = {
+static const struct usb_device_id ar5523_id_table[] = {
AR5523_DEVICE_UG(0x168c, 0x0001), /* Atheros / AR5523 */
AR5523_DEVICE_UG(0x0cf3, 0x0001), /* Atheros2 / AR5523_1 */
AR5523_DEVICE_UG(0x0cf3, 0x0003), /* Atheros2 / AR5523_2 */
--
2.7.4
Arvind Yadav <[email protected]> wrote:
> usb_device_id are not supposed to change at runtime. All functions
> working with usb_device_id provided by <linux/usb.h> work with
> const usb_device_id. So mark the non-const structs as const.
>
> Signed-off-by: Arvind Yadav <[email protected]>
> Reviewed-by: Steve deRosier <[email protected]>
> Tested-by: Steve deRosier <[email protected]>
> Signed-off-by: Kalle Valo <[email protected]>
2 patches applied to ath-next branch of ath.git, thanks.
e881a6584941 ath6kl: constify usb_device_id
76b07b30c46b ath9k: constify usb_device_id
--
https://patchwork.kernel.org/patch/9890987/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches