[PATCH u-boot 07/39] compiler.h: align the __ADDRESSABLE macro with Linux' version

Bin Meng bmeng.cn at gmail.com
Mon Mar 8 08:27:41 CET 2021


On Sun, Mar 7, 2021 at 12:26 PM Marek Behún <marek.behun at nic.cz> wrote:
>
> Use UNIQUE_ID in the __ADDRESSABLE macro.
>
> Signed-off-by: Marek Behún <marek.behun at nic.cz>
> ---
>  include/linux/compiler.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/compiler.h b/include/linux/compiler.h
> index 82a8a4ede9..98dd3fc4cc 100644
> --- a/include/linux/compiler.h
> +++ b/include/linux/compiler.h
> @@ -295,7 +295,7 @@ unsigned long read_word_at_a_time(const void *addr)
>   */
>  #define __ADDRESSABLE(sym) \
>         static void * __section(".discard.addressable") __used \
> -               __PASTE(__addressable_##sym, __LINE__) = (void *)&sym;
> +               __UNIQUE_ID(__PASTE(__addressable_,sym)) = (void *)&sym;

nits: need one space after ,

>
>  /**
>   * offset_to_ptr - convert a relative memory offset to an absolute pointer

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>


More information about the U-Boot mailing list