[PATCH v3] ssb: use put_device() if device_register fail

2018-03-07 Thread Arvind Yadav
Never directly free @dev after calling device_register(), even if it returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- changes in v2: Removed kfree() call for @dev. changes

[PATCH v2] ssb: use put_device() if device_register fail

2018-03-07 Thread Arvind Yadav
Never directly free @dev after calling device_register(), even if it returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- changes in v2: Removed kfree() call for @dev. drivers/ssb/main

[PATCH] ssb:: use put_device() if device_register fail

2018-03-07 Thread Arvind Yadav
if device_register() returned an error! Always use put_device() to give up the reference initialized. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/ssb/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c index 65420a9..c

[PATCH] NFC: Handle return value of skb_dequeue()

2017-12-16 Thread Arvind Yadav
skb_dequeue() will return NULL for an empty list or a pointer to the head element. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- net/nfc/rawsock.c | 4 1 file changed, 4 insertions(+) diff --git a/net/nfc/rawsock.c b/net/nfc/rawsock.c index e2188de..c6de1ac 100644 ---

[PATCH] nfc: pn544: mei: constify mei_cl_device_id

2017-08-26 Thread Arvind Yadav
mei_cl_device_id are not supposed to change at runtime. mei driver is working with const 'id_table'. So mark the non-const mei_cl_device_id structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/nfc/pn544/mei.c | 2 +- 1 file changed, 1 insertion(+), 1 de

[PATCH] nfc: microread: mei: constify mei_cl_device_id

2017-08-26 Thread Arvind Yadav
mei_cl_device_id are not supposed to change at runtime. mei driver is working with const 'id_table'. So mark the non-const mei_cl_device_id structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/nfc/microread/mei.c | 2 +- 1 file changed, 1 insertion(+), 1 de

[PATCH 3/3 v3] net: tipc: constify genl_ops

2017-08-23 Thread Arvind Yadav
genl_ops are not supposed to change at runtime. All functions working with genl_ops provided by work with const genl_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- Changes in v2: Patch Subject was wrong. changes

Re: [PATCH 3/3 v2] net: netlink: constify genl_ops

2017-08-23 Thread Arvind Yadav
Hi Kalle, On Wednesday 23 August 2017 03:50 PM, Kalle Valo wrote: Arvind Yadav <arvind.yadav...@gmail.com> writes: genl_ops are not supposed to change at runtime. All functions working with genl_ops provided by work with const genl_ops. So mark the non-const structs as const. Sign

[PATCH 3/3 v2] net: netlink: constify genl_ops

2017-08-23 Thread Arvind Yadav
genl_ops are not supposed to change at runtime. All functions working with genl_ops provided by work with const genl_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- Changes in v2: Patch Subject was wrong. ne

Re: [PATCH 3/3] net: rsi: netlink: constify genl_ops

2017-08-23 Thread Arvind Yadav
Hi, On Wednesday 23 August 2017 03:32 PM, Kalle Valo wrote: Arvind Yadav <arvind.yadav...@gmail.com> writes: genl_ops are not supposed to change at runtime. All functions working with genl_ops provided by work with const genl_ops. So mark the non-const structs as const. Sign

[PATCH 0/3] constify *_ops

2017-08-23 Thread Arvind Yadav
*_ops are not supposed to change at runtime and none of the structures is modified. Arvind Yadav (3): [PATCH 1/3] net: rtlwifi: constify rate_control_ops [PATCH 2/3] net: rsi: mac80211: constify ieee80211_ops [PATCH 3/3] net: rsi: netlink: constify genl_ops drivers/net/wireless/realtek

[PATCH 2/3] net: rsi: mac80211: constify ieee80211_ops

2017-08-23 Thread Arvind Yadav
ieee80211_ops are not supposed to change at runtime. All functions working with ieee80211_ops provided by work with const ieee80211_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/rsi/rsi_91x_mac80211.c | 2 +-

[PATCH 1/3] net: rtlwifi: constify rate_control_ops

