[PATCH] powerpc: use swap() to make code cleaner

Stephen Rothwell sfr at canb.auug.org.au
Fri Nov 5 07:26:18 AEDT 2021


Hi Segher,

On Thu, 4 Nov 2021 06:33:51 -0500 Segher Boessenkool <segher at 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 at gmail.com wrote:  
> > > From: Yang Guang <yang.guang5 at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20211105/ad4cd77d/attachment.sig>


More information about the Linuxppc-dev mailing list