Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp422688imu; Fri, 21 Dec 2018 01:14:03 -0800 (PST) X-Google-Smtp-Source: AFSGD/XPbbNI3TnK9YaFR4de44z9dXh2P40HDkCLt40HbYB1Zi+2a9SkS0Em2yUrugK1iccYeky9 X-Received: by 2002:aa7:85d7:: with SMTP id z23mr1734072pfn.205.1545383643849; Fri, 21 Dec 2018 01:14:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545383643; cv=none; d=google.com; s=arc-20160816; b=bhrcqzDld7lwtkcRQbwOf+QweOTJ/XLUGs6rbUiPRf7DHLfo//YdG+EQDLHQKREKpF SAB1zyQoZWHGqGOEwxEVmj1ckmaw+2R9cx2z0d+xZLn+xIaeI1wufE6ZTEYmkbA10q4i dWKmQo/h25bu9xjIh/LQMZXMeefYa9yfYMR1xleFtzevR0M+KChd1/OZGRBbHcuS/Wkp GTz19Fob4+qR8w7iCp7o5E1ukNpKLmX8+TwBHmNXCvfCVsMNuesRCe/pFCJH3fRJmEDR esr6rBGAfCa2qYFE3LdQvun2cZ2dHH2a9B6778PFoXCTEgJyvxNMgnR5w7yUB7dVqyGt fhJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PDItT/TlV7cA0hWc+gfpaKU0jcQMYVhQtoAhUtDB/hc=; b=TxNRsqHVqufXiAhTpg5vgyvjUdt8nnIN0KBNvklSI91eGJYQAKg/WxbnTiP4ntRFdN lM2WWhRdFZuklbclqv9qtHagskFT+tn1Xolclusqb5IB6OuvVGIHhDPirrQaKv5XehXw Rdkg/tiE8/oB4N8frAlux4xMcs07aZ0s/PooLiZ8CPl3hrIahDbR2h/nsGLnOP9GyOMa r/7nkwNH2SvKT0uC0XfV2tspmIcvfq3M4v/VSPovyuU4t9rmn5n+jQnfHGksMzMnrvNR gII1hm0rcd2elTUKJI/tIru/PYkA6IyFsSOtNE76TSgc7778g8bEYZGN5N5wfb6QBnS/ g0Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dD0BOFX7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c3si19498999pls.73.2018.12.21.01.13.47; Fri, 21 Dec 2018 01:14:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dD0BOFX7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387611AbeLUHzW (ORCPT + 99 others); Fri, 21 Dec 2018 02:55:22 -0500 Received: from mail.kernel.org ([198.145.29.99]:59678 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387586AbeLUHzU (ORCPT ); Fri, 21 Dec 2018 02:55:20 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 68B4E21908; Fri, 21 Dec 2018 07:55:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1545378919; bh=UGfBCverM3/gkvacUDJ6VnIAzbzOzQQ7f3moUi8nBx0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dD0BOFX77inUmVbjFTIAh2tej2lIE4Ep9uHLcAbZZ8B5cHfZkX2Mwi0H0qLKg6WYu iVBeVw49oMRxUFKtyjc5LnCtBL7ZPs7wMJFINK2g2DIoV0DWPwJbIrGCjGEW8a5YCv gyZiq+zL+xJR1yRHPos47YCaCYW67IaSO6r+D/k8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , Johannes Thumshirn , "James E.J. Bottomley" , "Martin K. Petersen" Subject: [PATCH 03/10] SCSI: fcoe: convert to use BUS_ATTR_WO Date: Fri, 21 Dec 2018 08:54:35 +0100 Message-Id: <20181221075442.17109-4-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20181221075442.17109-1-gregkh@linuxfoundation.org> References: <20181221075442.17109-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We are trying to get rid of BUS_ATTR() and the usage of that in the fcoe driver can be trivially converted to use BUS_ATTR_WO(), so use that instead. At the same time remove a unneeded EXPORT_SYMBOL() marking for the sysfs callback function we are renaming, no idea of how that got into the tree... Cc: Johannes Thumshirn Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/fcoe/fcoe_sysfs.c | 4 ++-- drivers/scsi/fcoe/fcoe_transport.c | 7 ++----- include/scsi/libfcoe.h | 6 ++---- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/scsi/fcoe/fcoe_sysfs.c b/drivers/scsi/fcoe/fcoe_sysfs.c index 5c8310bade61..3c23b2624bd4 100644 --- a/drivers/scsi/fcoe/fcoe_sysfs.c +++ b/drivers/scsi/fcoe/fcoe_sysfs.c @@ -671,8 +671,8 @@ static const struct device_type fcoe_fcf_device_type = { .release = fcoe_fcf_device_release, }; -static BUS_ATTR(ctlr_create, S_IWUSR, NULL, fcoe_ctlr_create_store); -static BUS_ATTR(ctlr_destroy, S_IWUSR, NULL, fcoe_ctlr_destroy_store); +static BUS_ATTR_WO(ctlr_create); +static BUS_ATTR_WO(ctlr_destroy); static struct attribute *fcoe_bus_attrs[] = { &bus_attr_ctlr_create.attr, diff --git a/drivers/scsi/fcoe/fcoe_transport.c b/drivers/scsi/fcoe/fcoe_transport.c index f4909cd206d3..9edf82efda15 100644 --- a/drivers/scsi/fcoe/fcoe_transport.c +++ b/drivers/scsi/fcoe/fcoe_transport.c @@ -754,8 +754,7 @@ static int libfcoe_device_notification(struct notifier_block *notifier, return NOTIFY_OK; } -ssize_t fcoe_ctlr_create_store(struct bus_type *bus, - const char *buf, size_t count) +ssize_t ctlr_create_store(struct bus_type *bus, const char *buf, size_t count) { struct net_device *netdev = NULL; struct fcoe_transport *ft = NULL; @@ -817,8 +816,7 @@ ssize_t fcoe_ctlr_create_store(struct bus_type *bus, return count; } -ssize_t fcoe_ctlr_destroy_store(struct bus_type *bus, - const char *buf, size_t count) +ssize_t ctlr_destroy_store(struct bus_type *bus, const char *buf, size_t count) { int rc = -ENODEV; struct net_device *netdev = NULL; @@ -855,7 +853,6 @@ ssize_t fcoe_ctlr_destroy_store(struct bus_type *bus, mutex_unlock(&ft_mutex); return rc; } -EXPORT_SYMBOL(fcoe_ctlr_destroy_store); /** * fcoe_transport_create() - Create a fcoe interface diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h index cb8a273732cf..44536f095681 100644 --- a/include/scsi/libfcoe.h +++ b/include/scsi/libfcoe.h @@ -405,10 +405,8 @@ int fcoe_transport_attach(struct fcoe_transport *ft); int fcoe_transport_detach(struct fcoe_transport *ft); /* sysfs store handler for ctrl_control interface */ -ssize_t fcoe_ctlr_create_store(struct bus_type *bus, - const char *buf, size_t count); -ssize_t fcoe_ctlr_destroy_store(struct bus_type *bus, - const char *buf, size_t count); +ssize_t ctlr_create_store(struct bus_type *bus, const char *buf, size_t count); +ssize_t ctlr_destroy_store(struct bus_type *bus, const char *buf, size_t count); #endif /* _LIBFCOE_H */ -- 2.20.1