* [PATCH 0/2] i2c: core: prepare dropping support for I2C_COMPAT @ 2024-09-02 19:00 Heiner Kallweit 2024-09-02 19:01 ` [PATCH 1/2] i2c: core: Switch I2C_COMPAT to default n Heiner Kallweit 2024-09-02 19:02 ` [PATCH 2/2] driver core: class: warn if a compatibility class is registered Heiner Kallweit 0 siblings, 2 replies; 11+ messages in thread From: Heiner Kallweit @ 2024-09-02 19:00 UTC (permalink / raw) To: Wolfram Sang, Greg Kroah-Hartman, Rafael J. Wysocki Cc: linux-i2c@vger.kernel.org, Linux Kernel Mailing List I2C_COMPAT has been considered deprecated for 15 years now. Therefore make it default n, before we remove support for it in the near future. In addition warn any potential user of the old ABI. Heiner Kallweit (2): i2c: core: Switch I2C_COMPAT to default n driver core: class: warn if a compatibility class is registered drivers/base/class.c | 3 +++ drivers/i2c/Kconfig | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) -- 2.46.0 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/2] i2c: core: Switch I2C_COMPAT to default n 2024-09-02 19:00 [PATCH 0/2] i2c: core: prepare dropping support for I2C_COMPAT Heiner Kallweit @ 2024-09-02 19:01 ` Heiner Kallweit 2024-09-03 8:49 ` Greg Kroah-Hartman 2024-09-02 19:02 ` [PATCH 2/2] driver core: class: warn if a compatibility class is registered Heiner Kallweit 1 sibling, 1 reply; 11+ messages in thread From: Heiner Kallweit @ 2024-09-02 19:01 UTC (permalink / raw) To: Wolfram Sang, Greg Kroah-Hartman, Rafael J. Wysocki Cc: linux-i2c@vger.kernel.org, Linux Kernel Mailing List I2C_COMPAT has been considered deprecated for 15 years now. Therefore make it default n, before we remove support for it in the near future. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> --- drivers/i2c/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig index 44710267d..e5721cebb 100644 --- a/drivers/i2c/Kconfig +++ b/drivers/i2c/Kconfig @@ -42,11 +42,11 @@ config I2C_BOARDINFO config I2C_COMPAT bool "Enable compatibility bits for old user-space" - default y + default n help Say Y here if you intend to run lm-sensors 3.1.1 or older, or any other user-space package which expects i2c adapters to be class - devices. If you don't know, say Y. + devices. If you don't know, say N. config I2C_CHARDEV tristate "I2C device interface" -- 2.46.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] i2c: core: Switch I2C_COMPAT to default n 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 0 siblings, 0 replies; 11+ messages in thread From: Greg Kroah-Hartman @ 2024-09-03 8:49 UTC (permalink / raw) To: Heiner Kallweit Cc: Wolfram Sang, Rafael J. Wysocki, linux-i2c@vger.kernel.org, Linux Kernel Mailing List On Mon, Sep 02, 2024 at 09:01:18PM +0200, Heiner Kallweit wrote: > I2C_COMPAT has been considered deprecated for 15 years now. > Therefore make it default n, before we remove support for it > in the near future. > > Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> > --- > drivers/i2c/Kconfig | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig > index 44710267d..e5721cebb 100644 > --- a/drivers/i2c/Kconfig > +++ b/drivers/i2c/Kconfig > @@ -42,11 +42,11 @@ config I2C_BOARDINFO > > config I2C_COMPAT > bool "Enable compatibility bits for old user-space" > - default y > + default n Just remove the default line, that way it will default to 'n'. thanks, greg k-h ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 2/2] driver core: class: warn if a compatibility class is registered 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-02 19:02 ` Heiner Kallweit 2024-09-02 19:20 ` Greg Kroah-Hartman 1 sibling, 1 reply; 11+ messages in thread From: Heiner Kallweit @ 2024-09-02 19:02 UTC (permalink / raw) To: Wolfram Sang, Greg Kroah-Hartman, Rafael J. Wysocki Cc: linux-i2c@vger.kernel.org, Linux Kernel Mailing List 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 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] driver core: class: warn if a compatibility class is registered 2024-09-02 19:02 ` [PATCH 2/2] driver core: class: warn if a compatibility class is registered Heiner Kallweit @ 2024-09-02 19:20 ` Greg Kroah-Hartman 2024-09-03 9:04 ` Wolfram Sang 0 siblings, 1 reply; 11+ messages in thread From: Greg Kroah-Hartman @ 2024-09-02 19:20 UTC (permalink / raw) To: Heiner Kallweit Cc: Wolfram Sang, Rafael J. Wysocki, linux-i2c@vger.kernel.org, Linux Kernel Mailing List On Mon, Sep 02, 2024 at 09:02:17PM +0200, Heiner Kallweit wrote: > 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); That's not going to do anything except annoy users who have no control over this, sorry. Please just fix up all of the kernel and then delete this function. thanks, greg k-h ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] driver core: class: warn if a compatibility class is registered 2024-09-02 19:20 ` Greg Kroah-Hartman @ 2024-09-03 9:04 ` Wolfram Sang 2024-09-03 9:06 ` Wolfram Sang 0 siblings, 1 reply; 11+ messages in thread From: Wolfram Sang @ 2024-09-03 9:04 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: Heiner Kallweit, Wolfram Sang, Rafael J. Wysocki, linux-i2c@vger.kernel.org, Linux Kernel Mailing List [-- Attachment #1: Type: text/plain, Size: 778 bytes --] > > + pr_warn("Compatibility class %s will go away soon, please migrate userspace tools to use bus devices\n", > > + name); > > That's not going to do anything except annoy users who have no control > over this, sorry. Please just fix up all of the kernel and then delete > this function. So, we deprecated this sysfs-class 15 years ago and hid it with a Kconfig symbol. However, we never pursued this further, so e.g. Debian has the Kconfig symbol still enabled. Can we really remove this from one release to the next without another transition period? I am not afraid of tools like lm-sensors which were converted long ago. But custom code might rely on sysfs-paths created by this class. It was even advertised in IPMI docs until last week (fixed now). [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] driver core: class: warn if a compatibility class is registered 2024-09-03 9:04 ` Wolfram Sang @ 2024-09-03 9:06 ` Wolfram Sang 2024-09-03 10:06 ` Greg Kroah-Hartman 0 siblings, 1 reply; 11+ messages in thread From: Wolfram Sang @ 2024-09-03 9:06 UTC (permalink / raw) To: Greg Kroah-Hartman, Heiner Kallweit, Wolfram Sang, Rafael J. Wysocki, linux-i2c@vger.kernel.org, Linux Kernel Mailing List [-- Attachment #1: Type: text/plain, Size: 1069 bytes --] On Tue, Sep 03, 2024 at 11:04:44AM +0200, Wolfram Sang wrote: > > > > + pr_warn("Compatibility class %s will go away soon, please migrate userspace tools to use bus devices\n", > > > + name); > > > > That's not going to do anything except annoy users who have no control > > over this, sorry. Please just fix up all of the kernel and then delete > > this function. > > So, we deprecated this sysfs-class 15 years ago and hid it with a > Kconfig symbol. However, we never pursued this further, so e.g. Debian > has the Kconfig symbol still enabled. Can we really remove this from one > release to the next without another transition period? I am not afraid > of tools like lm-sensors which were converted long ago. But custom code > might rely on sysfs-paths created by this class. It was even advertised > in IPMI docs until last week (fixed now). I missed that Heiner was changing the driver core, not I2C core. So, to give more details, I am talking about I2C_COMPAT and the "i2c-adapter" class. The main question from above still stands. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] driver core: class: warn if a compatibility class is registered 2024-09-03 9:06 ` Wolfram Sang @ 2024-09-03 10:06 ` Greg Kroah-Hartman 2024-09-03 10:43 ` Wolfram Sang 0 siblings, 1 reply; 11+ messages in thread From: Greg Kroah-Hartman @ 2024-09-03 10:06 UTC (permalink / raw) To: Wolfram Sang, Heiner Kallweit, Wolfram Sang, Rafael J. Wysocki, linux-i2c@vger.kernel.org, Linux Kernel Mailing List On Tue, Sep 03, 2024 at 11:06:44AM +0200, Wolfram Sang wrote: > On Tue, Sep 03, 2024 at 11:04:44AM +0200, Wolfram Sang wrote: > > > > > > + pr_warn("Compatibility class %s will go away soon, please migrate userspace tools to use bus devices\n", > > > > + name); > > > > > > That's not going to do anything except annoy users who have no control > > > over this, sorry. Please just fix up all of the kernel and then delete > > > this function. > > > > So, we deprecated this sysfs-class 15 years ago and hid it with a > > Kconfig symbol. However, we never pursued this further, so e.g. Debian > > has the Kconfig symbol still enabled. Can we really remove this from one > > release to the next without another transition period? I am not afraid > > of tools like lm-sensors which were converted long ago. But custom code > > might rely on sysfs-paths created by this class. It was even advertised > > in IPMI docs until last week (fixed now). > > I missed that Heiner was changing the driver core, not I2C core. So, to > give more details, I am talking about I2C_COMPAT and the "i2c-adapter" > class. The main question from above still stands. Delete the code and see if anyone notices? :) greg k-h ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] driver core: class: warn if a compatibility class is registered 2024-09-03 10:06 ` Greg Kroah-Hartman @ 2024-09-03 10:43 ` Wolfram Sang 2024-09-03 10:50 ` Greg Kroah-Hartman 0 siblings, 1 reply; 11+ messages in thread From: Wolfram Sang @ 2024-09-03 10:43 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: Heiner Kallweit, Wolfram Sang, Rafael J. Wysocki, linux-i2c@vger.kernel.org, Linux Kernel Mailing List [-- Attachment #1: Type: text/plain, Size: 327 bytes --] > Delete the code and see if anyone notices? :) "Never ever break userspace, at least until Greg says so" :D Seriously, Heiner initially sent a patch simply removing the code in question [1]. May I interpret your above statement as "Acked-by"? [1] https://lore.kernel.org/r/80c4a898-5867-4162-ac85-bdf7c7c68746@gmail.com [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] driver core: class: warn if a compatibility class is registered 2024-09-03 10:43 ` Wolfram Sang @ 2024-09-03 10:50 ` Greg Kroah-Hartman 2024-09-03 11:09 ` Wolfram Sang 0 siblings, 1 reply; 11+ messages in thread From: Greg Kroah-Hartman @ 2024-09-03 10:50 UTC (permalink / raw) To: Wolfram Sang, Heiner Kallweit, Wolfram Sang, Rafael J. Wysocki, linux-i2c@vger.kernel.org, Linux Kernel Mailing List On Tue, Sep 03, 2024 at 12:43:52PM +0200, Wolfram Sang wrote: > > > Delete the code and see if anyone notices? :) > > "Never ever break userspace, at least until Greg says so" :D "Never break userspace in a way that anyone notices" is the real rule we have :) > Seriously, Heiner initially sent a patch simply removing the code in > question [1]. May I interpret your above statement as "Acked-by"? > > [1] https://lore.kernel.org/r/80c4a898-5867-4162-ac85-bdf7c7c68746@gmail.com Ack now sent there, thanks! greg k-h ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] driver core: class: warn if a compatibility class is registered 2024-09-03 10:50 ` Greg Kroah-Hartman @ 2024-09-03 11:09 ` Wolfram Sang 0 siblings, 0 replies; 11+ messages in thread From: Wolfram Sang @ 2024-09-03 11:09 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: Heiner Kallweit, Wolfram Sang, Rafael J. Wysocki, linux-i2c@vger.kernel.org, Linux Kernel Mailing List [-- Attachment #1: Type: text/plain, Size: 385 bytes --] > "Never break userspace in a way that anyone notices" is the real rule we > have :) Noted! > > Seriously, Heiner initially sent a patch simply removing the code in > > question [1]. May I interpret your above statement as "Acked-by"? > > > > [1] https://lore.kernel.org/r/80c4a898-5867-4162-ac85-bdf7c7c68746@gmail.com > > Ack now sent there, thanks! Thank you! [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2024-09-03 11:09 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 ` [PATCH 2/2] driver core: class: warn if a compatibility class is registered Heiner Kallweit 2024-09-02 19:20 ` 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
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).