linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Wolfram Sang <wsa@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>
Cc: "linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/2] driver core: class: warn if a compatibility class is registered
Date: Mon, 2 Sep 2024 21:02:17 +0200	[thread overview]
Message-ID: <7bc5fa50-59f6-4455-8f77-1c89f1e17d0b@gmail.com> (raw)
In-Reply-To: <4660a46b-9128-4407-8baa-f257245784a3@gmail.com>

Kernel doc for this function states:
"Compatibility class are meant as a temporary user-space compatibility
workaround when converting a family of class devices to a bus devices."

Therefore remind any potential user of the old ABI that support for it
will be dropped soon.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/base/class.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/base/class.c b/drivers/base/class.c
index 7b38fdf8e..f12a43736 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -556,6 +556,9 @@ struct class_compat *class_compat_register(const char *name)
 {
 	struct class_compat *cls;
 
+	pr_warn("Compatibility class %s will go away soon, please migrate userspace tools to use bus devices\n",
+		name);
+
 	cls = kmalloc(sizeof(struct class_compat), GFP_KERNEL);
 	if (!cls)
 		return NULL;
-- 
2.46.0



  parent reply	other threads:[~2024-09-02 19:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-02 19:00 [PATCH 0/2] i2c: core: prepare dropping support for I2C_COMPAT Heiner Kallweit
2024-09-02 19:01 ` [PATCH 1/2] i2c: core: Switch I2C_COMPAT to default n Heiner Kallweit
2024-09-03  8:49   ` Greg Kroah-Hartman
2024-09-02 19:02 ` Heiner Kallweit [this message]
2024-09-02 19:20   ` [PATCH 2/2] driver core: class: warn if a compatibility class is registered Greg Kroah-Hartman
2024-09-03  9:04     ` Wolfram Sang
2024-09-03  9:06       ` Wolfram Sang
2024-09-03 10:06         ` Greg Kroah-Hartman
2024-09-03 10:43           ` Wolfram Sang
2024-09-03 10:50             ` Greg Kroah-Hartman
2024-09-03 11:09               ` Wolfram Sang

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=7bc5fa50-59f6-4455-8f77-1c89f1e17d0b@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=wsa@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).