[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <4BD934DC-5657-41E1-A9D6-226886D2AA8B@toblux.com>
Date: Mon, 22 Apr 2024 11:15:18 +0200
From: Thorsten Blum <thorsten.blum@...lux.com>
To: "Wang, Xiao W" <xiao.w.wang@...el.com>
Cc: Arnd Bergmann <arnd@...db.de>,
Palmer Dabbelt <palmer@...osinc.com>,
Charlie Jenkins <charlie@...osinc.com>,
Namhyung Kim <namhyung@...nel.org>,
Huacai Chen <chenhuacai@...nel.org>,
Youling Tang <tangyouling@...ngson.cn>,
Tiezhu Yang <yangtiezhu@...ngson.cn>,
Jinyang He <hejinyang@...ngson.cn>,
"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] bitops: Change function return types from long to int
On 22. Apr 2024, at 07:24, Wang, Xiao W <xiao.w.wang@...el.com> wrote:
>
> Could we change the return types to "int", instead of "unsigned int"?
> https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html says that these __builtin_*
> functions return "int".
We could, but changing the signedness breaks assertions in other modules and
drivers (e.g., where min() and max() are used) and has quite a few side effects.
>> With GCC 13 and defconfig, these changes reduced the size of a test
>> kernel image by 5,432 bytes on arm64 and by 248 bytes on riscv; there
>> were no changes in size on x86_64, powerpc, or m68k.
>
> I guess your test is based on 64bit arch, right?
Yes, except for m68k.
Powered by blists - more mailing lists