From patchwork Thu Jul 20 17:39:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9855507 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 BF195600F5 for ; Thu, 20 Jul 2017 17:47:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AEF692882A for ; Thu, 20 Jul 2017 17:47:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A3BD22882C; Thu, 20 Jul 2017 17:47:18 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham 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 5AF282882A for ; Thu, 20 Jul 2017 17:47:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934890AbdGTRq7 (ORCPT ); Thu, 20 Jul 2017 13:46:59 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:36712 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965931AbdGTRkZ (ORCPT ); Thu, 20 Jul 2017 13:40:25 -0400 Received: by mail-pg0-f66.google.com with SMTP id y129so3311590pgy.3; Thu, 20 Jul 2017 10:40:25 -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=W8iQdcDfx5+Tc/I0Z7Jv3T/ldb9HI6OVxBYOPsw0AEs=; b=Nnr0D2RRczn97bTB5/nvR+Ecnh/3+HijMcpPn0RoWwbRi/x7O8IqzkuoCmhCg1GxyJ 609bEMzK+/uBJ+HGDwGAO87vMmoekSuFp8xxBgaehX3WTyfnZIb/8k+BVYvCbK3R7NFR KTnHud9tkrndO4KSsOz7j6zkL3l8T6K6MAwWq8OWVLanfV2XuGMODnPfsfuaETZaiw8R ijf+fRRXjVNVWFwiK9LtxJpfZCknfz1x0IneeNyceMFN0Nywv/Hefm2d2sInBUPUhHWc o6d8XdZL/vId8cFY7hO9S4bL72M18MNiWGnYf0B4ScSnodyQKRDRSFsE0OB6WjhfkRjO FUog== 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=W8iQdcDfx5+Tc/I0Z7Jv3T/ldb9HI6OVxBYOPsw0AEs=; b=lKF6WDiUavTACNxS1TfVpa9i/q0X7lTcy/MpJs559KQFdNFpryQ54ZG4UtNBPkBDWn +uOIp4MCkhzLDpdy7QQHFtYVGSXstq5sAvhJj081PgATnd8pLkGNmwVXhFrbvR/b5t/s Lrbmmhf3/RmvRLRcBvCDgWfeqoM2c+BAJTXaimMvyZR3senjUnYrOQ8DoWZoLgX65u/5 TOL2osqK9s2OWCzs/zhDicxaM5D1eq8VEsvNFOR+vHguDX6SYZa+8Hyx7bCsd3AM9zqa oYtI7ojN4asZw8yi8gB1sjNQQPrsB3zu1NtSkRRNsOTnTTgz9nILHpFOLF7o3V4Xx6vf nDOA== X-Gm-Message-State: AIVw113MqsSpIVU3KXbkTJcS+xe71O0wpBwKI9mFQKP57Td2nhwqLQFZ WZCTpdUEao32/w== X-Received: by 10.84.217.208 with SMTP id d16mr5076176plj.208.1500572425040; Thu, 20 Jul 2017 10:40:25 -0700 (PDT) Received: from localhost.localdomain ([103.16.70.17]) by smtp.gmail.com with ESMTPSA id n90sm6315528pfk.105.2017.07.20.10.40.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Jul 2017 10:40:24 -0700 (PDT) From: Arvind Yadav To: b.zolnierkie@samsung.com, paulus@samba.org, benh@kernel.crashing.org, adaplas@gmail.com, mbroemme@libmpq.org, FlorianSchandinat@gmx.de Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/28] video: fbdev: intelfb: constify pci_device_id. Date: Thu, 20 Jul 2017 23:09:31 +0530 Message-Id: <1500572393-18844-7-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500572393-18844-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1500572393-18844-1-git-send-email-arvind.yadav.cs@gmail.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@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 11749 896 24 12669 317d video/fbdev/intelfb/intelfbdrv.o File size After adding 'const': text data bss dec hex filename 12173 472 24 12669 317d video/fbdev/intelfb/intelfbdrv.o Signed-off-by: Arvind Yadav --- drivers/video/fbdev/intelfb/intelfbdrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/intelfb/intelfbdrv.c b/drivers/video/fbdev/intelfb/intelfbdrv.c index 6b444400..0127e81 100644 --- a/drivers/video/fbdev/intelfb/intelfbdrv.c +++ b/drivers/video/fbdev/intelfb/intelfbdrv.c @@ -173,7 +173,7 @@ static int intelfb_set_fbinfo(struct intelfb_info *dinfo); #define INTELFB_CLASS_MASK 0 #endif -static struct pci_device_id intelfb_pci_table[] = { +static const struct pci_device_id intelfb_pci_table[] = { { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_830M, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_830M }, { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_845G, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_845G }, { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_85XGM, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_85XGM },