From patchwork Thu Jul 20 17:39:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9855465 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 1DCE7600F5 for ; Thu, 20 Jul 2017 17:43:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C168287A8 for ; Thu, 20 Jul 2017 17:43:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 00E9828827; Thu, 20 Jul 2017 17:43:45 +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 9C2DF287A8 for ; Thu, 20 Jul 2017 17:43:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966048AbdGTRlD (ORCPT ); Thu, 20 Jul 2017 13:41:03 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:36841 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966030AbdGTRlA (ORCPT ); Thu, 20 Jul 2017 13:41:00 -0400 Received: by mail-pg0-f65.google.com with SMTP id y129so3312654pgy.3; Thu, 20 Jul 2017 10:41:00 -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=pE7/41K8StqHqlM/zkKH6WnnEjxoLhMVX+0W1AxitW4=; b=SSyTu7N8+9ezHSaGwou0lQ4mlLwu/Lf1jm1cufsCSqyGtbx6R8kS/mrKD0osFfoaD9 nlwXEtqTaj6+Ro+TK9ZG+5dcCgiT7sR6hP3TcQMwZesIaGdOMEZmGYCxHdW68wYwXzjY nL29t3yQ6H9NeicXZER51L7T4Y1QrToyqq85p56H7NolGvSgmi5ma9dsdbpV2DRWPD8z RHbQyJtxkFQcgdleVWLIjDRHfrAES8PvSe27XGHzj8R8t2WYFwEybL9cal6/2u2ux+A3 tBE4QPR8Ws1YAUFMHP/dK6xdvAEZII+GZ6htAa+ztxfc184S2SIcKSoJnCfzVjX6nKrW fYGQ== 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=pE7/41K8StqHqlM/zkKH6WnnEjxoLhMVX+0W1AxitW4=; b=l+FzQ5ugQoc7QDj4JIWsNaYYcXMqkd3jFs4bswO7dpR+/PaUyrB8Bfyv6jWHnBX+K6 q+YMI1M0C57XniUpedR3USDXP0OttrhrRJJ1d+QUV4WGuGSYRcTDlrzSLnvESxpn9Coy 0irNnSKOaMY7pI0zxP1U60fMLEQXSaVUN78jjbu6VtXjGvj5sCfWP2sUoyvKuojdXRha /CV0ZvrdWuSH92EzEV9eqjaOsQh8dedkVEi4xOdSi/mpwuI+80hJk53x+czyD/CyGODJ KbhDVrTjMgNx6GWS7N68mi+Mwo1jGJk5Z2j28SCb25fOsC4Y5rvNslo8nleyBybsFzb+ 1ljw== X-Gm-Message-State: AIVw110YpbXsmPeJrMgjWZxwdCbgfKoAdAHKEp/L7PdtIYhthUKcdZhS /eTyLsf7epX1og== X-Received: by 10.84.224.198 with SMTP id k6mr5213136pln.239.1500572460315; Thu, 20 Jul 2017 10:41:00 -0700 (PDT) Received: from localhost.localdomain ([103.16.70.17]) by smtp.gmail.com with ESMTPSA id n90sm6315528pfk.105.2017.07.20.10.40.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Jul 2017 10:40:59 -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 17/28] video: fbdev: nvidia: constify pci_device_id. Date: Thu, 20 Jul 2017 23:09:42 +0530 Message-Id: <1500572393-18844-18-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 12149 768 36 12953 3299 video/fbdev/nvidia/nvidia.o File size After adding 'const': text data bss dec hex filename 12213 704 36 12953 3299 video/fbdev/nvidia/nvidia.o Signed-off-by: Arvind Yadav --- drivers/video/fbdev/nvidia/nvidia.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/nvidia/nvidia.c b/drivers/video/fbdev/nvidia/nvidia.c index ce7dab7..418a2d0 100644 --- a/drivers/video/fbdev/nvidia/nvidia.c +++ b/drivers/video/fbdev/nvidia/nvidia.c @@ -55,7 +55,7 @@ /* HW cursor parameters */ #define MAX_CURS 32 -static struct pci_device_id nvidiafb_pci_tbl[] = { +static const struct pci_device_id nvidiafb_pci_tbl[] = { {PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_BASE_CLASS_DISPLAY << 16, 0xff0000, 0}, { 0, }