From patchwork Sun Jul 30 08:37:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9870267 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 031D06032A for ; Sun, 30 Jul 2017 08:39:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7C8928584 for ; Sun, 30 Jul 2017 08:39:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC5B8285DA; Sun, 30 Jul 2017 08:39:36 +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.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=unavailable 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 995C728584 for ; Sun, 30 Jul 2017 08:39:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754014AbdG3Ih5 (ORCPT ); Sun, 30 Jul 2017 04:37:57 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:33905 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753947AbdG3Ihy (ORCPT ); Sun, 30 Jul 2017 04:37:54 -0400 Received: by mail-pg0-f68.google.com with SMTP id v190so27702293pgv.1; Sun, 30 Jul 2017 01:37:53 -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=/7GnuJ9PiiH6eFXN3LM4HswPMZh0WP7oEBaN4i31C0M=; b=AJBLZp69zFTGGMqyqRoH4o0S/V2S8iaJdS1RPBdq065JLMEpjj3fQvoyykI15QFtDm mdgfIv+Rjw4uJdz91TqKo3n0uFk03kjjVpa1qk5NADIR34LV2SFi0Ofr9qN7jo2zja9h F30bqdybflGHIn7EGZJEBHRu6iEwsE7QrUjOMAI6wDzgviQCVzTh4iOn4om9CO8eHcr3 7LsFrGQTCqw0i9hAvrxr4aLl9kM4io9LwN0FhhKFt7uxDslCiyTrjSRHIc6usjaBEFLY 0ULwJUvt5gNGiOZ5zj6TKw4C4vqn6fOdCS/e+a3H44xrWA6Ltlua1+R/qo9B1oazhuQv kHJA== 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=/7GnuJ9PiiH6eFXN3LM4HswPMZh0WP7oEBaN4i31C0M=; b=RVV4vCzxqqOWnLKaXCk5Amt31m3Ao7RwkqWa9J8MgP+APn79L6URaLm8maEPXlIZkJ 2dCCGlKO6EdOJoPUKS9Qv1qC3SSMOyaxSnQTugE0iV49Vcg54A9SYHSbobNrURI/A2G8 Nk2CBJ2NTU8ELgDy9gWQLNmEUkxBSXxvKdfDHLxTIEt6z/ZDV/d09sj6PYIsK1VJ3JnM MXs4KVQsLhHdqwOim3Y8pYlzjm1OHMnLwM+TDFAjx8qec4/wvW/ojZ57zvHRDooscPRY GSMutP6ND124+tz/xz0L6UPpC3girCW43t0mnLjpFlv/WD7qrxtu2Sr9qxp3IKkHRWi8 HKOQ== X-Gm-Message-State: AIVw110wKKLflaFGnf+iF38HxYjRg3wQ4PFvxHhZdpAF6v9RKt4VDmQC rR1hkJkLQLelYg== X-Received: by 10.84.209.237 with SMTP id y100mr12961831plh.6.1501403873712; Sun, 30 Jul 2017 01:37:53 -0700 (PDT) Received: from localhost.localdomain ([103.16.68.146]) by smtp.gmail.com with ESMTPSA id h27sm45996082pfd.34.2017.07.30.01.37.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 30 Jul 2017 01:37:53 -0700 (PDT) From: Arvind Yadav To: martin.petersen@oracle.com, jejb@linux.vnet.ibm.com, mdr@sgi.com, hare@suse.com, aacraid@adaptec.com, matthew@wil.cx, fthain@telegraphics.com.au, schmitzmic@gmail.com, kashyap.desai@broadcom.com, sumit.saxena@broadcom.com, gotom@debian.or.jp, mrochs@linux.vnet.ibm.com, yokota@netlab.is.tsukuba.ac.jp, QLogic-Storage-Upstream@cavium.com, jinpu.wang@profitbricks.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 04/29] scsi: pm8001: constify pci_device_id. Date: Sun, 30 Jul 2017 14:07:13 +0530 Message-Id: <1501403839-8876-5-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1501403839-8876-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1501403839-8876-1-git-send-email-arvind.yadav.cs@gmail.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@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. Signed-off-by: Arvind Yadav Acked-by: Jack Wang --- drivers/scsi/pm8001/pm8001_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c index 034b2f7..f2757cc 100644 --- a/drivers/scsi/pm8001/pm8001_init.c +++ b/drivers/scsi/pm8001/pm8001_init.c @@ -1270,7 +1270,7 @@ static int pm8001_pci_resume(struct pci_dev *pdev) /* update of pci device, vendor id and driver data with * unique value for each of the controller */ -static struct pci_device_id pm8001_pci_table[] = { +static const struct pci_device_id pm8001_pci_table[] = { { PCI_VDEVICE(PMC_Sierra, 0x8001), chip_8001 }, { PCI_VDEVICE(PMC_Sierra, 0x8006), chip_8006 }, { PCI_VDEVICE(ADAPTEC2, 0x8006), chip_8006 },