From patchwork Thu Aug 3 16:22:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 797314 X-Patchwork-Delegate: boris.brezillon@free-electrons.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="H+mrS7On"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="F4cMxGfm"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xNb3f3Drcz9s65 for ; Fri, 4 Aug 2017 02:24:14 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=73KH29mlELMDfR3aZ/1dVpBC4GnGCaxT29KwdakGzIA=; b=H+mrS7OnodC70g9Web3AlOU3qq AbZCBZUctx1i7Q6YMwf3FOSJru5KrUHyWFBFvTryV3gyMw1KBeeVaLdRmpjUPQiBbFDAmpVD/gKNo nmxlQ2ycKP7CKXhtOaMtDVCynBwAxrJ8BQ1ulP9FltM8hbDwYc/ejepHCbwxpte8IhKu6LDfuedfF hZik47oflbgjd8NeFiTB/h2asIWjocUxLPdEkWEjPh5A/xa2+LDtRqvbPCEAQ9m8qvyx1HLn25nWo 4rCo+V+9vOUF61Nh5rxF7TEzvp6IVtl2ivmfP2VvvneZJOFdFokb+i7vbSJxqmCaEmhgPEzvVSBpr 6+/6+pVA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ddIut-0000hq-Ai; Thu, 03 Aug 2017 16:24:07 +0000 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ddItj-00005r-RR for linux-mtd@lists.infradead.org; Thu, 03 Aug 2017 16:22:57 +0000 Received: by mail-pf0-x242.google.com with SMTP id p13so1933701pfd.4 for ; Thu, 03 Aug 2017 09:22:36 -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=hc7gQNQxM+2ErJMMW7eK+Aw+lHWhwHh8K9k/hG8RAU4=; b=F4cMxGfmlhNfIgJANkpjpicyL0R9hIUm4Jng7VhJDv9Y5zx6yOt1yXRKImZvGtz5m3 02939tsNzyDKk7G3vGyO0tybAczceelIO/8cdNUA4St+rzVS25JyNoIISr1sG1cYZ+Nz b3f7rHk2J6YVAQwxhBSG6Ma7kM6iLSpJOMJFqYITF0+1j09iP/zJbwcuP4bpd4KExa1h 7hkqs9uh9vHVCaX8M9wd8WdTYTSxp8zk5LRQrTUhy7teK8+WRS8k/LGYxsiqT8Rz4Z+H r6Et+WEmOULfzHmKW8HYKRues31JbZTkTAvqhOZWKo0XT0MUYe8uTAN3AZi1KbkPVIdK 7N3Q== 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=hc7gQNQxM+2ErJMMW7eK+Aw+lHWhwHh8K9k/hG8RAU4=; b=PZSN40x8qw83hfqj6bcRkAeofV1roJ4Uc1MtRtSdnlwGIyn7eO8QijI5lgQLP7wgg+ t8Bq0WC6XlpMeCMvXyEgLtV6f85IV2kpuHfOEqTwqoI8CGN+xPBCkIsTj7J6+Zft8QAX u/70/GiB20br0l/myffAI6DLodabAiRecpH2YoWeeDDZziiQdqvwos24RSoAbWRBnYxY hh4Gxdmbyfpb1QJWVmL9ogDY59vXoq8l/AGTPzgFILBAAwnIdNn7sw0JbQA3D7NEkf7x LQ+Z0rAYd2gJ83unIR0KdmtyUByPfUyEY4uW01My1tKmU3Fg/qlUIy12sjeHFwzNpvAo p5Tw== X-Gm-Message-State: AIVw110ySVlRWY99m8OO4tEqKySGciAACIEL/Cwnv/jr6RkSh0QVIW1O WADhgXRws0OxNw== X-Received: by 10.99.150.26 with SMTP id c26mr2044778pge.27.1501777356098; Thu, 03 Aug 2017 09:22:36 -0700 (PDT) Received: from localhost.localdomain ([103.16.68.88]) by smtp.gmail.com with ESMTPSA id t12sm46903106pfg.12.2017.08.03.09.22.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 03 Aug 2017 09:22:35 -0700 (PDT) From: Arvind Yadav To: dwmw2@infradead.org, computersforpeace@gmail.com, boris.brezillon@free-electrons.com, marek.vasut@gmail.com, richard@nod.at, cyrille.pitchen@wedev4u.fr Subject: [PATCH 2/6] mtd: amd76xrom: constify pci_device_id. Date: Thu, 3 Aug 2017 21:52:06 +0530 Message-Id: <1501777330-21380-3-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1501777330-21380-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1501777330-21380-1-git-send-email-arvind.yadav.cs@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170803_092255_914800_8228EFCE X-CRM114-Status: GOOD ( 11.54 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:400e:c00:0:0:0:242 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (arvind.yadav.cs[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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. Signed-off-by: Arvind Yadav --- drivers/mtd/maps/amd76xrom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/maps/amd76xrom.c b/drivers/mtd/maps/amd76xrom.c index f2b6866..26de0a1 100644 --- a/drivers/mtd/maps/amd76xrom.c +++ b/drivers/mtd/maps/amd76xrom.c @@ -296,7 +296,7 @@ static void amd76xrom_remove_one(struct pci_dev *pdev) amd76xrom_cleanup(window); } -static struct pci_device_id amd76xrom_pci_tbl[] = { +static const struct pci_device_id amd76xrom_pci_tbl[] = { { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7410, PCI_ANY_ID, PCI_ANY_ID, }, { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7440, @@ -319,7 +319,7 @@ static struct pci_driver amd76xrom_driver = { static int __init init_amd76xrom(void) { struct pci_dev *pdev; - struct pci_device_id *id; + const struct pci_device_id *id; pdev = NULL; for(id = amd76xrom_pci_tbl; id->vendor; id++) { pdev = pci_get_device(id->vendor, id->device, NULL);