lkml.org 
[lkml]   [2023]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/2] sh: Added kernel.h to word-at-a-time
On Thu, Dec 14, 2023 at 09:06:12PM +0000, tanzirh@google.com wrote:
> This patch includes linux/kernel.h in asm/word-at-a-time.h for the
> sh architecture. WORD_AT_A_TIME_CONSTANTS depends on kernel.h.
> Making this implicit dependancy explicit allows for later improvements
> in the lib/string.c inclusion list.
>
> Suggested-by: Al Viro <viro@zeniv.linux.org.uk>

You forgot your SoB, but...

...

> #ifdef CONFIG_CPU_BIG_ENDIAN
> # include <asm-generic/word-at-a-time.h>
> #else
> +#include <linux/kernel.h>

I highly discourage from doing that. Instead, split what is needed to
the separate (new) header and include that one.

> /*
> * Little-endian version cribbed from x86.
> */

--
With Best Regards,
Andy Shevchenko



\
 
 \ /
  Last update: 2023-12-15 17:05    [W:0.081 / U:0.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site