On 2025/2/24 21:23, Peter Zijlstra wrote:this is new for C17 or was there for long time?
On Sat, Feb 22, 2025 at 07:00:28PM +0800, Zijun Hu wrote:
On 2025/2/22 04:01, Peter Zijlstra wrote:
*/So I don't mind removing it, but note that that return enforces
static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page)
{
- return tlb_remove_page_size(tlb, page, PAGE_SIZE);
+ tlb_remove_page_size(tlb, page, PAGE_SIZE);
}
tlb_remove_page_size() has void return type.
tlb_remove_page_size() is void function already. (^^)
Yes, but if you were to change that, the above return would complain.
It might not be your preferred coding style, but it is not completely
pointless.
based on below C spec such as C17 description. i guess language C does
not like this usage "return void function in void function";
This is GNU extension IIRC. Note kernel uses GNU11, not C11
any link to share about GNU11's description for this aspect ? (^^)