Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751930AbdG0Osg (ORCPT ); Thu, 27 Jul 2017 10:48:36 -0400 Received: from mail-qk0-f176.google.com ([209.85.220.176]:38111 "EHLO mail-qk0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751801AbdG0Osd (ORCPT ); Thu, 27 Jul 2017 10:48:33 -0400 MIME-Version: 1.0 In-Reply-To: <6e5268522c9f41b6f6b6d9a3f70212b641042bb1.1500309009.git.arvind.yadav.cs@gmail.com> References: <6e5268522c9f41b6f6b6d9a3f70212b641042bb1.1500309009.git.arvind.yadav.cs@gmail.com> From: Ulf Hansson Date: Thu, 27 Jul 2017 16:48:32 +0200 Message-ID: Subject: Re: [PATCH] mmc: host: via-sdmmc: constify pci_device_id. To: Arvind Yadav Cc: brucechang@via.com.tw, HaraldWelte@viatech.com, "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1352 Lines: 40 On 17 July 2017 at 18:31, Arvind Yadav wrote: > 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 > 6952 880 0 7832 1e98 drivers/mmc/host/via-sdmmc.o > > File size After adding 'const': > text data bss dec hex filename > 7032 800 0 7832 1e98 drivers/mmc/host/via-sdmmc.o > > Signed-off-by: Arvind Yadav Thanks, applied for next! Kind regards Uffe > --- > drivers/mmc/host/via-sdmmc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/via-sdmmc.c b/drivers/mmc/host/via-sdmmc.c > index 6380044..a838bf5 100644 > --- a/drivers/mmc/host/via-sdmmc.c > +++ b/drivers/mmc/host/via-sdmmc.c > @@ -323,7 +323,7 @@ struct via_crdr_mmc_host { > /* some devices need a very long delay for power to stabilize */ > #define VIA_CRDR_QUIRK_300MS_PWRDELAY 0x0001 > > -static struct pci_device_id via_ids[] = { > +static const struct pci_device_id via_ids[] = { > {PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_9530, > PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,}, > {0,} > -- > 2.7.4 >