2017-08-23 Thread Arvind Yadav
rate_control_ops are not supposed to change at runtime. All functions working with rate_control_ops provided by work with const rate_control_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/realtek/rtlwifi/rc

[PATCH 3/3] net: rsi: netlink: constify genl_ops

2017-08-23 Thread Arvind Yadav
genl_ops are not supposed to change at runtime. All functions working with genl_ops provided by work with const genl_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- net/tipc/netlink_compat.c | 2 +- 1 file changed, 1 insertion

[PATCH 0/8] constify nfc i2c_device_id

2017-08-21 Thread Arvind Yadav
i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by work with const i2c_device_id. So mark the non-const structs as const. Arvind Yadav (8): [PATCH 1/8] nfc: microread: constify i2c_device_id [PATCH 2/8] nfc: nfcmrvl: constify

[PATCH 1/8] nfc: microread: constify i2c_device_id

2017-08-21 Thread Arvind Yadav
i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/nfc/microread/i2c.c | 2 +- 1 file chan

[PATCH 3/8] nfc: nxp-nci: constify i2c_device_id

2017-08-21 Thread Arvind Yadav
i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/nfc/nxp-nci/i2c.c | 2 +- 1 file chan

[PATCH 2/8] nfc: nfcmrvl: constify i2c_device_id

2017-08-21 Thread Arvind Yadav
i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/nfc/nfcmrvl/i2c.c | 2 +- 1 file chan

[PATCH 4/8] nfc: pn533: constify i2c_device_id

2017-08-21 Thread Arvind Yadav
i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/nfc/pn533/i2c.c | 2 +- 1 file chan

[PATCH 5/8] nfc: pn544: constify i2c_device_id

2017-08-21 Thread Arvind Yadav
i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/nfc/pn544/i2c.c | 2 +- 1 file chan

[PATCH 6/8] nfc: s3fwrn5: constify i2c_device_id

2017-08-21 Thread Arvind Yadav
i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/nfc/s3fwrn5/i2c.c | 2 +- 1 file chan

[PATCH 7/8] nfc: st-nci: constify i2c_device_id

2017-08-21 Thread Arvind Yadav
i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/nfc/st-nci/i2c.c | 2 +- 1 file chan

[PATCH 8/8] nfc: st21nfca: constify i2c_device_id

2017-08-21 Thread Arvind Yadav
i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/nfc/st21nfca/i2c.c | 2 +- 1 file chan

[PATCH v3 06/20] brcm80211: constify usb_device_id

2017-08-10 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- changes in v2: Re-submitting wi

[PATCH] NFC: nfcmrvl: constify usb_device_id

2017-08-09 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/nfc/nfcmrvl/usb.c | 2 +- 1 file chan

[PATCH v2 15/20] rt73usb: constify usb_device_id

2017-08-09 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- changes in v2: Re-submitting wi

[PATCH v2 13/20] rt2500usb: constify usb_device_id

2017-08-09 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- changes in v2: Re-submitting wi

[PATCH v2 17/20] rtl8xxxu: constify usb_device_id

2017-08-09 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- changes in v2: Re-submitting wi

[PATCH v2 20/20] zd1211rw: constify usb_device_id

2017-08-09 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- changes in v2: Re-submitting wi

[PATCH v2 19/20] zd1201: constify usb_device_id

2017-08-09 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- changes in v2: Re-submitting wi

[PATCH v2 18/20] rtl8192cu: constify usb_device_id

2017-08-09 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- changes in v2: Re-submitting wi

[PATCH v2 16/20] rtl8187: constify usb_device_id

2017-08-09 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- changes in v2: Re-submitting wi

[PATCH v2 14/20] rt2800usb: constify usb_device_id

2017-08-09 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- changes in v2: Re-submitting wi

[PATCH v2 10/20] libertas_tf: constify usb_device_id

2017-08-09 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- changes in v2: Re-submitting wi

[PATCH v2 12/20] mt7601u: constify usb_device_id

2017-08-09 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- changes in v2: Re-submitting wi

