* [PATCH] kobject: remove unused kobject action
@ 2020-07-13 19:15 Garrit Franke
2020-07-14 6:35 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Garrit Franke @ 2020-07-13 19:15 UTC (permalink / raw)
To: rafael, gregkh, linux-kernel; +Cc: Garrit Franke
I noticed that the KOBJ_MAX action is never used. Does it serve any
purpose, or can it be removed? As far as I know, Kobjects shouldn't be
used for drivers and more higher level abstraction layers, so I figured
it isn't used by user-provided code either.
Regards
Garrit Franke
Signed-off-by: Garrit Franke <garritfranke@gmail.com>
---
include/linux/kobject.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 6cba088bee24..fd99c5d2d8b7 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -58,8 +58,7 @@ enum kobject_action {
KOBJ_ONLINE,
KOBJ_OFFLINE,
KOBJ_BIND,
- KOBJ_UNBIND,
- KOBJ_MAX
+ KOBJ_UNBIND
};
struct kobject {
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] kobject: remove unused kobject action
2020-07-13 19:15 [PATCH] kobject: remove unused kobject action Garrit Franke
@ 2020-07-14 6:35 ` Greg KH
2020-07-15 15:11 ` [PATCH v2] kobject: remove unused KOBJ_MAX action Garrit Franke
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2020-07-14 6:35 UTC (permalink / raw)
To: Garrit Franke; +Cc: rafael, linux-kernel
On Mon, Jul 13, 2020 at 09:15:10PM +0200, Garrit Franke wrote:
> I noticed that the KOBJ_MAX action is never used. Does it serve any
> purpose, or can it be removed?
Don't ask questions in a changelog comment that you don't also answer :)
> As far as I know, Kobjects shouldn't be
> used for drivers and more higher level abstraction layers, so I figured
> it isn't used by user-provided code either.
Userspace sees these uevents, right?
>
> Regards
> Garrit Franke
This isn't needed in a changelog text.
Try running and testing this a bit more before sending it for inclusion
please.
>
> Signed-off-by: Garrit Franke <garritfranke@gmail.com>
> ---
> include/linux/kobject.h | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/include/linux/kobject.h b/include/linux/kobject.h
> index 6cba088bee24..fd99c5d2d8b7 100644
> --- a/include/linux/kobject.h
> +++ b/include/linux/kobject.h
> @@ -58,8 +58,7 @@ enum kobject_action {
> KOBJ_ONLINE,
> KOBJ_OFFLINE,
> KOBJ_BIND,
> - KOBJ_UNBIND,
> - KOBJ_MAX
> + KOBJ_UNBIND
No need to drop that trailing ','
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] kobject: remove unused KOBJ_MAX action
2020-07-14 6:35 ` Greg KH
@ 2020-07-15 15:11 ` Garrit Franke
2020-07-15 15:32 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Garrit Franke @ 2020-07-15 15:11 UTC (permalink / raw)
To: gregkh, rafael, linux-kernel; +Cc: Garrit Franke
The loop in lib/kobject_uevent.c that checked for KOBJ_MAX is no longer present, we do
a much more sane ARRAY_SIZE() check instead (see 5c5daf657cb5).
Therefore, the KOBJ_MAX is not used anymore.
Signed-off-by: Garrit Franke <garritfranke@gmail.com>
---
include/linux/kobject.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 6cba088bee24..ea30529fba08 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -59,7 +59,6 @@ enum kobject_action {
KOBJ_OFFLINE,
KOBJ_BIND,
KOBJ_UNBIND,
- KOBJ_MAX
};
struct kobject {
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] kobject: remove unused KOBJ_MAX action
2020-07-15 15:11 ` [PATCH v2] kobject: remove unused KOBJ_MAX action Garrit Franke
@ 2020-07-15 15:32 ` Greg KH
2020-07-16 20:31 ` [PATCH v3] " Garrit Franke
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2020-07-15 15:32 UTC (permalink / raw)
To: Garrit Franke; +Cc: rafael, linux-kernel
On Wed, Jul 15, 2020 at 05:11:16PM +0200, Garrit Franke wrote:
> The loop in lib/kobject_uevent.c that checked for KOBJ_MAX is no longer present, we do
> a much more sane ARRAY_SIZE() check instead (see 5c5daf657cb5).
Odd line wrapping :(
When you specify a git commit, use the format as documented in the
submitting patches file:
5c5daf657cb5 ("Driver core: exclude kobject_uevent.c for !CONFIG_HOTPLUG")
> Therefore, the KOBJ_MAX is not used anymore.
That sentence does not make much sense :(
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v3] kobject: remove unused KOBJ_MAX action
2020-07-15 15:32 ` Greg KH
@ 2020-07-16 20:31 ` Garrit Franke
0 siblings, 0 replies; 5+ messages in thread
From: Garrit Franke @ 2020-07-16 20:31 UTC (permalink / raw)
To: gregkh, rafael, linux-kernel; +Cc: Garrit Franke
The loop in libb/kobj_uevent.c that checked for KOBBJ_MAX is no longer
present, we do a much more sane ARRAY_SIZE() check instead. See
5c5daf657cb5 ("Driver core: exclude kobject_uevent.c for
!CONFIG_HOTPLUG").
Signed-off-by: Garrit Franke <garritfranke@gmail.com>
---
include/linux/kobject.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 6cba088bee24..ea30529fba08 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -59,7 +59,6 @@ enum kobject_action {
KOBJ_OFFLINE,
KOBJ_BIND,
KOBJ_UNBIND,
- KOBJ_MAX
};
struct kobject {
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-07-16 20:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-13 19:15 [PATCH] kobject: remove unused kobject action Garrit Franke
2020-07-14 6:35 ` Greg KH
2020-07-15 15:11 ` [PATCH v2] kobject: remove unused KOBJ_MAX action Garrit Franke
2020-07-15 15:32 ` Greg KH
2020-07-16 20:31 ` [PATCH v3] " Garrit Franke
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).