Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1718204 > unrolled thread
| Started by | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| First post | 2017-08-23 12:10 +0200 |
| Last post | 2017-08-23 12:10 +0200 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 0/3] constify *_ops Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-23 12:10 +0200
[PATCH 1/3] net: rtlwifi: constify rate_control_ops Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-23 12:10 +0200
Re: [1/3] net: rtlwifi: constify rate_control_ops Kalle Valo <kvalo@codeaurora.org> - 2017-08-24 12:00 +0200
[PATCH 2/3] net: rsi: mac80211: constify ieee80211_ops Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-23 12:10 +0200
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Date | 2017-08-23 12:10 +0200 |
| Subject | [PATCH 0/3] constify *_ops |
| Message-ID | <uhALL-7CP-7@gated-at.bofh.it> |
*_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
[toc] | [next] | [standalone]
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Date | 2017-08-23 12:10 +0200 |
| Subject | [PATCH 1/3] net: rtlwifi: constify rate_control_ops |
| Message-ID | <uhALM-7CP-25@gated-at.bofh.it> |
| In reply to | #1718204 |
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>
---
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
[toc] | [prev] | [next] | [standalone]
| From | Kalle Valo <kvalo@codeaurora.org> |
|---|---|
| Date | 2017-08-24 12:00 +0200 |
| Subject | Re: [1/3] net: rtlwifi: constify rate_control_ops |
| Message-ID | <uhX5D-4KB-1@gated-at.bofh.it> |
| In reply to | #1718205 |
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
[toc] | [prev] | [next] | [standalone]
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Date | 2017-08-23 12:10 +0200 |
| Subject | [PATCH 2/3] net: rsi: mac80211: constify ieee80211_ops |
| Message-ID | <uhALM-7CP-33@gated-at.bofh.it> |
| In reply to | #1718204 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web