linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
To: Larry.Finger@lwfinger.net, chaoming_li@realsil.com.cn,
	kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 03/11] rtlwifi: rtl8821ae: constify pci_device_id.
Date: Mon, 17 Jul 2017 23:39:51 +0530	[thread overview]
Message-ID: <1500314995-3181-4-git-send-email-arvind.yadav.cs@gmail.com> (raw)
In-Reply-To: <1500314995-3181-1-git-send-email-arvind.yadav.cs@gmail.com>

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

File size before:
   text	   data	    bss	    dec	    hex	filename
   2491	    960	      0	   3451	    d7b	realtek/rtlwifi/rtl8821ae/sw.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
   2587	    864	      0	   3451	    d7b	realtek/rtlwifi/rtl8821ae/sw.o

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

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c
index d71d277..d94e179 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/sw.c
@@ -424,7 +424,7 @@ static const struct rtl_hal_cfg rtl8821ae_hal_cfg = {
 	.maps[RTL_RC_VHT_RATE_2SS_MCS9] = DESC_RATEVHT2SS_MCS9,
 };
 
-static struct pci_device_id rtl8821ae_pci_ids[] = {
+static const struct pci_device_id rtl8821ae_pci_ids[] = {
 	{RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8812, rtl8821ae_hal_cfg)},
 	{RTL_PCI_DEVICE(PCI_VENDOR_ID_REALTEK, 0x8821, rtl8821ae_hal_cfg)},
 	{},
-- 
2.7.4

  parent reply	other threads:[~2017-07-17 18:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-17 18:09 [PATCH 00/11] constify net pci_device_id Arvind Yadav
2017-07-17 18:09 ` [PATCH 01/11] rtlwifi: rtl8192de: constify pci_device_id Arvind Yadav
2017-07-17 20:14   ` Larry Finger
2017-08-03 10:06   ` [01/11] " Kalle Valo
2017-07-17 18:09 ` [PATCH 02/11] rtlwifi: rtl8192se: " Arvind Yadav
2017-07-17 18:09 ` Arvind Yadav [this message]
2017-07-17 18:09 ` [PATCH 04/11] rtlwifi: rtl8723ae: " Arvind Yadav
2017-07-17 18:09 ` [PATCH 05/11] rtlwifi: rtl8723be: " Arvind Yadav
2017-07-17 18:09 ` [PATCH 06/11] rtlwifi: rtl8188ee: " Arvind Yadav
2017-07-17 18:09 ` [PATCH 07/11] rtlwifi: rtl8192ee: " Arvind Yadav

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1500314995-3181-4-git-send-email-arvind.yadav.cs@gmail.com \
    --to=arvind.yadav.cs@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=chaoming_li@realsil.com.cn \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).