[PATCH v2 11/20] mwifiex: constify usb_device_id

2017-08-09 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- changes in v2: Re-submitting wi

[PATCH v2 09/20] libertas: constify usb_device_id

2017-08-09 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- changes in v2: Re-submitting wi

[PATCH v2 08/20] p54: constify usb_device_id

2017-08-09 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- changes in v2: Re-submitting wi

[PATCH v2 07/20] orinoco: constify usb_device_id

2017-08-09 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- changes in v2: Re-submitting wi

[PATCH v2 02/20] ath6kl: constify usb_device_id

2017-08-09 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- changes in v2: Re-submitting wi

[PATCH v2 05/20] at76c50x: constify usb_device_id

2017-08-09 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- changes in v2: Re-submitting wi

[PATCH v2 04/20] carl9170: constify usb_device_id

2017-08-09 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- changes in v2: Re-submitting wi

[PATCH v2 03/20] ath9k: constify usb_device_id

2017-08-09 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- changes in v2: Re-submitting wi

[PATCH v2 00/20] constify wireless usb_device_id

2017-08-09 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by 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 22/35] wireless: intersil: orinoco: constify usb_device_id

2017-08-08 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/intersil/orinoco/orinoco_usb

[PATCH 23/35] wireless: intersil: p54: constify usb_device_id

2017-08-08 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/intersil/p54/p54usb.c | 2 +-

[PATCH 24/35] wireless: marvell: libertas: constify usb_device_id

2017-08-08 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/marvell/libertas/if_usb.c | 2

[PATCH 33/35] wireless: realtek: rtl8192cu: constify usb_device_id

2017-08-08 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw

[PATCH 25/35] wireless: marvell: libertas_tf: constify usb_device_id

2017-08-08 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/marvell/libertas_tf/if_usb

[PATCH 35/35] wireless: zydas: zd1211rw: constify usb_device_id

2017-08-08 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/zydas/zd1211rw/zd_usb.c | 2

[PATCH 34/35] wireless: zydas: zd1201: constify usb_device_id

2017-08-08 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/zydas/zd1201.c | 2 +- 1 file c

[PATCH 28/35] wireless: ralink: rt2500usb: constify usb_device_id

2017-08-08 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/ralink/rt2x00/rt2500usb.c | 2

[PATCH 32/35] wireless: realtek: rtl8xxxu: constify usb_device_id

2017-08-08 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core

[PATCH 30/35] wireless: ralink: rt73usb: constify usb_device_id

2017-08-08 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/ralink/rt2x00/rt73usb.c | 2

[PATCH 26/35] wireless: marvell: mwifiex: constify usb_device_id

2017-08-08 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/marvell/mwifiex/usb.c | 2 +-

[PATCH 27/35] wireless: mediatek: mt7601u: constify usb_device_id

2017-08-08 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/mediatek/mt7601u/usb.c | 2 +-

[PATCH 21/35] wireless: broadcom: brcm80211: constify usb_device_id

2017-08-08 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb

[PATCH 20/35] wireless: atmel: at76c50x: constify usb_device_id

2017-08-08 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/atmel/at76c50x-usb.c | 2 +-

[PATCH 19/35] wireless: ath: carl9170: constify usb_device_id

2017-08-08 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/ath/carl9170/usb.c | 2 +-

[PATCH 18/35] wireless: ath: ath9k: constify usb_device_id

2017-08-08 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/ath/ath9k/hif_usb.c | 2 +-

[PATCH 16/35] wireless: ath: ar5523: constify usb_device_id

2017-08-08 Thread Arvind Yadav
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/ath/ar5523/ar5523.c | 2 +-

Re: [PATCH v2 00/10] Constify attribute_group structures

2017-07-26 Thread Arvind Yadav
Hi Kalle, On Tuesday 25 July 2017 06:25 PM, Kalle Valo wrote: Arvind Yadav <arvind.yadav...@gmail.com> writes: attribute_groups are not supposed to change at runtime. So mark the non-const structs as const. Arvind Yadav (10): [PATCH v2 01/10] net: cdc_ncm: constify attribute

