Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752501AbdHLGLc (ORCPT ); Sat, 12 Aug 2017 02:11:32 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:65001 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752168AbdHLGKM (ORCPT ); Sat, 12 Aug 2017 02:10:12 -0400 X-IronPort-AV: E=Sophos;i="5.41,362,1498514400"; d="scan'208";a="286837642" From: Julia Lawall To: Subbu Seetharaman Cc: bhumirks@gmail.com, kernel-janitors@vger.kernel.org, Ketan Mukadam , Jitendra Bhivare , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/6] scsi: be2iscsi: constify pci_error_handlers structures Date: Sat, 12 Aug 2017 07:44:32 +0200 Message-Id: <1502516674-8918-5-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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 884 Lines: 25 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 --- drivers/scsi/be2iscsi/be_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index b4542e7..511732a 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -5786,7 +5786,7 @@ static void beiscsi_remove(struct pci_dev *pcidev) } -static struct pci_error_handlers beiscsi_eeh_handlers = { +static const struct pci_error_handlers beiscsi_eeh_handlers = { .error_detected = beiscsi_eeh_err_detected, .slot_reset = beiscsi_eeh_reset, .resume = beiscsi_eeh_resume,