On Wed, Feb 04, 2026 at 10:32:23PM +0200, Cristian Ciocaltea wrote:
> On 1/29/26 11:37 AM, Andy Shevchenko wrote:
> > On Thu, Jan 29, 2026 at 02:58:52AM +0200, Cristian Ciocaltea wrote:

...

> >> +#define __DRM_ARGB64_PREP_BPC(c, shift, bpc)({                            
> >> \
> > 
> > Not sure if this is an accepted style in DRM, by I find it difficult
> > to follow. I would expect the "({" be on a separate line.
> 
> I initially got confused by the plethora of different styles, e.g. in
> "include/linux/math.h" we can find:
> 
>   #define rounddown(x, y) (                           \
>   [...]
> 
>   #define DIV_ROUND_CLOSEST_ULL(x, divisor)(          \
>   [...]
> 
>   #define mult_frac(x, n, d)  \
>   ({                          \
>   [...]
> 
>   #define abs_diff(a, b) ({                   \
>   [...]


math.h is a collection of APIs from the past from different years and code,
that's why the style is inconsistent (a lot!). So better not to take that
as an example.

> I agree your option is the most readable one, hence I used it consistently in
> v7.

Thanks!

-- 
With Best Regards,
Andy Shevchenko


Reply via email to