Re: [PATCH v2 00/10] Constify attribute_group structures

2017-07-26 Thread Arvind Yadav
Hi Kalle, On Tuesday 25 July 2017 06:25 PM, Kalle Valo wrote: Arvind Yadav <arvind.yadav...@gmail.com> writes: attribute_groups are not supposed to change at runtime. So mark the non-const structs as const. Arvind Yadav (10): [PATCH v2 01/10] net: cdc_ncm: constify attribute

[PATCH v3 05/10] wireless: ipw2100: constify attribute_group structures.

2017-07-18 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- Changes in v2: Added cover

[PATCH v3 06/10] wireless: iwlegacy: constify attribute_group structures.

2017-07-18 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- Changes in v2: Added cover

[PATCH v3 04/10] wireless: ipw2200: constify attribute_group structures.

2017-07-18 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- Changes in v2: Added cover

[PATCH v3 07/10] wireless: iwlegacy: Constify attribute_group structures.

2017-07-18 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- Changes in v2: Added cover

[PATCH 11/11] net: brcmfmac: constify pci_device_id.

2017-07-17 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/

[PATCH 10/11] net: qtnfmac: constify pci_device_id.

2017-07-17 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/quantenna/qtnfmac/pearl/pcie

[PATCH 00/11] constify net pci_device_id

2017-07-17 Thread Arvind Yadav
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by work with const pci_device_id. So mark the non-const structs as const. Arvind Yadav (11): [PATCH 01/11] rtlwifi: rtl8192de: constify pci_device_id. [PATCH 02/11] rtlwifi: rtl8192se

[PATCH 02/11] rtlwifi: rtl8192se: constify pci_device_id.

2017-07-17 Thread Arvind Yadav
/rtlwifi/rtl8192se/sw.o File size After adding 'const': textdata bss dec hex filename 3009 848 03857 f11 realtek/rtlwifi/rtl8192se/sw.o Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/realtek/rtlwifi/rtl8192se/sw.c | 2 +-

[PATCH 01/11] rtlwifi: rtl8192de: constify pci_device_id.

2017-07-17 Thread Arvind Yadav
/rtlwifi/rtl8192de/sw.o File size After adding 'const': textdata bss dec hex filename 2929 849 123790 ece realtek/rtlwifi/rtl8192de/sw.o Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c | 2 +-

[PATCH 03/11] rtlwifi: rtl8821ae: constify pci_device_id.

2017-07-17 Thread Arvind Yadav
/rtlwifi/rtl8821ae/sw.o File size After adding 'const': textdata bss dec hex filename 2587 864 03451 d7b realtek/rtlwifi/rtl8821ae/sw.o Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c | 2 +-

[PATCH 06/11] rtlwifi: rtl8188ee: constify pci_device_id.

2017-07-17 Thread Arvind Yadav
/rtlwifi/rtl8188ee/sw.o File size After adding 'const': textdata bss dec hex filename 3154 848 04002 fa2 realtek/rtlwifi/rtl8188ee/sw.o Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c | 2 +-

[PATCH 05/11] rtlwifi: rtl8723be: constify pci_device_id.

2017-07-17 Thread Arvind Yadav
/rtlwifi/rtl8723be/sw.o File size After adding 'const': textdata bss dec hex filename 3096 848 03944 f68 realtek/rtlwifi/rtl8723be/sw.o Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/realtek/rtlwifi/rtl8723be/sw.c | 2 +-

[PATCH 04/11] rtlwifi: rtl8723ae: constify pci_device_id.

2017-07-17 Thread Arvind Yadav
/rtlwifi/rtl8723ae/sw.o File size After adding 'const': textdata bss dec hex filename 2839 848 03687 e67 realtek/rtlwifi/rtl8723ae/sw.o Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/sw.c | 2 +-

[PATCH 07/11] rtlwifi: rtl8192ee: constify pci_device_id.

