Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1705093 > unrolled thread

[PATCH v2] rtlwifi: constify rate_control_ops structure

Started byBhumika Goyal <bhumirks@gmail.com>
First post2017-08-07 07:10 +0200
Last post2017-08-08 14:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2] rtlwifi: constify rate_control_ops structure Bhumika Goyal <bhumirks@gmail.com> - 2017-08-07 07:10 +0200
    Re: [v2] rtlwifi: constify rate_control_ops structure Kalle Valo <kvalo@codeaurora.org> - 2017-08-08 14:00 +0200

#1705093 — [PATCH v2] rtlwifi: constify rate_control_ops structure

FromBhumika Goyal <bhumirks@gmail.com>
Date2017-08-07 07:10 +0200
Subject[PATCH v2] rtlwifi: constify rate_control_ops structure
Message-ID<ubIsG-3VF-5@gated-at.bofh.it>
rate_control_ops structure is only passed as an argument to the
function ieee80211_rate_control_{register/unregister}. This argument
is of type const, so declare the structure as const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
Changes in v2:
* Change subject line.

 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] | [next] | [standalone]


#1706432 — Re: [v2] rtlwifi: constify rate_control_ops structure

FromKalle Valo <kvalo@codeaurora.org>
Date2017-08-08 14:00 +0200
SubjectRe: [v2] rtlwifi: constify rate_control_ops structure
Message-ID<ucbl1-7TS-39@gated-at.bofh.it>
In reply to#1705093
Bhumika Goyal <bhumirks@gmail.com> wrote:

> rate_control_ops structure is only passed as an argument to the
> function ieee80211_rate_control_{register/unregister}. This argument
> is of type const, so declare the structure as const.
> 
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>

Patch applied to wireless-drivers-next.git, thanks.

cb1b82625de7 rtlwifi: constify rate_control_ops structure

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

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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web