linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: remove redundant preempt.h
@ 2016-02-12 17:56 Yang Shi
  2016-02-20  0:07 ` Shi, Yang
  0 siblings, 1 reply; 4+ messages in thread
From: Yang Shi @ 2016-02-12 17:56 UTC (permalink / raw)
  To: will.deacon, catalin.marinas
  Cc: linux-kernel, linux-arm-kernel, linaro-kernel, yang.shi

preempt.h has been included by sched.h, so it is not necessary to include
both, just keep sched.h.

Signed-off-by: Yang Shi <yang.shi@linaro.org>
---
Happened to find this when checking preempt.h include for another patch review.
Build test is passed with and without CONFIG_PREEMPT enabled.

 arch/arm64/kernel/cpuinfo.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
index 212ae63..e2b37ff 100644
--- a/arch/arm64/kernel/cpuinfo.c
+++ b/arch/arm64/kernel/cpuinfo.c
@@ -25,7 +25,6 @@
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/personality.h>
-#include <linux/preempt.h>
 #include <linux/printk.h>
 #include <linux/seq_file.h>
 #include <linux/sched.h>
-- 
2.0.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] arm64: remove redundant preempt.h
  2016-02-12 17:56 [PATCH] arm64: remove redundant preempt.h Yang Shi
@ 2016-02-20  0:07 ` Shi, Yang
  2016-02-22  9:52   ` Will Deacon
  0 siblings, 1 reply; 4+ messages in thread
From: Shi, Yang @ 2016-02-20  0:07 UTC (permalink / raw)
  To: will.deacon, catalin.marinas
  Cc: linux-kernel, linux-arm-kernel, linaro-kernel

Hi Will & Catalin,

Any comment on this one?

Thanks,
Yang

On 2/12/2016 9:56 AM, Yang Shi wrote:
> preempt.h has been included by sched.h, so it is not necessary to include
> both, just keep sched.h.
>
> Signed-off-by: Yang Shi <yang.shi@linaro.org>
> ---
> Happened to find this when checking preempt.h include for another patch review.
> Build test is passed with and without CONFIG_PREEMPT enabled.
>
>   arch/arm64/kernel/cpuinfo.c | 1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
> index 212ae63..e2b37ff 100644
> --- a/arch/arm64/kernel/cpuinfo.c
> +++ b/arch/arm64/kernel/cpuinfo.c
> @@ -25,7 +25,6 @@
>   #include <linux/init.h>
>   #include <linux/kernel.h>
>   #include <linux/personality.h>
> -#include <linux/preempt.h>
>   #include <linux/printk.h>
>   #include <linux/seq_file.h>
>   #include <linux/sched.h>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] arm64: remove redundant preempt.h
  2016-02-20  0:07 ` Shi, Yang
@ 2016-02-22  9:52   ` Will Deacon
  2016-02-22 17:03     ` Mark Rutland
  0 siblings, 1 reply; 4+ messages in thread
From: Will Deacon @ 2016-02-22  9:52 UTC (permalink / raw)
  To: Shi, Yang; +Cc: catalin.marinas, linux-kernel, linux-arm-kernel, linaro-kernel

On Fri, Feb 19, 2016 at 04:07:02PM -0800, Shi, Yang wrote:
> Any comment on this one?

I don't really see the point in it, to be honest. Relying on implicit
#includes is usually a bad idea, there are other files in the kernel
including both of these headers and there's not actually a problem to
fix as far as I can tell.

Will

> On 2/12/2016 9:56 AM, Yang Shi wrote:
> >preempt.h has been included by sched.h, so it is not necessary to include
> >both, just keep sched.h.
> >
> >Signed-off-by: Yang Shi <yang.shi@linaro.org>
> >---
> >Happened to find this when checking preempt.h include for another patch review.
> >Build test is passed with and without CONFIG_PREEMPT enabled.
> >
> >  arch/arm64/kernel/cpuinfo.c | 1 -
> >  1 file changed, 1 deletion(-)
> >
> >diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
> >index 212ae63..e2b37ff 100644
> >--- a/arch/arm64/kernel/cpuinfo.c
> >+++ b/arch/arm64/kernel/cpuinfo.c
> >@@ -25,7 +25,6 @@
> >  #include <linux/init.h>
> >  #include <linux/kernel.h>
> >  #include <linux/personality.h>
> >-#include <linux/preempt.h>
> >  #include <linux/printk.h>
> >  #include <linux/seq_file.h>
> >  #include <linux/sched.h>
> >
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] arm64: remove redundant preempt.h
  2016-02-22  9:52   ` Will Deacon
@ 2016-02-22 17:03     ` Mark Rutland
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Rutland @ 2016-02-22 17:03 UTC (permalink / raw)
  To: Will Deacon
  Cc: Shi, Yang, catalin.marinas, linaro-kernel, linux-kernel,
	linux-arm-kernel

On Mon, Feb 22, 2016 at 09:52:05AM +0000, Will Deacon wrote:
> On Fri, Feb 19, 2016 at 04:07:02PM -0800, Shi, Yang wrote:
> > Any comment on this one?
> 
> I don't really see the point in it, to be honest. Relying on implicit
> #includes is usually a bad idea,

FWIW, in this case we aren't relying on implicit includes. That's when
you explicitly use something but haven't included the relevant header
directly.

For everything we explicitly use, we have included the relevant headers.

Anything that uses preempt.h implicitly should've pulled in preempt.h
via its headers.

> there are other files in the kernel including both of these headers
> and there's not actually a problem to fix as far as I can tell.

Up to you.

The patch does appear correct in that the include is redundant, but its
presence is admittedly not harmful.

Mark.

> 
> Will
> 
> > On 2/12/2016 9:56 AM, Yang Shi wrote:
> > >preempt.h has been included by sched.h, so it is not necessary to include
> > >both, just keep sched.h.
> > >
> > >Signed-off-by: Yang Shi <yang.shi@linaro.org>
> > >---
> > >Happened to find this when checking preempt.h include for another patch review.
> > >Build test is passed with and without CONFIG_PREEMPT enabled.
> > >
> > >  arch/arm64/kernel/cpuinfo.c | 1 -
> > >  1 file changed, 1 deletion(-)
> > >
> > >diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
> > >index 212ae63..e2b37ff 100644
> > >--- a/arch/arm64/kernel/cpuinfo.c
> > >+++ b/arch/arm64/kernel/cpuinfo.c
> > >@@ -25,7 +25,6 @@
> > >  #include <linux/init.h>
> > >  #include <linux/kernel.h>
> > >  #include <linux/personality.h>
> > >-#include <linux/preempt.h>
> > >  #include <linux/printk.h>
> > >  #include <linux/seq_file.h>
> > >  #include <linux/sched.h>
> > >
> > 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-02-22 17:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-12 17:56 [PATCH] arm64: remove redundant preempt.h Yang Shi
2016-02-20  0:07 ` Shi, Yang
2016-02-22  9:52   ` Will Deacon
2016-02-22 17:03     ` Mark Rutland

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).