From patchwork Thu Jul 20 17:39:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9855441 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 9B637600F5 for ; Thu, 20 Jul 2017 17:42:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88E0528715 for ; Thu, 20 Jul 2017 17:42:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7DE6228818; Thu, 20 Jul 2017 17:42:03 +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 230D828715 for ; Thu, 20 Jul 2017 17:42:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966148AbdGTRld (ORCPT ); Thu, 20 Jul 2017 13:41:33 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:32862 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966110AbdGTRlb (ORCPT ); Thu, 20 Jul 2017 13:41:31 -0400 Received: by mail-pg0-f68.google.com with SMTP id z1so3322952pgs.0; Thu, 20 Jul 2017 10:41:30 -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=r+JQBFdL379SF2reOyMLrN1pT8vTIE9CM2uET3AMQsM=; b=EUnoEysJlvMXmntFs3L2bNTBKUglLXeJKJgy3JAfTFunQHFiYYDuQxf+i07JpeQKA/ gyJrg583MY+QtEPJoAm0/RuV+e+LtbyvPnH1/Rc6506rRNPuFJPsfWxIpSXvWOmaoAOF mIAI95DaQpc2LK12Px4nxr+CR3Vc5YdNCbeDCURZDwJTNBjr4oyvM9ASWcRDUmAh8d20 iqwy7hPsouA8+Fn0+YZSYxT/K1YOMrBBBak8HDYaWaUp2avAQ+jYo9qxoEeM5ZQa64Xg vsxEIwFWKdLPwSv6nv1uaD0KdoXi8cdJa8D5XZj0LwXeA0vSZnNq7ldot76uph26+0TW 4CDw== 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=r+JQBFdL379SF2reOyMLrN1pT8vTIE9CM2uET3AMQsM=; b=f+KAesmfoaDbn303JU/IF1EeZ9JzhIc/ypI0zm4sRrgfprZFwQwJyWobmExLF9DIyK qgHHnDbaSvypu5dL0CsHl7eVf+18ic28EpLQt9qDdhmE5m2u7KYPfNf9Sls/14ibezT+ gGeIfxKgwtdhNrEQIYgRZma6Cp31OFJwe5emUrRRL4/W71R5UL5IERpFAXxY2/jpD2IW ZitIX8xpGw9YFMsjroOpstt/66vJGlOjhBOQU2gVflbPTuWwpnjRIfcFhgaBV4B6hfju CqGRZqm8OUAsGU18XtqSDUbvpTIGqjLsWPJzqxi+slgnAycaProYtBrp0CA8lxP8WXU4 CFvA== X-Gm-Message-State: AIVw110IioD7zKMUX0x2Z1mP4dN6g+IbJBMQb0TKQZt5rcmsRsckfdtI oFyN5yHzNLgaQA== X-Received: by 10.99.117.90 with SMTP id f26mr15135pgn.441.1500572490536; Thu, 20 Jul 2017 10:41:30 -0700 (PDT) Received: from localhost.localdomain ([103.16.70.17]) by smtp.gmail.com with ESMTPSA id n90sm6315528pfk.105.2017.07.20.10.41.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Jul 2017 10:41:29 -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 27/28] video: fbdev: matroxfb: constify pci_device_id. Date: Thu, 20 Jul 2017 23:09:52 +0530 Message-Id: <1500572393-18844-28-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 19884 3036 96 23016 59e8 fbdev/matrox/matroxfb_base.o File size After adding 'const': text data bss dec hex filename 20300 2620 96 23016 59e8 fbdev/matrox/matroxfb_base.o Signed-off-by: Arvind Yadav --- drivers/video/fbdev/matrox/matroxfb_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/matrox/matroxfb_base.c b/drivers/video/fbdev/matrox/matroxfb_base.c index 11eb094..a582907 100644 --- a/drivers/video/fbdev/matrox/matroxfb_base.c +++ b/drivers/video/fbdev/matrox/matroxfb_base.c @@ -1623,7 +1623,7 @@ static int initMatrox2(struct matrox_fb_info *minfo, struct board *b) unsigned int memsize; int err; - static struct pci_device_id intel_82437[] = { + static const struct pci_device_id intel_82437[] = { { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82437) }, { }, }; @@ -2116,7 +2116,7 @@ static void pci_remove_matrox(struct pci_dev* pdev) { matroxfb_remove(minfo, 1); } -static struct pci_device_id matroxfb_devices[] = { +static const struct pci_device_id matroxfb_devices[] = { #ifdef CONFIG_FB_MATROX_MILLENIUM {PCI_VENDOR_ID_MATROX, PCI_DEVICE_ID_MATROX_MIL, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},