From: Michael Ellerman <mpe@ellerman.id.au>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Subject: Re: [PATCH 04/10] pseries: ibmebus.c: convert to use BUS_ATTR_WO
Date: Thu, 27 Dec 2018 16:27:50 +1100 [thread overview]
Message-ID: <87tvizy1wp.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <20181221075442.17109-5-gregkh@linuxfoundation.org>
Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes:
> We are trying to get rid of BUS_ATTR() and the usage of that in
> ibmebus.c can be trivially converted to use BUS_ATTR_WO(), so use that
> instead.
>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> arch/powerpc/platforms/pseries/ibmebus.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
LGTM.
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
cheers
> diff --git a/arch/powerpc/platforms/pseries/ibmebus.c b/arch/powerpc/platforms/pseries/ibmebus.c
> index 5b4a56131904..84e8ec4011ba 100644
> --- a/arch/powerpc/platforms/pseries/ibmebus.c
> +++ b/arch/powerpc/platforms/pseries/ibmebus.c
> @@ -261,8 +261,7 @@ static char *ibmebus_chomp(const char *in, size_t count)
> return out;
> }
>
> -static ssize_t ibmebus_store_probe(struct bus_type *bus,
> - const char *buf, size_t count)
> +static ssize_t probe_store(struct bus_type *bus, const char *buf, size_t count)
> {
> struct device_node *dn = NULL;
> struct device *dev;
> @@ -298,10 +297,9 @@ static ssize_t ibmebus_store_probe(struct bus_type *bus,
> return rc;
> return count;
> }
> -static BUS_ATTR(probe, 0200, NULL, ibmebus_store_probe);
> +static BUS_ATTR_WO(probe);
>
> -static ssize_t ibmebus_store_remove(struct bus_type *bus,
> - const char *buf, size_t count)
> +static ssize_t remove_store(struct bus_type *bus, const char *buf, size_t count)
> {
> struct device *dev;
> char *path;
> @@ -325,7 +323,7 @@ static ssize_t ibmebus_store_remove(struct bus_type *bus,
> return -ENODEV;
> }
> }
> -static BUS_ATTR(remove, 0200, NULL, ibmebus_store_remove);
> +static BUS_ATTR_WO(remove);
>
> static struct attribute *ibmbus_bus_attrs[] = {
> &bus_attr_probe.attr,
> --
> 2.20.1
next prev parent reply other threads:[~2018-12-27 5:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-21 7:54 [PATCH 00/10] Driver core: remove BUS_ATTR() Greg Kroah-Hartman
2018-12-21 7:54 ` [PATCH 01/10] PCI: pci.c: convert to use BUS_ATTR_RW Greg Kroah-Hartman
2018-12-21 7:54 ` [PATCH 02/10] PCI: pci-sysfs.c: convert to use BUS_ATTR_WO Greg Kroah-Hartman
2018-12-21 7:54 ` [PATCH 03/10] SCSI: fcoe: " Greg Kroah-Hartman
2018-12-21 8:00 ` Johannes Thumshirn
2018-12-21 15:29 ` James Bottomley
2018-12-28 12:50 ` Hannes Reinecke
2019-01-22 14:22 ` Greg Kroah-Hartman
2018-12-21 7:54 ` [PATCH 04/10] pseries: ibmebus.c: " Greg Kroah-Hartman
2018-12-27 5:27 ` Michael Ellerman [this message]
2018-12-21 7:54 ` [PATCH 05/10] rapidio: rio-sysfs.c: " Greg Kroah-Hartman
2018-12-21 7:54 ` [PATCH 06/10] block: rbd: convert to use BUS_ATTR_WO and RO Greg Kroah-Hartman
2018-12-21 9:28 ` Ilya Dryomov
2018-12-21 7:54 ` [PATCH 07/10] driver core: bus: convert to use BUS_ATTR_WO and RW Greg Kroah-Hartman
2018-12-21 7:54 ` [PATCH 08/10] Documentation: driver core: remove use of BUS_ATTR Greg Kroah-Hartman
2018-12-21 7:54 ` [PATCH 09/10] driver core: drop use of BUS_ATTR() Greg Kroah-Hartman
2018-12-21 7:54 ` [PATCH 10/10] driver core: remove BUS_ATTR() Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tvizy1wp.fsf@concordia.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=benh@kernel.crashing.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.org \
--cc=tyreld@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®