mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gabriele Monaco <gmonaco@redhat.com>
To: Akhilesh Patil <akhilesh@ee.iitb.ac.in>
Cc: rostedt@goodmis.org, mhiramat@kernel.org,
	mathieu.desnoyers@efficios.com,
	linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org,
	akhileshpatilvnit@gmail.com, skhan@linuxfoundation.org
Subject: Re: [PATCH] include/linux/rv.h: remove redundant include file
Date: Mon, 11 Aug 2025 10:49:00 +0000 (UTC)	[thread overview]
Message-ID: <30f0e085-b636-45be-960b-68bf6a136f59@redhat.com> (raw)
In-Reply-To: <aJbsYkON4V4iFPFG@bhairav-test.ee.iitb.ac.in>

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


  reply	other threads:[~2025-08-11 10:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-09  6:36 Akhilesh Patil
2025-08-11 10:49 ` Gabriele Monaco [this message]
2025-08-11 12:06   ` Akhilesh Patil
2025-08-11 12:12     ` [PATCH v2] " Akhilesh Patil
2025-08-11 12:40       ` Gabriele Monaco

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=30f0e085-b636-45be-960b-68bf6a136f59@redhat.com \
    --to=gmonaco@redhat.com \
    --cc=akhilesh@ee.iitb.ac.in \
    --cc=akhileshpatilvnit@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=skhan@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®