* [PATCH v1] spmi: Drop struct spmi_device_id
@ 2026-11-25 11:21 Uwe Kleine-König
2026-11-25 14:09 ` Pawel Zalewski
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2026-11-25 11:21 UTC (permalink / raw)
To: Stephen Boyd, Abel Vesa; +Cc: Pawel Zalewski, linux-kernel
This was introduced by commit 5a86bf343976 ("spmi: Linux driver
framework for SPMI") in 2014 for Linux 3.15 and already then was unused
and no user was added since then.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
include/linux/device-id/spmi.h | 17 -----------------
include/linux/mod_devicetable.h | 1 -
2 files changed, 18 deletions(-)
delete mode 100644 include/linux/device-id/spmi.h
diff --git a/include/linux/device-id/spmi.h b/include/linux/device-id/spmi.h
deleted file mode 100644
index a821c42cfc9a..000000000000
--- a/include/linux/device-id/spmi.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef LINUX_DEVICE_ID_SPMI_H
-#define LINUX_DEVICE_ID_SPMI_H
-
-#ifdef __KERNEL__
-typedef unsigned long kernel_ulong_t;
-#endif
-
-#define SPMI_NAME_SIZE 32
-#define SPMI_MODULE_PREFIX "spmi:"
-
-struct spmi_device_id {
- char name[SPMI_NAME_SIZE];
- kernel_ulong_t driver_data; /* Data private to the driver */
-};
-
-#endif /* ifndef LINUX_DEVICE_ID_SPMI_H */
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index a69947f2c1dc..fd21238c99f5 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -51,7 +51,6 @@
#include "device-id/serio.h"
#include "device-id/slim.h"
#include "device-id/spi.h"
-#include "device-id/spmi.h"
#include "device-id/ssam.h"
#include "device-id/ssb.h"
#include "device-id/tb.h"
base-commit: 3dd8c790a7b7027abdd568e36db5e82ffaea7c77
--
2.56.0.rc1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] spmi: Drop struct spmi_device_id
2026-11-25 11:21 [PATCH v1] spmi: Drop struct spmi_device_id Uwe Kleine-König
@ 2026-11-25 14:09 ` Pawel Zalewski
2026-11-25 17:50 ` Uwe Kleine-König
2026-11-25 20:44 ` kernel test robot
2 siblings, 0 replies; 5+ messages in thread
From: Pawel Zalewski @ 2026-11-25 14:09 UTC (permalink / raw)
To: Uwe Kleine-König; +Cc: Stephen Boyd, Abel Vesa, linux-kernel
> This was introduced by commit 5a86bf343976 ("spmi: Linux driver
> framework for SPMI") in 2014 for Linux 3.15 and already then was unused
> and no user was added since then.
Yeah you are correct; I have not found any users either.
Reviewed-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] spmi: Drop struct spmi_device_id
2026-11-25 11:21 [PATCH v1] spmi: Drop struct spmi_device_id Uwe Kleine-König
2026-11-25 14:09 ` Pawel Zalewski
@ 2026-11-25 17:50 ` Uwe Kleine-König
2026-11-25 18:01 ` Uwe Kleine-König
2026-11-25 20:44 ` kernel test robot
2 siblings, 1 reply; 5+ messages in thread
From: Uwe Kleine-König @ 2026-11-25 17:50 UTC (permalink / raw)
To: Stephen Boyd, Abel Vesa; +Cc: Pawel Zalewski, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1402 bytes --]
On Wed, Nov 25, 2026 at 12:21:52PM +0100, Uwe Kleine-König wrote:
> This was introduced by commit 5a86bf343976 ("spmi: Linux driver
> framework for SPMI") in 2014 for Linux 3.15 and already then was unused
> and no user was added since then.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> ---
> include/linux/device-id/spmi.h | 17 -----------------
> include/linux/mod_devicetable.h | 1 -
> 2 files changed, 18 deletions(-)
> delete mode 100644 include/linux/device-id/spmi.h
>
> diff --git a/include/linux/device-id/spmi.h b/include/linux/device-id/spmi.h
> deleted file mode 100644
> index a821c42cfc9a..000000000000
> --- a/include/linux/device-id/spmi.h
> +++ /dev/null
> @@ -1,17 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0 */
> -#ifndef LINUX_DEVICE_ID_SPMI_H
> -#define LINUX_DEVICE_ID_SPMI_H
> -
> -#ifdef __KERNEL__
> -typedef unsigned long kernel_ulong_t;
> -#endif
> -
> -#define SPMI_NAME_SIZE 32
> -#define SPMI_MODULE_PREFIX "spmi:"
> -
> -struct spmi_device_id {
> - char name[SPMI_NAME_SIZE];
> - kernel_ulong_t driver_data; /* Data private to the driver */
> -};
> -
> -#endif /* ifndef LINUX_DEVICE_ID_SPMI_H */
With further build tests done SPMI_NAME_SIZE is in use however. So for
now please disregard this patch, I guess I'll move it to another header
but will investigate the situation first.
Sorry
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] spmi: Drop struct spmi_device_id
2026-11-25 17:50 ` Uwe Kleine-König
@ 2026-11-25 18:01 ` Uwe Kleine-König
0 siblings, 0 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2026-11-25 18:01 UTC (permalink / raw)
To: Stephen Boyd, Abel Vesa; +Cc: Pawel Zalewski, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 2157 bytes --]
On Wed, Nov 25, 2026 at 06:50:16PM +0100, Uwe Kleine-König wrote:
> On Wed, Nov 25, 2026 at 12:21:52PM +0100, Uwe Kleine-König wrote:
> > This was introduced by commit 5a86bf343976 ("spmi: Linux driver
> > framework for SPMI") in 2014 for Linux 3.15 and already then was unused
> > and no user was added since then.
> >
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> > ---
> > include/linux/device-id/spmi.h | 17 -----------------
> > include/linux/mod_devicetable.h | 1 -
> > 2 files changed, 18 deletions(-)
> > delete mode 100644 include/linux/device-id/spmi.h
> >
> > diff --git a/include/linux/device-id/spmi.h b/include/linux/device-id/spmi.h
> > deleted file mode 100644
> > index a821c42cfc9a..000000000000
> > --- a/include/linux/device-id/spmi.h
> > +++ /dev/null
> > @@ -1,17 +0,0 @@
> > -/* SPDX-License-Identifier: GPL-2.0 */
> > -#ifndef LINUX_DEVICE_ID_SPMI_H
> > -#define LINUX_DEVICE_ID_SPMI_H
> > -
> > -#ifdef __KERNEL__
> > -typedef unsigned long kernel_ulong_t;
> > -#endif
> > -
> > -#define SPMI_NAME_SIZE 32
> > -#define SPMI_MODULE_PREFIX "spmi:"
> > -
> > -struct spmi_device_id {
> > - char name[SPMI_NAME_SIZE];
> > - kernel_ulong_t driver_data; /* Data private to the driver */
> > -};
> > -
> > -#endif /* ifndef LINUX_DEVICE_ID_SPMI_H */
>
> With further build tests done SPMI_NAME_SIZE is in use however. So for
> now please disregard this patch, I guess I'll move it to another header
> but will investigate the situation first.
I think the fix is:
diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c
index ec97f12046f5..6d6805a5ae69 100644
--- a/drivers/spmi/spmi.c
+++ b/drivers/spmi/spmi.c
@@ -64,8 +64,7 @@ static int spmi_device_match(struct device *dev, const struct device_driver *drv
return 1;
if (drv->name)
- return strncmp(dev_name(dev), drv->name,
- SPMI_NAME_SIZE) == 0;
+ return strcmp(dev_name(dev), drv->name) == 0;
return 0;
}
which might be considered a standalone fix as there is no reason for
both dev_name(dev) or drv->name to be not longer than SPMI_NAME_SIZE.
Best regards
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] spmi: Drop struct spmi_device_id
2026-11-25 11:21 [PATCH v1] spmi: Drop struct spmi_device_id Uwe Kleine-König
2026-11-25 14:09 ` Pawel Zalewski
2026-11-25 17:50 ` Uwe Kleine-König
@ 2026-11-25 20:44 ` kernel test robot
2 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2026-11-25 20:44 UTC (permalink / raw)
To: Uwe Kleine-König, Stephen Boyd, Abel Vesa
Cc: oe-kbuild-all, Pawel Zalewski, linux-kernel
Hi Uwe,
kernel test robot noticed the following build errors:
[auto build test ERROR on 3dd8c790a7b7027abdd568e36db5e82ffaea7c77]
url: https://github.com/intel-lab-lkp/linux/commits/Uwe-Kleine-K-nig/spmi-Drop-struct-spmi_device_id/20261125-122152
base: 3dd8c790a7b7027abdd568e36db5e82ffaea7c77
patch link: https://lore.kernel.org/r/20261125112158.938835-2-u.kleine-koenig%40baylibre.com
patch subject: [PATCH v1] spmi: Drop struct spmi_device_id
config: nios2-randconfig-1000-20261126 (https://download.01.org/0day-ci/archive/20261126/20261126044125.DtFzBYQ9-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261126/20261126044125.DtFzBYQ9-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/20261126044125.DtFzBYQ9-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/spmi/spmi.c: In function 'spmi_device_match':
>> drivers/spmi/spmi.c:68:32: error: 'SPMI_NAME_SIZE' undeclared (first use in this function); did you mean 'SPI_NAME_SIZE'?
68 | SPMI_NAME_SIZE) == 0;
| ^~~~~~~~~~~~~~
| SPI_NAME_SIZE
drivers/spmi/spmi.c:68:32: note: each undeclared identifier is reported only once for each function it appears in
vim +68 drivers/spmi/spmi.c
5a86bf343976b9c Kenneth Heitke 2014-02-12 60
d69d804845985c2 Greg Kroah-Hartman 2024-07-01 61 static int spmi_device_match(struct device *dev, const struct device_driver *drv)
5a86bf343976b9c Kenneth Heitke 2014-02-12 62 {
5a86bf343976b9c Kenneth Heitke 2014-02-12 63 if (of_driver_match_device(dev, drv))
5a86bf343976b9c Kenneth Heitke 2014-02-12 64 return 1;
5a86bf343976b9c Kenneth Heitke 2014-02-12 65
5a86bf343976b9c Kenneth Heitke 2014-02-12 66 if (drv->name)
5a86bf343976b9c Kenneth Heitke 2014-02-12 67 return strncmp(dev_name(dev), drv->name,
5a86bf343976b9c Kenneth Heitke 2014-02-12 @68 SPMI_NAME_SIZE) == 0;
5a86bf343976b9c Kenneth Heitke 2014-02-12 69
5a86bf343976b9c Kenneth Heitke 2014-02-12 70 return 0;
5a86bf343976b9c Kenneth Heitke 2014-02-12 71 }
5a86bf343976b9c Kenneth Heitke 2014-02-12 72
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-25 20:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-25 11:21 [PATCH v1] spmi: Drop struct spmi_device_id Uwe Kleine-König
2026-11-25 14:09 ` Pawel Zalewski
2026-11-25 17:50 ` Uwe Kleine-König
2026-11-25 18:01 ` Uwe Kleine-König
2026-11-25 20:44 ` kernel test robot
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®