Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1718205
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/3] net: rtlwifi: constify rate_control_ops |
| Date | 2017-08-23 12:10 +0200 |
| Message-ID | <uhALM-7CP-25@gated-at.bofh.it> (permalink) |
| References | <uhALL-7CP-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[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
csiph-web