From patchwork Thu Jul 20 17:39:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9855445 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 E27E2600F5 for ; Thu, 20 Jul 2017 17:42:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CFDD128715 for ; Thu, 20 Jul 2017 17:42:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C4C8728818; Thu, 20 Jul 2017 17:42:22 +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 76DE828715 for ; Thu, 20 Jul 2017 17:42:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966117AbdGTRlZ (ORCPT ); Thu, 20 Jul 2017 13:41:25 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:37360 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966110AbdGTRlV (ORCPT ); Thu, 20 Jul 2017 13:41:21 -0400 Received: by mail-pg0-f65.google.com with SMTP id t8so3312034pgs.4; Thu, 20 Jul 2017 10:41:21 -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=14N0KCALC+gRXrkMthKhPf0/xljGvsOqoLJcgeo6YBI=; b=AW1TxHZaYi5XM81eVMb+dMmVTAWNeXpXTpj8tVpuSPcG6dJSgiPs72rx5gPEWtJlbE Jp7uLj0K6q38n5+os1y/qnzDB/pBRrIAAX2Z20uRW+ja92mMz62Gxo3Yohuga/DM9N/p FfZv0wplpNM3aPFf4T+FFKxDU0SrFaGF30XaqTmNVLIoQTBFjYMx1S9yt7CndaUVt1R9 BLzgp2afyt8sa+W/JeRcN/2bgb1+Bl7RNQK3zevOLce9MSHfsXxBJ/ol2qzoDfo1ZolZ t4hClIt5jetmrJmqNWkqYkyfKzNrys0ul3e3s4Tmqho0ckDSRYkohIuvc7yyLqHXm1Aq vo6w== 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=14N0KCALC+gRXrkMthKhPf0/xljGvsOqoLJcgeo6YBI=; b=K+aTz6GbJdtWgbyM4CSVLAf+SHH1jIvY08Oe3rYkvQhAIbnbLV6JN6V0Lcq7Q02akv YDy7DXUP+Qj6zerhUPYardBt+O43B5svcWS8IDMltUnsUku3P2igqFGKUjmAeSdVSkFR ez67TNAervvn3+pKV/qpNyiWRRmRsXb+hvwM66lcpbtFf9RT2jNmoLXSAxPzVYBoRpHB 3RiTB5DMy+DlZp156K8zleah/68gJPKSOwZMI1xL8DU12YkqntnLJmP8KYFiNSBJSPCs Ket3hvrsn1jtmS2skYJT4zVNjVhTrXL33hrFK/53RLTTb8gclNuqjb7WtDxkJI5XmgSQ aZ8A== X-Gm-Message-State: AIVw113BQZ7+fvAdG4qOQX7/GhTPEnD9eozCTNi8DlQo0qhRtx7W9e0J N8qQ1bQx+J2w1A== X-Received: by 10.84.248.74 with SMTP id e10mr124955pln.464.1500572481281; Thu, 20 Jul 2017 10:41:21 -0700 (PDT) Received: from localhost.localdomain ([103.16.70.17]) by smtp.gmail.com with ESMTPSA id n90sm6315528pfk.105.2017.07.20.10.41.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Jul 2017 10:41:20 -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 24/28] video: fbdev: neofb: constify pci_device_id. Date: Thu, 20 Jul 2017 23:09:49 +0530 Message-Id: <1500572393-18844-25-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 12766 1064 21 13851 361b drivers/video/fbdev/neofb.o File size After adding 'const': text data bss dec hex filename 13086 744 21 13851 361b drivers/video/fbdev/neofb.o Signed-off-by: Arvind Yadav --- drivers/video/fbdev/neofb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/neofb.c b/drivers/video/fbdev/neofb.c index db023a9..5d3a444 100644 --- a/drivers/video/fbdev/neofb.c +++ b/drivers/video/fbdev/neofb.c @@ -2138,7 +2138,7 @@ static void neofb_remove(struct pci_dev *dev) } } -static struct pci_device_id neofb_devices[] = { +static const struct pci_device_id neofb_devices[] = { {PCI_VENDOR_ID_NEOMAGIC, PCI_CHIP_NM2070, PCI_ANY_ID, PCI_ANY_ID, 0, 0, FB_ACCEL_NEOMAGIC_NM2070},