Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1707454 > unrolled thread

[PATCH v2 00/20] constify wireless usb_device_id

Started byArvind Yadav <arvind.yadav.cs@gmail.com>
First post2017-08-09 18:30 +0200
Last post2017-08-11 16:10 +0200
Articles 6 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2 00/20] constify wireless usb_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-09 18:30 +0200
    [PATCH v2 01/20] ar5523: constify usb_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-09 18:30 +0200
      Re: [v2,01/20] ar5523: constify usb_device_id Kalle Valo <kvalo@codeaurora.org> - 2017-08-10 11:00 +0200
    [PATCH v2 02/20] ath6kl: constify usb_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-09 18:30 +0200
      Re: [PATCH v2 02/20] ath6kl: constify usb_device_id Steve deRosier <derosier@gmail.com> - 2017-08-09 23:10 +0200
      Re: [v2,02/20] ath6kl: constify usb_device_id Kalle Valo <kvalo@qca.qualcomm.com> - 2017-08-11 16:10 +0200

#1707454 — [PATCH v2 00/20] constify wireless usb_device_id

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-09 18:30 +0200
Subject[PATCH v2 00/20] constify wireless usb_device_id
Message-ID<ucC1P-1i5-5@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1707459 — [PATCH v2 01/20] ar5523: constify usb_device_id

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-09 18:30 +0200
Subject[PATCH v2 01/20] ar5523: constify usb_device_id
Message-ID<ucC1Q-1i5-21@gated-at.bofh.it>
In reply to#1707454
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 <arvind.yadav.cs@gmail.com>
---
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

[toc] | [prev] | [next] | [standalone]


#1708338 — Re: [v2,01/20] ar5523: constify usb_device_id

FromKalle Valo <kvalo@codeaurora.org>
Date2017-08-10 11:00 +0200
SubjectRe: [v2,01/20] ar5523: constify usb_device_id
Message-ID<ucRtT-323-11@gated-at.bofh.it>
In reply to#1707459
Arvind Yadav <arvind.yadav.cs@gmail.com> 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 <arvind.yadav.cs@gmail.com>

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

[toc] | [prev] | [next] | [standalone]


#1707461 — [PATCH v2 02/20] ath6kl: constify usb_device_id

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-09 18:30 +0200
Subject[PATCH v2 02/20] ath6kl: constify usb_device_id
Message-ID<ucC1Q-1i5-23@gated-at.bofh.it>
In reply to#1707454
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 <arvind.yadav.cs@gmail.com>
---
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

[toc] | [prev] | [next] | [standalone]


#1707952 — Re: [PATCH v2 02/20] ath6kl: constify usb_device_id

FromSteve deRosier <derosier@gmail.com>
Date2017-08-09 23:10 +0200
SubjectRe: [PATCH v2 02/20] ath6kl: constify usb_device_id
Message-ID<ucGoN-4hg-3@gated-at.bofh.it>
In reply to#1707461
On Wed, Aug 9, 2017 at 9:23 AM, Arvind Yadav <arvind.yadav.cs@gmail.com> 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 <arvind.yadav.cs@gmail.com>
> ---
> 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 <derosier@gmail.com>
Tested-by: Steve deRosier <derosier@gmail.com>

- Steve

[toc] | [prev] | [next] | [standalone]


#1709655 — Re: [v2,02/20] ath6kl: constify usb_device_id

FromKalle Valo <kvalo@qca.qualcomm.com>
Date2017-08-11 16:10 +0200
SubjectRe: [v2,02/20] ath6kl: constify usb_device_id
Message-ID<udiNs-4xf-15@gated-at.bofh.it>
In reply to#1707461
Arvind Yadav <arvind.yadav.cs@gmail.com> 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 <arvind.yadav.cs@gmail.com>
> Reviewed-by: Steve deRosier <derosier@gmail.com>
> Tested-by: Steve deRosier <derosier@gmail.com>
> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>

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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web