Re: [PATCH] staging: media: atomisp: prefer __aligned over __attribute__((aligned))
From: Andy Shevchenko
Date: Thu Jun 18 2026 - 08:54:21 EST
On Thu, Jun 18, 2026 at 03:09:51PM +0300, Igor Putko wrote:
> Replace the GCC-specific __attribute__((aligned(a))) with the standard
> __aligned(a) macro to match the kernel coding style.
>
> The checkpatch.pl error about complex macro values is a false positive
> here, as enclosing the macro expansion in parentheses breaks declaration
> syntax.
...
> --- a/drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h
> +++ b/drivers/staging/media/atomisp/pci/hive_isp_css_include/platform_support.h
> #define UINT32_MAX UINT_MAX
> #define UCHAR_MAX (255)
>
> -#define CSS_ALIGN(d, a) d __attribute__((aligned(a)))
> +#define CSS_ALIGN(d, a) d __aligned(a)
Ah, nice finding! But this header should be killed. It means that rather
kill the macro altogether and replace all occurrences with the proper
attribute (see the history of math_support.h as an example).
--
With Best Regards,
Andy Shevchenko