From patchwork Mon Jul 17 18:09:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9845897 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 69E0E60386 for ; Mon, 17 Jul 2017 18:11:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E59028515 for ; Mon, 17 Jul 2017 18:11:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 518AB2851E; Mon, 17 Jul 2017 18:11:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F2C0B28515 for ; Mon, 17 Jul 2017 18:11:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751413AbdGQSKS (ORCPT ); Mon, 17 Jul 2017 14:10:18 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:34061 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751312AbdGQSKQ (ORCPT ); Mon, 17 Jul 2017 14:10:16 -0400 Received: by mail-pf0-f193.google.com with SMTP id o88so2253954pfk.1; Mon, 17 Jul 2017 11:10:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=oThFCfb/dZXgTRvCXmmcWB0misIL8P+DmXORl8aTtIo=; b=Ki4nobp0CBgeMCykEHfPSNNPySk3XaPfkGMWsq6JhnEFRAK1h/Gs47KXRlWXt39Pcl DnFuwRym6LujKAf3KCsAQI+8eKPLM8gNr8XRjexzQiC+iGZr1moQ+NSSB/bEk2N/Lr8z 9/5IGYa6hnazwz/E8id8jQNclccTLKt46VO/fB+mQakkWpEVCITnwGE/8QshK6wLdpdX YIFqBPbvrVpNNnmJ5GOJt08HYKhQ/mYEEsCNo4PlW4c04kEGYWKUAVSZrNyMNwJoX5DR Njgry1FeasF9Kvz5y36FmRBxGE0dkyMihP7XEimQXF8eeStLa4Xv//nhsMTrpinDeQOm xdrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=oThFCfb/dZXgTRvCXmmcWB0misIL8P+DmXORl8aTtIo=; b=jCvwM+oXGguWWrpr5XLl5WxbchIt1FiQObKv5YcLi+poFjRXLglwK8Ejx3ToLg5pLf tCTCNiVLPbypKxVC54N3bfZ+rtwvswJuE17+hbYzXaJ8f/nblpap9eowYb0c6A2TJny5 QlvV9z8RJiA+31B3JJ8TsRey0Fa9/PUEeNvOHidtqoq6gpFuhyfZ80ShMTvO93SN7/6R mNG5CI9qBPnnZwbvQeRhCTGCuMktsm26pAvsWQ81/QO1XLe/z9El2w5LiXG1Rt9Jxi76 de5A0sqyCdb+30uPCPw8U6r5hLqgRUBJ4jwQJXB/pfiafLuz8tYTwKxaMUlUJCP0V0Xi at9g== X-Gm-Message-State: AIVw110eigBgOW0/gd4+ghu0bzTjsgP2318xI6jq3M+BQOmBFbOTdsZs bizF21J+3iBggoLAPts= X-Received: by 10.84.241.198 with SMTP id t6mr32302779plm.48.1500315015950; Mon, 17 Jul 2017 11:10:15 -0700 (PDT) Received: from localhost.localdomain ([103.16.70.163]) by smtp.gmail.com with ESMTPSA id m8sm12316823pgs.24.2017.07.17.11.10.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Jul 2017 11:10:15 -0700 (PDT) From: Arvind Yadav 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 Message-Id: <1500314995-3181-4-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500314995-3181-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1500314995-3181-1-git-send-email-arvind.yadav.cs@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by 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 --- 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)}, {},