2017-07-17 Thread Arvind Yadav
/rtlwifi/rtl8192ee/sw.o File size After adding 'const': textdata bss dec hex filename 1963 864 02827 b0b realtek/rtlwifi/rtl8192ee/sw.o Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/sw.c | 2 +-

[PATCH v2 06/10] wireless: iwlegacy: constify attribute_group structures.

2017-07-11 Thread Arvind Yadav
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- Changes in v2: Added cover

[PATCH v2 07/10] wireless: iwlegacy: Constify attribute_group structures.

2017-07-11 Thread Arvind Yadav
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- Changes in v2: Added cover

[PATCH v2 00/10] Constify attribute_group structures

2017-07-11 Thread Arvind Yadav
attribute_groups are not supposed to change at runtime. So mark the non-const structs as const. Arvind Yadav (10): [PATCH v2 01/10] net: cdc_ncm: constify attribute_group structures. [PATCH v2 02/10] net: can: at91_can: constify attribute_group structures. [PATCH v2 03/10] net: can: janz

[PATCH v2 05/10] wireless: ipw2100: constify attribute_group structures.

2017-07-11 Thread Arvind Yadav
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- Changes in v2: Added cover

[PATCH v2 04/10] wireless: ipw2200: constify attribute_group structures.

2017-07-11 Thread Arvind Yadav
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- Changes in v2: Added cover

[PATCH] wireless: iwlegacy: Constify attribute_group structures.

2017-07-10 Thread Arvind Yadav
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/intel/iwlegacy/4965-mac

[PATCH] wireless: iwlegacy: constify attribute_group structures.

2017-07-10 Thread Arvind Yadav
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/intel/iwlegacy/3945-mac

[PATCH] wireless: ipw2100: constify attribute_group structures.

2017-07-10 Thread Arvind Yadav
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/intel/ipw2x00/ipw2100

[PATCH] wireless: ipw2200: constify attribute_group structures.

2017-07-10 Thread Arvind Yadav
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/net/wireless/intel/ipw2x00/ipw2200

[PATCH] nfc: nxp-nci: constify acpi_device_id.

2017-07-06 Thread Arvind Yadav
/nfc/nxp-nci/i2c.o File size After adding 'const': textdata bss dec hex filename 2272 336 02608 a30 drivers/nfc/nxp-nci/i2c.o Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/nfc/nxp-nci/i2c.c | 2 +- 1 file changed, 1 insertion

[v5.1] ucc_fast: Fix to avoid IS_ERR_VALUE abuses and dead code on 64bit systems.

2016-08-08 Thread Arvind Yadav
oc will return any error, Then IS_ERR_VALUE will always return 0. it'll not call ucc_fast_free for any failure. Inside 'if code' will be a dead code on 64bit. This patch is to avoid this problem on 64bit machine. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- include/soc/fsl/qe/u

[5.3] ucc_geth: Fix to avoid IS_ERR_VALUE abuses and dead code on 64bit systems.

2016-08-08 Thread Arvind Yadav
rror, Then IS_ERR_VALUE will always return 0. it'll not call ucc_fast_free for any failure. Inside 'if code' will be a dead code on 64bit. Even qe_muram_addr will return wrong virtual address. Which can cause an error. kfree((void *)ugeth->tx_bd_ring_offset[i]); which is not 64-bit safe when tx_

[v5.2] ucc_slow: Fix to avoid IS_ERR_VALUE abuses and dead code on 64bit systems.

2016-08-05 Thread Arvind Yadav
t).If qe_muram_alloc will return any error, Then IS_ERR_VALUE will always return 0. it'll not call ucc_fast_free for any failure. Inside 'if code' will be a dead code on 64bit. Even qe_muram_addr will return wrong virtual address. Which can cause an error. This patch is to avoid this problem on 64bit

Re: [v5.1] ucc_fast: Fix to avoid IS_ERR_VALUE abuses and dead code on 64bit systems.

