linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/35] constify net usb_device_id
@ 2017-08-08 15:55 Arvind Yadav
  2017-08-08 15:55 ` [PATCH 01/35] can: ems_usb: constify usb_device_id Arvind Yadav
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Arvind Yadav @ 2017-08-08 15:55 UTC (permalink / raw)
  To: kvalo, wg, mkl, linux-can, netdev; +Cc: linux-kernel

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.

[PATCH 10/35] :Fix checkpatch.pl error.
ERROR: space prohibited before open square bracket '['.

Arvind Yadav (35):
  [PATCH 01/35] can: ems_usb: constify usb_device_id
  [PATCH 02/35] can: esd_usb2: constify usb_device_id
  [PATCH 03/35] can: peak_usb: constify usb_device_id
  [PATCH 04/35] net: irda: irda-usb: constify usb_device_id
  [PATCH 05/35] net: irda: kingsun: constify usb_device_id
  [PATCH 06/35] net: irda: ks959: constify usb_device_id
  [PATCH 07/35] net: irda: ksdazzle: constify usb_device_id
  [PATCH 08/35] net: irda: mcs7780: constify usb_device_id
  [PATCH 09/35] net: irda: stir4200: constify usb_device_id
  [PATCH 10/35] net: usb: catc: constify usb_device_id and and fix space before '[' error
  [PATCH 11/35] net: usb: cdc-phonet: constify usb_device_id
  [PATCH 12/35] net: usb: ipheth: constify usb_device_id
  [PATCH 13/35] net: usb: kaweth: constify usb_device_id
  [PATCH 14/35] net: usb: r8152: constify usb_device_id
  [PATCH 15/35] net: usb: rtl8150: constify usb_device_id
  [PATCH 16/35] wireless: ath: ar5523: constify usb_device_id
  [PATCH 17/35] wireless: ath: ath6kl: constify usb_device_id
  [PATCH 18/35] wireless: ath: ath9k: constify usb_device_id
  [PATCH 19/35] wireless: ath: carl9170: constify usb_device_id
  [PATCH 20/35] wireless: atmel: at76c50x: constify usb_device_id
  [PATCH 21/35] wireless: broadcom: brcm80211: constify usb_device_id
  [PATCH 22/35] wireless: intersil: orinoco: constify usb_device_id
  [PATCH 23/35] wireless: intersil: p54: constify usb_device_id
  [PATCH 24/35] wireless: marvell: libertas: constify usb_device_id
  [PATCH 25/35] wireless: marvell: libertas_tf: constify usb_device_id
  [PATCH 26/35] wireless: marvell: mwifiex: constify usb_device_id
  [PATCH 27/35] wireless: mediatek: mt7601u: constify usb_device_id
  [PATCH 28/35] wireless: ralink: rt2500usb: constify usb_device_id
  [PATCH 29/35] wireless: ralink: rt2800usb: constify usb_device_id
  [PATCH 30/35] wireless: ralink: rt73usb: constify usb_device_id
  [PATCH 31/35] wireless: realtek: rtl8187: constify usb_device_id
  [PATCH 32/35] wireless: realtek: rtl8xxxu: constify usb_device_id
  [PATCH 33/35] wireless: realtek: rtl8192cu: constify usb_device_id
  [PATCH 34/35] wireless: zydas: zd1201: constify usb_device_id
  [PATCH 35/35] wireless: zydas: zd1211rw: constify usb_device_id

 drivers/net/can/usb/ems_usb.c                          | 2 +-
 drivers/net/can/usb/esd_usb2.c                         | 2 +-
 drivers/net/can/usb/peak_usb/pcan_usb_core.c           | 2 +-
 drivers/net/irda/irda-usb.c                            | 2 +-
 drivers/net/irda/kingsun-sir.c                         | 2 +-
 drivers/net/irda/ks959-sir.c                           | 2 +-
 drivers/net/irda/ksdazzle-sir.c                        | 2 +-
 drivers/net/irda/mcs7780.c                             | 2 +-
 drivers/net/irda/stir4200.c                            | 2 +-
 drivers/net/usb/catc.c                                 | 2 +-
 drivers/net/usb/cdc-phonet.c                           | 2 +-
 drivers/net/usb/ipheth.c                               | 2 +-
 drivers/net/usb/kaweth.c                               | 2 +-
 drivers/net/usb/r8152.c                                | 2 +-
 drivers/net/usb/rtl8150.c                              | 2 +-
 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 +-
 35 files changed, 35 insertions(+), 35 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 01/35] can: ems_usb: constify usb_device_id
  2017-08-08 15:55 [PATCH 00/35] constify net usb_device_id Arvind Yadav
@ 2017-08-08 15:55 ` Arvind Yadav
  2017-08-08 15:55 ` [PATCH 02/35] can: esd_usb2: " Arvind Yadav
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Arvind Yadav @ 2017-08-08 15:55 UTC (permalink / raw)
  To: kvalo, wg, mkl, linux-can, netdev; +Cc: linux-kernel

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>
---
 drivers/net/can/usb/ems_usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c
index b3d0275..c78f3a8 100644
--- a/drivers/net/can/usb/ems_usb.c
+++ b/drivers/net/can/usb/ems_usb.c
@@ -222,7 +222,7 @@ struct __packed ems_cpc_msg {
  * Table of devices that work with this driver
  * NOTE: This driver supports only CPC-USB/ARM7 (LPC2119) yet.
  */
-static struct usb_device_id ems_usb_table[] = {
+static const struct usb_device_id ems_usb_table[] = {
 	{USB_DEVICE(USB_CPCUSB_VENDOR_ID, USB_CPCUSB_ARM7_PRODUCT_ID)},
 	{} /* Terminating entry */
 };
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 02/35] can: esd_usb2: constify usb_device_id
  2017-08-08 15:55 [PATCH 00/35] constify net usb_device_id Arvind Yadav
  2017-08-08 15:55 ` [PATCH 01/35] can: ems_usb: constify usb_device_id Arvind Yadav
