[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <ffa107dd-23dd-47e0-b3bb-06c60ca3e2e2@p183>
Date: Wed, 14 Feb 2024 20:20:55 +0300
From: Alexey Dobriyan <adobriyan@...il.com>
To: Michal Wajdeczko <michal.wajdeczko@...el.com>
Cc: linux-kernel@...r.kernel.org,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
Jani Nikula <jani.nikula@...el.com>
Subject: Re: [RFC] include/linux/make_type.h: Helpers for making u16/u32/u64
values
> +#define make_u16(hi__, lo__) ((u16)(u8)(hi__) << 8 | (u8)(lo__))
Public Service Announcement
Identifiers representing macro arguments generally don't need to be
undescored. They are local to the macro, they don't leak outside.
End of Public Service Announcement
Firstly, make_u16() doesn't return u16.
Secondly,
#define make_u64(hi__, lo__) ((u64)(hi__) << 32 | (u32)(lo__))
doesn't truncate hi, why?
Powered by blists - more mailing lists