2016-08-05 Thread arvind Yadav
On Friday 05 August 2016 02:01 AM, Arnd Bergmann wrote: On Thursday, August 4, 2016 10:22:43 PM CEST Arvind Yadav wrote: index df8ea79..ada9070 100644 --- a/include/soc/fsl/qe/ucc_fast.h +++ b/include/soc/fsl/qe/ucc_fast.h @@ -165,10 +165,12 @@ struct ucc_fast_private { int

Re: [v4] Fix to avoid IS_ERR_VALUE and IS_ERR abuses on 64bit systems.

2016-08-03 Thread arvind Yadav
On Wednesday 03 August 2016 01:27 AM, Scott Wood wrote: On 08/02/2016 10:34 AM, arvind Yadav wrote: On Tuesday 02 August 2016 01:15 PM, Arnd Bergmann wrote: On Monday, August 1, 2016 4:55:43 PM CEST Scott Wood wrote: On 08/01/2016 02:02 AM, Arnd Bergmann wrote: diff --git a/include/linux

Re: [v4] Fix to avoid IS_ERR_VALUE and IS_ERR abuses on 64bit systems.

2016-08-02 Thread arvind Yadav
On Tuesday 02 August 2016 01:15 PM, Arnd Bergmann wrote: On Monday, August 1, 2016 4:55:43 PM CEST Scott Wood wrote: On 08/01/2016 02:02 AM, Arnd Bergmann wrote: diff --git a/include/linux/err.h b/include/linux/err.h index 1e35588..c2a2789 100644 --- a/include/linux/err.h +++

[v4] Fix to avoid IS_ERR_VALUE and IS_ERR abuses on 64bit systems.

2016-08-01 Thread Arvind Yadav
4bit system as well. First 32bit of Value of (unsigned int)-4095 and (unsigned long)-4095 will be equal. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- include/linux/err.h | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/include/linux/err.h b/in

Re: [v3] UCC_GETH/UCC_FAST: Use IS_ERR_VALUE_U32 API to avoid IS_ERR_VALUE abuses.

2016-07-27 Thread arvind Yadav
I am also agree with Arnd Bergmann. We should use 'static inline function' instead of macro to deal with error check. On Tuesday 26 July 2016 05:09 PM, Arnd Bergmann wrote: On Saturday, July 23, 2016 11:35:51 PM CEST Arvind Yadav wrote: diff --git a/include/linux/err.h b/include/linux/err.h

[v3] UCC_GETH/UCC_FAST: Use IS_ERR_VALUE_U32 API to avoid IS_ERR_VALUE abuses.

2016-07-23 Thread Arvind Yadav
short' or 'unsigned int'argument into IS_ERR_VALUE() is guaranteed to be broken, as are 8-bit integers and types that are wider than 'unsigned long'. Any user will get compilation warning for that do not pass an unsigned long' argument. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.

Re: [v1] ErrHandling:Make IS_ERR_VALUE_U32 as generic API to avoid IS_ERR_VALUE abuses.

2016-07-09 Thread arvind Yadav
Hi, I have summited one more version-2 patch. Please test on that. please share your result with us. Thanks, Arvind yadav On Saturday 09 July 2016 10:08 PM, kbuild test robot wrote: Hi, [auto build test WARNING on v4.7-rc6] [also build test WARNING on next-20160708] [if your patch

[v2] ErrHandling:Make IS_ERR_VALUE_U32 as generic API to avoid IS_ERR_VALUE abuses.

2016-07-09 Thread Arvind Yadav
'unsigned int' arguments. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/bcma/scan.c | 1 - include/linux/err.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/bcma/scan.c b/drivers/bcma/scan.c index 4a2d1b2..3bc77eb 100644 --- a/drivers/bcma/

[v1] ErrHandling:Make IS_ERR_VALUE_U32 as generic API to avoid IS_ERR_VALUE abuses.

2016-07-09 Thread Arvind Yadav
'unsigned int' arguments. Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com> --- drivers/bcma/scan.c | 1 - include/linux/err.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/bcma/scan.c b/drivers/bcma/scan.c index 4a2d1b2..3bc77eb 100644 --- a/drivers/bcma/