From patchwork Sat Aug 19 08:22:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 9910305 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 906FF60386 for ; Sat, 19 Aug 2017 08:27:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81FB728D9F for ; Sat, 19 Aug 2017 08:27:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 732FB28DA1; Sat, 19 Aug 2017 08:27:15 +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=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 1B51728DA1 for ; Sat, 19 Aug 2017 08:27:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752641AbdHSI1O (ORCPT ); Sat, 19 Aug 2017 04:27:14 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:34159 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752013AbdHSI1J (ORCPT ); Sat, 19 Aug 2017 04:27:09 -0400 Received: by mail-pg0-f66.google.com with SMTP id i12so2626689pgr.1; Sat, 19 Aug 2017 01:27:08 -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=n9yDIzfWFngc0QFv1Q/48y3R7vldroKAD2W+R8BHS/E=; b=k1VzGKFDXqCiMKcXx5UYtjyPxGdXB27pNHPqhDs8ObJ8ApUvtgGUUTRXiovnusgeba YSMM1e1bXApfAJdFbNoZhB6cON37ltQfpAJ1FkjfshJlwg7ojtXBZClkkqkZoCdq5Mhe /M7z9jY5jDHCf2HZWMIATWQdkJYlOxmhOhXpToUkC4KdZkl+l9evdiinXntPs/4yD8XA ln0LUbtP2+N0pkxhvLgGLfTawvbmz6x3ab9dr5HaB7oQqe0gt49n5B2YP9lcAZ6e/wjU v6ngBbQUmLvKLy++DNLKboz4otpeJSc5/VsqxPPy02RHk1cKUjAB3Le3oTv/Dni3JlB8 amoQ== 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=n9yDIzfWFngc0QFv1Q/48y3R7vldroKAD2W+R8BHS/E=; b=Kz71qBnTGAEo7F3V/Wxk6gNgFIafLt07z3wp9SJfe/WANpF2K0Uz9Gymuwp8NrDg6m BWPqcNKGy/qt/aTfzOhfO4QHAaXchkSlx41PTXNggc2iU596KwE12Tb7eSG5xSD3oBkK R1SPO8QuU4TuyriYzX48tJAbdJEOxiktavvd8/puMHuWjCha8YgtEJWqE1isL6TCO0XX VtipB24WdiLIZGBR3BTQiydUUlEpxHJ1pm/dYScvlituiU6JlCEkwKtH6fHU8Y9nisBJ ywUFUR4R2ehdN1fLjTQa8Vi3HbmWW+KvwEPD2pWTPaUgZrwM7qxpXgN1AsFh+tgMEcCa N9hQ== X-Gm-Message-State: AHYfb5gmX6MWaZh4aXFVHwtvJChqDRqNaPJFU7+jTa8AStSjqOlVQrVV oR0Rfm02nUQoxw== X-Received: by 10.84.175.67 with SMTP id s61mr12327922plb.296.1503131228502; Sat, 19 Aug 2017 01:27:08 -0700 (PDT) Received: from gmail.com ([59.94.206.141]) by smtp.gmail.com with ESMTPSA id v126sm13512576pfv.144.2017.08.19.01.26.52 (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 19 Aug 2017 01:27:07 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Sat, 19 Aug 2017 13:56:49 +0530 From: Bhumika Goyal To: julia.lawall@lip6.fr, bp@alien8.de, mchehab@kernel.org, daniel.vetter@intel.com, jani.nikula@linux.intel.com, seanpaul@chromium.org, airlied@linux.ie, g.liakhovetski@gmx.de, tomas.winkler@intel.com, dwmw2@infradead.org, computersforpeace@gmail.com, boris.brezillon@free-electrons.com, marek.vasut@gmail.com, richard@nod.at, cyrille.pitchen@wedev4u.fr, peda@axentia.se, kishon@ti.com, bhelgaas@google.com, thierry.reding@gmail.com, jonathanh@nvidia.com, dvhart@infradead.org, andy@infradead.org, ohad@wizery.com, bjorn.andersson@linaro.org, freude@de.ibm.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, jth@kernel.org, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, lduncan@suse.com, cleech@redhat.com, johan@kernel.org, elder@kernel.org, gregkh@linuxfoundation.org, heikki.krogerus@linux.intel.com, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linux-mtd@lists.infradead.org, linux-pci@vger.kernel.org, linux-tegra@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-s390@vger.kernel.org, fcoe-devel@open-fcoe.org, linux-scsi@vger.kernel.org, open-iscsi@googlegroups.com, greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org, linux-usb@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH 13/15] scsi: make device_type const Date: Sat, 19 Aug 2017 13:52:24 +0530 Message-Id: <1503130946-2854-14-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1503130946-2854-1-git-send-email-bhumirks@gmail.com> References: <1503130946-2854-1-git-send-email-bhumirks@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 Make these const as they are only stored in the type field of a device structure, which is const. Done using Coccinelle. Signed-off-by: Bhumika Goyal --- drivers/scsi/fcoe/fcoe_sysfs.c | 4 ++-- drivers/scsi/scsi_transport_iscsi.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/fcoe/fcoe_sysfs.c b/drivers/scsi/fcoe/fcoe_sysfs.c index 9cf3d56..5c8310b 100644 --- a/drivers/scsi/fcoe/fcoe_sysfs.c +++ b/drivers/scsi/fcoe/fcoe_sysfs.c @@ -659,13 +659,13 @@ static void fcoe_fcf_device_release(struct device *dev) kfree(fcf); } -static struct device_type fcoe_ctlr_device_type = { +static const struct device_type fcoe_ctlr_device_type = { .name = "fcoe_ctlr", .groups = fcoe_ctlr_attr_groups, .release = fcoe_ctlr_device_release, }; -static struct device_type fcoe_fcf_device_type = { +static const struct device_type fcoe_fcf_device_type = { .name = "fcoe_fcf", .groups = fcoe_fcf_attr_groups, .release = fcoe_fcf_device_release, diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index a424eae..b9513f8 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c @@ -1009,7 +1009,7 @@ static void iscsi_flashnode_sess_release(struct device *dev) kfree(fnode_sess); } -static struct device_type iscsi_flashnode_sess_dev_type = { +static const struct device_type iscsi_flashnode_sess_dev_type = { .name = "iscsi_flashnode_sess_dev_type", .groups = iscsi_flashnode_sess_attr_groups, .release = iscsi_flashnode_sess_release, @@ -1195,7 +1195,7 @@ static void iscsi_flashnode_conn_release(struct device *dev) kfree(fnode_conn); } -static struct device_type iscsi_flashnode_conn_dev_type = { +static const struct device_type iscsi_flashnode_conn_dev_type = { .name = "iscsi_flashnode_conn_dev_type", .groups = iscsi_flashnode_conn_attr_groups, .release = iscsi_flashnode_conn_release,