netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] constify *_ops
@ 2017-08-23  9:59 Arvind Yadav
       [not found] ` <1503482375-19983-1-git-send-email-arvind.yadav.cs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Arvind Yadav @ 2017-08-23  9:59 UTC (permalink / raw)
  To: davem, Larry.Finger, chaoming_li, kvalo, jon.maloy, ying.xue
  Cc: linux-kernel, linux-wireless, netdev

*_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/rtlwifi/rc.c   | 2 +-
 drivers/net/wireless/rsi/rsi_91x_mac80211.c | 2 +-
 net/tipc/netlink_compat.c                   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

-- 
1.9.1

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

* [PATCH 1/3] net: rtlwifi: constify rate_control_ops
       [not found] ` <1503482375-19983-1-git-send-email-arvind.yadav.cs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-08-23  9:59   ` Arvind Yadav
  2017-08-24  9:57     ` [1/3] " Kalle Valo
  0 siblings, 1 reply; 7+ messages in thread
From: Arvind Yadav @ 2017-08-23  9:59 UTC (permalink / raw)
  To: davem-fT/PcQaiUtIeIZ0/mPfg9Q, Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ,
	chaoming_li-kXabqFNEczNtrwSWzY7KCg, kvalo-sgV2jX0FEOL9JmXXK+q4OQ,
	jon.maloy-IzeFyvvaP7pWk0Htik3J/w, ying.xue-CWA4WttNNZF54TAoqtyWWQ
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA

rate_control_ops are not supposed to change at runtime. All functions
working with rate_control_ops provided by <net/mac80211.h> work with
const rate_control_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/net/wireless/realtek/rtlwifi/rc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rc.c b/drivers/net/wireless/realtek/rtlwifi/rc.c
index 951d257..02811ed 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rc.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rc.c
@@ -283,7 +283,7 @@ static void rtl_rate_free_sta(void *rtlpriv,
 	kfree(rate_priv);
 }
 
