From patchwork Sat Aug 12 05:44:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 9896901 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 4DAA660236 for ; Sat, 12 Aug 2017 06:12:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A11828D1E for ; Sat, 12 Aug 2017 06:12:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D76C28D22; Sat, 12 Aug 2017 06:12:05 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 C34CA28D1E for ; Sat, 12 Aug 2017 06:12:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752024AbdHLGLt (ORCPT ); Sat, 12 Aug 2017 02:11:49 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:49773 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750995AbdHLGKM (ORCPT ); Sat, 12 Aug 2017 02:10:12 -0400 X-IronPort-AV: E=Sophos;i="5.41,362,1498514400"; d="scan'208";a="286837641" Received: from palace.lip6.fr (HELO localhost.localdomain) ([132.227.105.202]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES128-SHA256; 12 Aug 2017 08:10:08 +0200 From: Julia Lawall To: Adaptec OEM Raid Solutions Cc: bhumirks@gmail.com, kernel-janitors@vger.kernel.org, "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/6] scsi: aacraid: constify pci_error_handlers structures Date: Sat, 12 Aug 2017 07:44:31 +0200 Message-Id: <1502516674-8918-4-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1502516674-8918-1-git-send-email-Julia.Lawall@lip6.fr> References: <1502516674-8918-1-git-send-email-Julia.Lawall@lip6.fr> 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 These pci_error_handlers structures are only stored in the err_handler field of a pci_driver structure, and this field is declared as const. Thus the pci_error_handlers structures can be const too. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Acked-by: Dave Carroll --- drivers/scsi/aacraid/linit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index a8dedc3..2b978d8 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -2070,7 +2070,7 @@ static void aac_pci_resume(struct pci_dev *pdev) dev_err(&pdev->dev, "aacraid: PCI error - resume\n"); } -static struct pci_error_handlers aac_pci_err_handler = { +static const struct pci_error_handlers aac_pci_err_handler = { .error_detected = aac_pci_error_detected, .mmio_enabled = aac_pci_mmio_enabled, .slot_reset = aac_pci_slot_reset,