lkml.org 
[lkml]   [2021]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] powerpc: use swap() to make code cleaner
Hi Segher,

On Thu, 4 Nov 2021 06:33:51 -0500 Segher Boessenkool <segher@kernel.crashing.org> wrote:
>
> On Thu, Nov 04, 2021 at 09:06:56PM +1100, Stephen Rothwell wrote:
> > On Thu, 4 Nov 2021 14:17:09 +0800 davidcomponentone@gmail.com wrote:
> > > From: Yang Guang <yang.guang5@zte.com.cn>
> > >
> > > Use the macro 'swap()' defined in 'include/linux/minmax.h' to avoid
> > > opencoding it.
> >
> > So if swap() is in the above include file, then you should include it.
>
> It is included from kernel.h already (which is included from delay.h).

And that becomes a pain when include files get "cleaned up". :-(

$ grep kernel.h include/linux/delay.h
$

See commit

300424acf349 ("include/linux/delay.h: replace kernel.h with the necessary inclusions")

currently pending the Andrew Morton's patch queue (the above is a
linux-next commit).
--
Cheers,
Stephen Rothwell
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2021-11-04 21:26    [W:0.040 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site