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/24 21:23, Peter Zijlstra wrote:
> On Sat, Feb 22, 2025 at 07:00:28PM +0800, Zijun Hu wrote:
>> 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. (^^)
> 
> 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 ? (^^)







[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