@ 2017-08-08 15:55 ` Arvind Yadav
  2017-08-08 15:55 ` [PATCH 03/35] can: peak_usb: " Arvind Yadav
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Arvind Yadav @ 2017-08-08 15:55 UTC (permalink / raw)
  To: kvalo, wg, mkl, linux-can, netdev; +Cc: linux-kernel

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>
---
 drivers/net/can/usb/esd_usb2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/can/usb/esd_usb2.c b/drivers/net/can/usb/esd_usb2.c
index be928ce..00564d7 100644
--- a/drivers/net/can/usb/esd_usb2.c
+++ b/drivers/net/can/usb/esd_usb2.c
@@ -183,7 +183,7 @@ struct __attribute__ ((packed)) esd_usb2_msg {
 	} msg;
 };
 
-static struct usb_device_id esd_usb2_table[] = {
+static const struct usb_device_id esd_usb2_table[] = {
 	{USB_DEVICE(USB_ESDGMBH_VENDOR_ID, USB_CANUSB2_PRODUCT_ID)},
 	{USB_DEVICE(USB_ESDGMBH_VENDOR_ID, USB_CANUSBM_PRODUCT_ID)},
 	{}
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 03/35] can: peak_usb: constify usb_device_id
  2017-08-08 15:55 [PATCH 00/35] constify net usb_device_id Arvind Yadav
  2017-08-08 15:55 ` [PATCH 01/35] can: ems_usb: constify usb_device_id Arvind Yadav
  2017-08-08 15:55 ` [PATCH 02/35] can: esd_usb2: " Arvind Yadav
@ 2017-08-08 15:55 ` Arvind Yadav
  2017-08-08 18:36 ` [PATCH 00/35] constify net usb_device_id Kalle Valo
  2017-08-10 11:02 ` Marc Kleine-Budde
  4 siblings, 0 replies; 6+ messages in thread
From: Arvind Yadav @ 2017-08-08 15:55 UTC (permalink / raw)
  To: kvalo, wg, mkl, linux-can, netdev; +Cc: linux-kernel

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>
---
 drivers/net/can/usb/peak_usb/pcan_usb_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c b/drivers/net/can/usb/peak_usb/pcan_usb_core.c
index 1ca76e0..538be60 100644
--- a/drivers/net/can/usb/peak_usb/pcan_usb_core.c
+++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.c
@@ -34,7 +34,7 @@ MODULE_DESCRIPTION("CAN driver for PEAK-System USB adapters");
 MODULE_LICENSE("GPL v2");
 
 /* Table of devices that work with this driver */
-static struct usb_device_id peak_usb_table[] = {
+static const struct usb_device_id peak_usb_table[] = {
 	{USB_DEVICE(PCAN_USB_VENDOR_ID, PCAN_USB_PRODUCT_ID)},
 	{USB_DEVICE(PCAN_USB_VENDOR_ID, PCAN_USBPRO_PRODUCT_ID)},
 	{USB_DEVICE(PCAN_USB_VENDOR_ID, PCAN_USBFD_PRODUCT_ID)},
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 00/35] constify net usb_device_id
  2017-08-08 15:55 [PATCH 00/35] constify net usb_device_id Arvind Yadav
                   ` (2 preceding siblings ...)
  2017-08-08 15:55 ` [PATCH 03/35] can: peak_usb: " Arvind Yadav
@ 2017-08-08 18:36 ` Kalle Valo
  2017-08-10 11:02 ` Marc Kleine-Budde
  4 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2017-08-08 18:36 UTC (permalink / raw)
  To: Arvind Yadav; +Cc: wg, mkl, linux-can, netdev, linux-kernel

Arvind Yadav <arvind.yadav.cs@gmail.com> writes:

> 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.

[...]

>   [PATCH 16/35] wireless: ath: ar5523: constify usb_device_id
>   [PATCH 17/35] wireless: ath: ath6kl: constify usb_device_id
>   [PATCH 18/35] wireless: ath: ath9k: constify usb_device_id
>   [PATCH 19/35] wireless: ath: carl9170: constify usb_device_id
>   [PATCH 20/35] wireless: atmel: at76c50x: constify usb_device_id
>   [PATCH 21/35] wireless: broadcom: brcm80211: constify usb_device_id
>   [PATCH 22/35] wireless: intersil: orinoco: constify usb_device_id
>   [PATCH 23/35] wireless: intersil: p54: constify usb_device_id
>   [PATCH 24/35] wireless: marvell: libertas: constify usb_device_id
>   [PATCH 25/35] wireless: marvell: libertas_tf: constify usb_device_id
>   [PATCH 26/35] wireless: marvell: mwifiex: constify usb_device_id
>   [PATCH 27/35] wireless: mediatek: mt7601u: constify usb_device_id
>   [PATCH 28/35] wireless: ralink: rt2500usb: constify usb_device_id
>   [PATCH 29/35] wireless: ralink: rt2800usb: constify usb_device_id
>   [PATCH 30/35] wireless: ralink: rt73usb: constify usb_device_id
>   [PATCH 31/35] wireless: realtek: rtl8187: constify usb_device_id
>   [PATCH 32/35] wireless: realtek: rtl8xxxu: constify usb_device_id
>   [PATCH 33/35] wireless: realtek: rtl8192cu: constify usb_device_id
>   [PATCH 34/35] wireless: zydas: zd1201: constify usb_device_id
>   [PATCH 35/35] wireless: zydas: zd1211rw: constify usb_device_id

No need to put the whole path to the title, it's enough to have the name
of the driver there. For example:

[PATCH 16/35] ar5523: constify usb_device_id
[PATCH 17/35] ath6kl: constify usb_device_id
[PATCH 18/35] ath9k: constify usb_device_id

Please resubmit the wireless patches separately in their own patchset.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 00/35] constify net usb_device_id
  2017-08-08 15:55 [PATCH 00/35] constify net usb_device_id Arvind Yadav
                   ` (3 preceding siblings ...)
  2017-08-08 18:36 ` [PATCH 00/35] constify net usb_device_id Kalle Valo
@ 2017-08-10 11:02 ` Marc Kleine-Budde
  4 siblings, 0 replies; 6+ messages in thread
From: Marc Kleine-Budde @ 2017-08-10 11:02 UTC (permalink / raw)
  To: Arvind Yadav, kvalo, wg, linux-can, netdev; +Cc: linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 918 bytes --]

On 08/08/2017 05:55 PM, Arvind Yadav 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.
> 
> [PATCH 10/35] :Fix checkpatch.pl error.
> ERROR: space prohibited before open square bracket '['.
> 
> Arvind Yadav (35):
>   [PATCH 01/35] can: ems_usb: constify usb_device_id
>   [PATCH 02/35] can: esd_usb2: constify usb_device_id
>   [PATCH 03/35] can: peak_usb: constify usb_device_id

For the CAN patches:

Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>

regards,
Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-08-10 11:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-08 15:55 [PATCH 00/35] constify net usb_device_id Arvind Yadav
2017-08-08 15:55 ` [PATCH 01/35] can: ems_usb: constify usb_device_id Arvind Yadav
2017-08-08 15:55 ` [PATCH 02/35] can: esd_usb2: " Arvind Yadav
2017-08-08 15:55 ` [PATCH 03/35] can: peak_usb: " Arvind Yadav
2017-08-08 18:36 ` [PATCH 00/35] constify net usb_device_id Kalle Valo
2017-08-10 11:02 ` Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).