Re: [PATCH v1 4/5] loongarch/bug: Add ARCH_WARN_ASM macro for BUG/WARN asm code sharing with Rust

From: FUJITA Tomonori
Date: Wed Dec 11 2024 - 18:17:04 EST


On Wed, 11 Dec 2024 16:41:42 +0800
Huacai Chen <chenhuacai@xxxxxxxxxx> wrote:

>> +#ifdef CONFIG_DEBUG_BUGVERBOSE
>> +#define __BUG_LOCATION_STRING(file, line) \
>> + ".long " file "- .;" \
>> + ".short " line ";"
>> +#else
>> +#define __BUG_LOCATION_STRING(_file, _line)
>> +#endif
> Can we use file and line instead of _file and _line, which is the same
> as the CONFIG_DEBUG_BUGVERBOSE case?

Of course, I'll fix in v2. I should have done that.

>> +
>> +#define __BUG_ENTRY_STRING(file, line, flags) \
>> + __stringify(__BUG_ENTRY_START) \
>> + __BUG_LOCATION_STRING(file, line) \
>> + ".short " flags ";" \
>> + __stringify(__BUG_ENTRY_END)
>> +
>> +#define ARCH_WARN_ASM(file, line, flags, size) \
>> + __BUG_ENTRY_STRING(file, line, flags) \
>> + __stringify(break BRK_BUG) ";"
>> +
> Can we use the same indentation in this file?

Oops, I'll fix in v2.

Thanks!