From: Logan Gunthorpe <logang@deltatee.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org
Cc: rafael@kernel.org, Jean Delvare <jdelvare@suse.com>,
Guenter Roeck <linux@roeck-us.net>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Kurt Schwemmer <kurt.schwemmer@microsemi.com>,
Jon Mason <jdmason@kudzu.us>, Dave Jiang <dave.jiang@intel.com>,
Allen Hubbe <allenbh@gmail.com>,
Dominik Brodowski <linux@dominikbrodowski.net>,
Matt Porter <mporter@kernel.crashing.org>,
Alexandre Bounine <alex.bou9@gmail.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Doug Gilbert <dgilbert@interlog.com>,
John Stultz <jstultz@google.com>,
Thomas Gleixner <tglx@linutronix.de>,
Stephen Boyd <sboyd@kernel.org>,
Hans de Goede <hdegoede@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Wang Weiyang <wangweiyang2@huawei.com>,
Yang Yingliang <yangyingliang@huawei.com>,
Jakob Koschel <jakobkoschel@gmail.com>,
Cai Xinchen <caixinchen1@huawei.com>
Subject: Re: [PATCH 4/5] driver core: class: remove struct class_interface * from callbacks
Date: Mon, 3 Apr 2023 09:43:18 -0600 [thread overview]
Message-ID: <b3d5db24-7a88-3e23-03d5-fe4b0ee9f3e6@deltatee.com> (raw)
In-Reply-To: <2023040250-pushover-platter-509c@gregkh>
On 2023-04-02 11:58, Greg Kroah-Hartman wrote:
> The add_dev and remove_dev callbacks in struct class_interface currently
> pass in a pointer back to the class_interface structure that is calling
> them, but none of the callback implementations actually use this pointer
> as it is pointless (the structure is known, the driver passed it in in
> the first place if it is really needed again.)
>
> So clean this up and just remove the pointer from the callbacks and fix
> up all callback functions.
>
> Cc: Jean Delvare <jdelvare@suse.com>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Eric Dumazet <edumazet@google.com>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: Paolo Abeni <pabeni@redhat.com>
> Cc: Kurt Schwemmer <kurt.schwemmer@microsemi.com>
> Cc: Logan Gunthorpe <logang@deltatee.com>
> Cc: Jon Mason <jdmason@kudzu.us>
> Cc: Dave Jiang <dave.jiang@intel.com>
> Cc: Allen Hubbe <allenbh@gmail.com>
> Cc: Dominik Brodowski <linux@dominikbrodowski.net>
> Cc: Matt Porter <mporter@kernel.crashing.org>
> Cc: Alexandre Bounine <alex.bou9@gmail.com>
> Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
> Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
> Cc: Doug Gilbert <dgilbert@interlog.com>
> Cc: John Stultz <jstultz@google.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Stephen Boyd <sboyd@kernel.org>
> Cc: Hans de Goede <hdegoede@redhat.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Wang Weiyang <wangweiyang2@huawei.com>
> Cc: Yang Yingliang <yangyingliang@huawei.com>
> Cc: Jakob Koschel <jakobkoschel@gmail.com>
> Cc: Cai Xinchen <caixinchen1@huawei.com>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> Note, subsystem maintainers, this should go through my driver-core tree
> as it's part of a larger cleanup of 'struct class' handling. I'm cc:ing
> you all to get reviews to verify I didn't do something foolish, but it
> has passed 0-day bot build testing already (which caught many foolish
> mistakes of mine...)
>
>
> drivers/base/class.c | 4 ++--
> drivers/base/core.c | 10 ++++------
> drivers/hwmon/drivetemp.c | 4 ++--
> drivers/net/rionet.c | 3 +--
> drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 6 ++----
For the switchtec changes:
Acked-by: Logan Gunthorpe <logang@deltatee.com>
Thanks!
Logan
next prev parent reply other threads:[~2023-04-03 15:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-02 17:58 [PATCH 0/5] driver core: class: allow struct class to be static Greg Kroah-Hartman
2023-04-02 17:58 ` [PATCH 1/5] driver core: class: mark class_release() as taking a const * Greg Kroah-Hartman
2023-04-03 17:55 ` Rafael J. Wysocki
2023-04-02 17:58 ` [PATCH 2/5] driver core: class: make class_register() take " Greg Kroah-Hartman
2023-04-03 17:57 ` Rafael J. Wysocki
2023-04-02 17:58 ` [PATCH 3/5] driver core: class: mark the struct class in struct class_interface constant Greg Kroah-Hartman
2023-04-03 17:57 ` Rafael J. Wysocki
2023-04-02 17:58 ` [PATCH 4/5] driver core: class: remove struct class_interface * from callbacks Greg Kroah-Hartman
2023-04-03 15:43 ` Logan Gunthorpe [this message]
2023-04-03 17:59 ` Rafael J. Wysocki
2023-04-04 13:57 ` Guenter Roeck
2023-04-02 17:58 ` [PATCH 5/5] tty: make tty_class a static const structure Greg Kroah-Hartman
2023-04-03 5:47 ` Jiri Slaby
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=b3d5db24-7a88-3e23-03d5-fe4b0ee9f3e6@deltatee.com \
--to=logang@deltatee.com \
--cc=akpm@linux-foundation.org \
--cc=alex.bou9@gmail.com \
--cc=allenbh@gmail.com \
--cc=caixinchen1@huawei.com \
--cc=dave.jiang@intel.com \
--cc=davem@davemloft.net \
--cc=dgilbert@interlog.com \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=jakobkoschel@gmail.com \
--cc=jdelvare@suse.com \
--cc=jdmason@kudzu.us \
--cc=jejb@linux.ibm.com \
--cc=jstultz@google.com \
--cc=kuba@kernel.org \
--cc=kurt.schwemmer@microsemi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
--cc=linux@roeck-us.net \
--cc=martin.petersen@oracle.com \
--cc=mporter@kernel.crashing.org \
--cc=pabeni@redhat.com \
--cc=rafael@kernel.org \
--cc=sboyd@kernel.org \
--cc=tglx@linutronix.de \
--cc=wangweiyang2@huawei.com \
--cc=yangyingliang@huawei.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®