* [PATCH] include/linux/rv.h: remove redundant include file
@ 2025-08-09 6:36 Akhilesh Patil
2025-08-11 10:49 ` Gabriele Monaco
0 siblings, 1 reply; 5+ messages in thread
From: Akhilesh Patil @ 2025-08-09 6:36 UTC (permalink / raw)
To: rostedt, mhiramat, mathieu.desnoyers, gmonaco
Cc: linux-trace-kernel, linux-kernel, akhileshpatilvnit, skhan
Remove redundant include <linux/types.h> to clean up the code.
Fix this redundancy introduced by commit [1].
Fixes: 24cbfe18d55a ("rv: Merge struct rv_monitor_def into struct rv_monitor") [1]
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/r/202507312017.oyD08TL5-lkp@intel.com/
Signed-off-by: Akhilesh Patil <akhilesh@ee.iitb.ac.in>
---
include/linux/rv.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/linux/rv.h b/include/linux/rv.h
index 14410a42faef..8b968b8ed77b 100644
--- a/include/linux/rv.h
+++ b/include/linux/rv.h
@@ -15,7 +15,6 @@
#ifdef CONFIG_RV
#include <linux/bitops.h>
-#include <linux/types.h>
#include <linux/array_size.h>
/*
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] include/linux/rv.h: remove redundant include file
2025-08-09 6:36 [PATCH] include/linux/rv.h: remove redundant include file Akhilesh Patil
@ 2025-08-11 10:49 ` Gabriele Monaco
2025-08-11 12:06 ` Akhilesh Patil
0 siblings, 1 reply; 5+ messages in thread
From: Gabriele Monaco @ 2025-08-11 10:49 UTC (permalink / raw)
To: Akhilesh Patil
Cc: rostedt, mhiramat, mathieu.desnoyers, linux-trace-kernel,
linux-kernel, akhileshpatilvnit, skhan
2025-08-09T06:36:58Z Akhilesh Patil <akhilesh@ee.iitb.ac.in>:
> Remove redundant include <linux/types.h> to clean up the code.
> Fix this redundancy introduced by commit [1].
>
> Fixes: 24cbfe18d55a ("rv: Merge struct rv_monitor_def into struct rv_monitor") [1]
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/r/202507312017.oyD08TL5-lkp@intel.com/
> Signed-off-by: Akhilesh Patil <akhilesh@ee.iitb.ac.in>
> ---
Thanks for the patch!
I'm really being picky here, but, since you're touching this, isn't it cleaner to keep all includes inside ifdef CONFIG_RV ?
When CONFIG_RV is not enabled, the header only defines constants so it doesn't need other includes.
This would mean you could remove the other #include <linux/types.h>, instead, and move the #include <linux/list.h> down.
I think you can keep the Fixes: tag and make clear the reason for cleanup in the commit message.
Thanks,
Gabriele
> include/linux/rv.h | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/include/linux/rv.h b/include/linux/rv.h
> index 14410a42faef..8b968b8ed77b 100644
> --- a/include/linux/rv.h
> +++ b/include/linux/rv.h
> @@ -15,7 +15,6 @@
>
> #ifdef CONFIG_RV
> #include <linux/bitops.h>
> -#include <linux/types.h>
> #include <linux/array_size.h>
>
> /*
> --
> 2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] include/linux/rv.h: remove redundant include file
2025-08-11 10:49 ` Gabriele Monaco
@ 2025-08-11 12:06 ` Akhilesh Patil
2025-08-11 12:12 ` [PATCH v2] " Akhilesh Patil
0 siblings, 1 reply; 5+ messages in thread
From: Akhilesh Patil @ 2025-08-11 12:06 UTC (permalink / raw)
To: Gabriele Monaco
Cc: rostedt, mhiramat, mathieu.desnoyers, linux-trace-kernel,
linux-kernel, akhileshpatilvnit, skhan
On Mon, Aug 11, 2025 at 10:49:00AM +0000, Gabriele Monaco wrote:
> 2025-08-09T06:36:58Z Akhilesh Patil <akhilesh@ee.iitb.ac.in>:
>
> > Remove redundant include <linux/types.h> to clean up the code.
> > Fix this redundancy introduced by commit [1].
> >
> > Fixes: 24cbfe18d55a ("rv: Merge struct rv_monitor_def into struct rv_monitor") [1]
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes: https://lore.kernel.org/r/202507312017.oyD08TL5-lkp@intel.com/
> > Signed-off-by: Akhilesh Patil <akhilesh@ee.iitb.ac.in>
> > ---
>
> Thanks for the patch!
> I'm really being picky here, but, since you're touching this, isn't it cleaner to keep all includes inside ifdef CONFIG_RV ?
Agree.
> When CONFIG_RV is not enabled, the header only defines constants so it doesn't need other includes.
>
> This would mean you could remove the other #include <linux/types.h>, instead, and move the #include <linux/list.h> down.
>
> I think you can keep the Fixes: tag and make clear the reason for cleanup in the commit message.
>
> Thanks,
> Gabriele
>
Thanks for the review.
I have shared v2 addressing these comments and additional cleanup.
Regards,
Akhilesh
> > include/linux/rv.h | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/include/linux/rv.h b/include/linux/rv.h
> > index 14410a42faef..8b968b8ed77b 100644
> > --- a/include/linux/rv.h
> > +++ b/include/linux/rv.h
> > @@ -15,7 +15,6 @@
> >
> > #ifdef CONFIG_RV
> > #include <linux/bitops.h>
> > -#include <linux/types.h>
> > #include <linux/array_size.h>
> >
> > /*
> > --
> > 2.34.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] include/linux/rv.h: remove redundant include file
2025-08-11 12:06 ` Akhilesh Patil
@ 2025-08-11 12:12 ` Akhilesh Patil
2025-08-11 12:40 ` Gabriele Monaco
0 siblings, 1 reply; 5+ messages in thread
From: Akhilesh Patil @ 2025-08-11 12:12 UTC (permalink / raw)
To: rostedt, mhiramat, mathieu.desnoyers, gmonaco
Cc: linux-trace-kernel, linux-kernel, akhileshpatilvnit, skhan
Remove redundant include <linux/types.h> to clean up the code.
Move all unique include files inside CONFIG_RV as they are only needed
when CONFIG_RV is enabled. Arrange include files alphabetically.
Fixes: 24cbfe18d55a ("rv: Merge struct rv_monitor_def into struct rv_monitor") [1]
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/r/202507312017.oyD08TL5-lkp@intel.com/
Signed-off-by: Akhilesh Patil <akhilesh@ee.iitb.ac.in>
---
include/linux/rv.h | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/include/linux/rv.h b/include/linux/rv.h
index 14410a42faef..9520aab34bcb 100644
--- a/include/linux/rv.h
+++ b/include/linux/rv.h
@@ -7,16 +7,14 @@
#ifndef _LINUX_RV_H
#define _LINUX_RV_H
-#include <linux/types.h>
-#include <linux/list.h>
-
#define MAX_DA_NAME_LEN 32
#define MAX_DA_RETRY_RACING_EVENTS 3
#ifdef CONFIG_RV
+#include <linux/array_size.h>
#include <linux/bitops.h>
+#include <linux/list.h>
#include <linux/types.h>
-#include <linux/array_size.h>
/*
* Deterministic automaton per-object variables.
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] include/linux/rv.h: remove redundant include file
2025-08-11 12:12 ` [PATCH v2] " Akhilesh Patil
@ 2025-08-11 12:40 ` Gabriele Monaco
0 siblings, 0 replies; 5+ messages in thread
From: Gabriele Monaco @ 2025-08-11 12:40 UTC (permalink / raw)
To: Akhilesh Patil, rostedt, mhiramat, mathieu.desnoyers
Cc: linux-trace-kernel, linux-kernel, akhileshpatilvnit, skhan
On Mon, 2025-08-11 at 17:42 +0530, Akhilesh Patil wrote:
> Remove redundant include <linux/types.h> to clean up the code.
> Move all unique include files inside CONFIG_RV as they are only
> needed when CONFIG_RV is enabled.
> Arrange include files alphabetically.
That is usually not necessary. Also, it shouldn't happen, but sometimes
the order of inclusion matters. Anyway this isn't the case here (builds
fine locally) and when it is, the test robot should notice.
Looks good to me overall, thanks!
Reviewed-by: Gabriele Monaco <gmonaco@redhat.com>
>
> Fixes: 24cbfe18d55a ("rv: Merge struct rv_monitor_def into struct
> rv_monitor") [1]
> Reported-by: kernel test robot <lkp@intel.com>
> Closes:
> https://lore.kernel.org/r/202507312017.oyD08TL5-lkp@intel.com/
> Signed-off-by: Akhilesh Patil <akhilesh@ee.iitb.ac.in>
> ---
> include/linux/rv.h | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/include/linux/rv.h b/include/linux/rv.h
> index 14410a42faef..9520aab34bcb 100644
> --- a/include/linux/rv.h
> +++ b/include/linux/rv.h
> @@ -7,16 +7,14 @@
> #ifndef _LINUX_RV_H
> #define _LINUX_RV_H
>
> -#include <linux/types.h>
> -#include <linux/list.h>
> -
> #define MAX_DA_NAME_LEN 32
> #define MAX_DA_RETRY_RACING_EVENTS 3
>
> #ifdef CONFIG_RV
> +#include <linux/array_size.h>
> #include <linux/bitops.h>
> +#include <linux/list.h>
> #include <linux/types.h>
> -#include <linux/array_size.h>
>
> /*
> * Deterministic automaton per-object variables.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-08-11 12:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-09 6:36 [PATCH] include/linux/rv.h: remove redundant include file Akhilesh Patil
2025-08-11 10:49 ` Gabriele Monaco
2025-08-11 12:06 ` Akhilesh Patil
2025-08-11 12:12 ` [PATCH v2] " Akhilesh Patil
2025-08-11 12:40 ` Gabriele Monaco
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).