-static struct rate_control_ops rtl_rate_ops = {
+static const struct rate_control_ops rtl_rate_ops = {
 	.name = "rtl_rc",
 	.alloc = rtl_rate_alloc,
 	.free = rtl_rate_free,
-- 
1.9.1

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

* [PATCH 2/3] net: rsi: mac80211: constify ieee80211_ops
  2017-08-23  9:59 [PATCH 0/3] constify *_ops Arvind Yadav
       [not found] ` <1503482375-19983-1-git-send-email-arvind.yadav.cs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-08-23  9:59 ` Arvind Yadav
  2017-08-23  9:59 ` [PATCH 3/3] net: rsi: netlink: constify genl_ops Arvind Yadav
  2 siblings, 0 replies; 7+ messages in thread
From: Arvind Yadav @ 2017-08-23  9:59 UTC (permalink / raw)
  To: davem, Larry.Finger, chaoming_li, kvalo, jon.maloy, ying.xue
  Cc: linux-kernel, linux-wireless, netdev

ieee80211_ops are not supposed to change at runtime. All functions
working with ieee80211_ops provided by <net/mac80211.h> work with
const ieee80211_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/net/wireless/rsi/rsi_91x_mac80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
index 021e5ac..67532fb 100644
--- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
@@ -1177,7 +1177,7 @@ static void rsi_reg_notify(struct wiphy *wiphy,
 	adapter->dfs_region = request->dfs_region;
 }
 
-static struct ieee80211_ops mac80211_ops = {
+static const struct ieee80211_ops mac80211_ops = {
 	.tx = rsi_mac80211_tx,
 	.start = rsi_mac80211_start,
 	.stop = rsi_mac80211_stop,
-- 
1.9.1

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

* [PATCH 3/3] net: rsi: netlink: constify genl_ops
  2017-08-23  9:59 [PATCH 0/3] constify *_ops Arvind Yadav
       [not found] ` <1503482375-19983-1-git-send-email-arvind.yadav.cs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2017-08-23  9:59 ` [PATCH 2/3] net: rsi: mac80211: constify ieee80211_ops Arvind Yadav
@ 2017-08-23  9:59 ` Arvind Yadav
  2017-08-23 10:02   ` Kalle Valo
  2 siblings, 1 reply; 7+ messages in thread
From: Arvind Yadav @ 2017-08-23  9:59 UTC (permalink / raw)
  To: davem, Larry.Finger, chaoming_li, kvalo, jon.maloy, ying.xue
  Cc: linux-kernel, linux-wireless, netdev

genl_ops are not supposed to change at runtime. All functions
working with genl_ops provided by <net/genetlink.h> work with
const genl_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 net/tipc/netlink_compat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/tipc/netlink_compat.c b/net/tipc/netlink_compat.c
index 750949d..e48f0b2 100644
--- a/net/tipc/netlink_compat.c
+++ b/net/tipc/netlink_compat.c
@@ -1217,7 +1217,7 @@ static int tipc_nl_compat_recv(struct sk_buff *skb, struct genl_info *info)
 	return err;
 }
 
-static struct genl_ops tipc_genl_compat_ops[] = {
+static const struct genl_ops tipc_genl_compat_ops[] = {
 	{
 		.cmd		= TIPC_GENL_CMD,
 		.doit		= tipc_nl_compat_recv,
-- 
1.9.1

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

* Re: [PATCH 3/3] net: rsi: netlink: constify genl_ops
  2017-08-23  9:59 ` [PATCH 3/3] net: rsi: netlink: constify genl_ops Arvind Yadav
@ 2017-08-23 10:02   ` Kalle Valo
  2017-08-23 10:05     ` Arvind Yadav
  0 siblings, 1 reply; 7+ messages in thread
From: Kalle Valo @ 2017-08-23 10:02 UTC (permalink / raw)
  To: Arvind Yadav
  Cc: davem, Larry.Finger, chaoming_li, jon.maloy, ying.xue,
	linux-kernel, linux-wireless, netdev

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

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

Using the prefix "rsi:" looks wrong for this patch.

-- 
Kalle Valo

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

* Re: [PATCH 3/3] net: rsi: netlink: constify genl_ops
  2017-08-23 10:02   ` Kalle Valo
@ 2017-08-23 10:05     ` Arvind Yadav
  0 siblings, 0 replies; 7+ messages in thread
From: Arvind Yadav @ 2017-08-23 10:05 UTC (permalink / raw)
  To: Kalle Valo
  Cc: davem, Larry.Finger, chaoming_li, jon.maloy, ying.xue,
	linux-kernel, linux-wireless, netdev

Hi,


On Wednesday 23 August 2017 03:32 PM, Kalle Valo wrote:
> Arvind Yadav <arvind.yadav.cs@gmail.com> writes:
>
>> genl_ops are not supposed to change at runtime. All functions
>> working with genl_ops provided by <net/genetlink.h> work with
>> const genl_ops. So mark the non-const structs as const.
>>
>> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
>> ---
>>   net/tipc/netlink_compat.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
> Using the prefix "rsi:" looks wrong for this patch.
Thanks for pointing. I will update.
>
~arvind

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

* Re: [1/3] net: rtlwifi: constify rate_control_ops
  2017-08-23  9:59   ` [PATCH 1/3] net: rtlwifi: constify rate_control_ops Arvind Yadav
@ 2017-08-24  9:57     ` Kalle Valo
  0 siblings, 0 replies; 7+ messages in thread
From: Kalle Valo @ 2017-08-24  9:57 UTC (permalink / raw)
  To: Arvind Yadav
  Cc: davem, Larry.Finger, chaoming_li, jon.maloy, ying.xue,
	linux-kernel, linux-wireless, netdev

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

> rate_control_ops are not supposed to change at runtime. All functions
> working with rate_control_ops provided by <net/mac80211.h> work with
> const rate_control_ops. So mark the non-const structs as const.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>

2 patches applied to wireless-drivers-next.git, thanks.

28b75415ad19 wireless: ipw2200: Replace PCI pool old API
9ea792a48cdd net: rsi: mac80211: constify ieee80211_ops

-- 
https://patchwork.kernel.org/patch/9917001/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

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

end of thread, other threads:[~2017-08-24  9:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-23  9:59 [PATCH 0/3] constify *_ops Arvind Yadav
     [not found] ` <1503482375-19983-1-git-send-email-arvind.yadav.cs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-08-23  9:59   ` [PATCH 1/3] net: rtlwifi: constify rate_control_ops Arvind Yadav
2017-08-24  9:57     ` [1/3] " Kalle Valo
2017-08-23  9:59 ` [PATCH 2/3] net: rsi: mac80211: constify ieee80211_ops Arvind Yadav
2017-08-23  9:59 ` [PATCH 3/3] net: rsi: netlink: constify genl_ops Arvind Yadav
2017-08-23 10:02   ` Kalle Valo
2017-08-23 10:05     ` Arvind Yadav

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