From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pv50p00im-ztdg10011301.me.com (pv50p00im-ztdg10011301.me.com [17.58.6.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1555F2165E2 for ; Wed, 26 Feb 2025 11:45:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=17.58.6.40 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740570352; cv=none; b=Ec4JVy73scdWIifLT++EwLI6CFMth4lNTynX6bDZdUzElTLandZZaUwrPg8ZKObEHxfE8QyuXG1QlhCHTIbMCVJ5dj7CVs9C8aAwcmBoJhl/H6RHUBukmOcZoj/tOfKST61lskKVU5VYky6f3xVRzkGia5ZpUL/TARiqjo9DzgE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740570352; c=relaxed/simple; bh=C0kSWoh3LIV+HuMudMUFcqmX7KtzIL+dLkLS0LuQI+w=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=QsKUqtVIXtWmp1ohXb4gQJgO+Cy24MPZPYuRtCvg46J6Aht4vKD/ccVRmjg5dr1F0rEwItpZNwRNbTLCdMviGOd4tBu6amQxULSzRBz8bZrFc8dmgw9oxVO47O6Ry5hWjO/V1ut2fLUj/4Lggb5f6fAGFYGKd2q80WYjQpCkImc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=icloud.com; spf=pass smtp.mailfrom=icloud.com; dkim=pass (2048-bit key) header.d=icloud.com header.i=@icloud.com header.b=f8lZWyvS; arc=none smtp.client-ip=17.58.6.40 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=icloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=icloud.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=icloud.com header.i=@icloud.com header.b="f8lZWyvS" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; bh=UlmH7lnQ/SSIrKM5aMl2BHpkT+fwdodZZLv8W8GXIsc=; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type:x-icloud-hme; b=f8lZWyvSDPQwKr7SDXIE6VdW5kZrI22cRU+v86cMZBg8M63ib8K+MKQDsZPYVZ+Mz VIc01nNZYPIWEtaq9AznMiQTF7n48OFpxRM5YhSgpY2okVb9cwuvzP1KIikiB+2fRu d+7AduZcNoirLHLK7K4h8pgvS0d1L0tQbLrFrF/Od88tDX/EZXod457QB5bg4qbmFp DbogBPgs3Q7iQQ0mZfmhQRiw2/P900rSG5OeZM5GDf/tYeCwP0bcGCpZ97ZFFl8n8G biW93Aup+84jC3T2ck5W5lDGV0KXW+sjwetmqndyZG8OIOv24PsphQXGiGBlN7Elxi r4aI2TycTa3Rw== Received: from [192.168.1.26] (pv50p00im-dlb-asmtp-mailmevip.me.com [17.56.9.10]) by pv50p00im-ztdg10011301.me.com (Postfix) with ESMTPSA id 5CEAB180350; Wed, 26 Feb 2025 11:45:37 +0000 (UTC) Message-ID: Date: Wed, 26 Feb 2025 19:45:34 +0800 Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH *-next 01/18] mm/mmu_gather: Remove needless return in void API tlb_remove_page() To: David Howells Cc: Greg Kroah-Hartman , Will Deacon , "Aneesh Kumar K.V" , Andrew Morton , Nick Piggin , Arnd Bergmann , Thomas Gleixner , Herbert Xu , "David S. Miller" , "Rafael J. Wysocki" , Danilo Krummrich , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Johannes Berg , Jamal Hadi Salim , Cong Wang , Jiri Pirko , Jason Gunthorpe , Leon Romanovsky , Linus Walleij , Bartosz Golaszewski , Lee Jones , Thomas Graf , Christoph Hellwig , Marek Szyprowski , Robin Murphy , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-rdma@vger.kernel.org, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, iommu@lists.linux.dev, linux-mtd@lists.infradead.org References: <8f36be7c-6052-4c5d-85ff-0eed27cf1456@icloud.com> <20250221-rmv_return-v1-0-cc8dff275827@quicinc.com> <20250221-rmv_return-v1-1-cc8dff275827@quicinc.com> <20250221200137.GH7373@noisy.programming.kicks-ass.net> <2298251.1740496596@warthog.procyon.org.uk> Content-Language: en-US From: Zijun Hu In-Reply-To: <2298251.1740496596@warthog.procyon.org.uk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: iqw5w_RmeMXu0iJloMXtrzoP0X8vVIzf X-Proofpoint-ORIG-GUID: iqw5w_RmeMXu0iJloMXtrzoP0X8vVIzf X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-02-26_02,2025-02-26_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 mlxlogscore=985 malwarescore=0 clxscore=1011 phishscore=0 bulkscore=0 adultscore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2502260094 On 2025/2/25 23:16, David Howells wrote: > Zijun Hu 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. (^^) > > That may be true... for now. But if that is changed in the future, then you > will get an error indicating something you need to go and look at... so in > that regard, it's *better* to do this ;-) > i understand your point. if the callee tlb_remove_page_size() is in the same module with the caller tlb_remove_page. it is meaningless to watch the callee's return type. otherwise, provided the callee is a API which is provided by other module author. once the author changes the API's return type, he/she must take effort to cleanup this weird and lots of usages, that is not nice for API provider. this is a common issue. i will list my reasons why this usage is not good in cover letter of this series > David >