Search Linux Wireless

Re: [PATCH *-next 01/18] mm/mmu_gather: Remove needless return in void API tlb_remove_page()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2025/2/22 04:01, Peter Zijlstra wrote:
>>   */
>>  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);
>>  }
> So I don't mind removing it, but note that that return enforces
> tlb_remove_page_size() has void return type.
>

tlb_remove_page_size() is void function already. (^^)

> 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";

C spec such as C17 have this description about return
statement:
6.8.6.4:
A return statement with an expression shall not appear in a function
whose return type is void. A return statement without an expression
shall only appear in a function whose return type is void.




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux