[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aJnc17BSsDOnfNwg@bhairav-test.ee.iitb.ac.in>
Date: Mon, 11 Aug 2025 17:36:47 +0530
From: Akhilesh Patil <akhilesh@...iitb.ac.in>
To: Gabriele Monaco <gmonaco@...hat.com>
Cc: rostedt@...dmis.org, mhiramat@...nel.org,
mathieu.desnoyers@...icios.com, linux-trace-kernel@...r.kernel.org,
linux-kernel@...r.kernel.org, akhileshpatilvnit@...il.com,
skhan@...uxfoundation.org
Subject: Re: [PATCH] include/linux/rv.h: remove redundant include file
On Mon, Aug 11, 2025 at 10:49:00AM +0000, Gabriele Monaco wrote:
> 2025-08-09T06:36:58Z Akhilesh Patil <akhilesh@...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@...el.com>
> > Closes: https://lore.kernel.org/r/202507312017.oyD08TL5-lkp@intel.com/
> > Signed-off-by: Akhilesh Patil <akhilesh@...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
>
Powered by blists - more mailing lists