From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 273D3C282C5 for ; Mon, 3 Mar 2025 11:30:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8550F280003; Mon, 3 Mar 2025 06:30:36 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 80388280001; Mon, 3 Mar 2025 06:30:36 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6F40A280003; Mon, 3 Mar 2025 06:30:36 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 4FDC5280001 for ; Mon, 3 Mar 2025 06:30:36 -0500 (EST) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 06ECF12064D for ; Mon, 3 Mar 2025 11:30:36 +0000 (UTC) X-FDA: 83180022072.24.3AA563B Received: from mr85p00im-hyfv06021401.me.com (mr85p00im-hyfv06021401.me.com [17.58.23.190]) by imf19.hostedemail.com (Postfix) with ESMTP id 12D821A0002 for ; Mon, 3 Mar 2025 11:30:33 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=icloud.com header.s=1a1hai header.b=M9LNaQQM; dmarc=pass (policy=quarantine) header.from=icloud.com; spf=pass (imf19.hostedemail.com: domain of zijun_hu@icloud.com designates 17.58.23.190 as permitted sender) smtp.mailfrom=zijun_hu@icloud.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1741001434; a=rsa-sha256; cv=none; b=nHwjbuTpNQTfY7vyIHtu+jFhjcVcpgG5moegZuAGiOqPJ1rLjfrvxa7gvY15J+498/wkQb iJfFb2R0pLAdRrstXyzqSE23DLC33tm3OcvPIdLXzEnfqr2GDjG/sI4mu6wQP4NjAoLSFh X63RTQm/4mOOxURMP1R5FsiC6xnV2ec= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=icloud.com header.s=1a1hai header.b=M9LNaQQM; dmarc=pass (policy=quarantine) header.from=icloud.com; spf=pass (imf19.hostedemail.com: domain of zijun_hu@icloud.com designates 17.58.23.190 as permitted sender) smtp.mailfrom=zijun_hu@icloud.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1741001434; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=OZOLugLSboUaxk503olOimdjHThkYZSt/rnUocHx7qo=; b=p8P6a4LPwuekJx6yEwmuQ1UG9v/Urt0BDqWNry16tKOuX8mt93Mho0aw20i4+8nKIyX0+R goWFdYY8sOyDlfQjBn2UnvSwQDGc8lahbqILzK/XGfYIg/I3ILIcRrF+vZ3jaVNawuaDyw f7iIP7Ovn7t53M28/YQpljki8pffVX0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; bh=OZOLugLSboUaxk503olOimdjHThkYZSt/rnUocHx7qo=; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type:x-icloud-hme; b=M9LNaQQMBVnDvn7O9dkyxfqENe+n3CTiJTPQ2UQFIHq6HOYn5yqN3iDQ3RVhMcn23 RYbgEyO7lbqW+H+rJi6eLqXyW0ofbGlb2TozfcwQt+N3LDxfRINewpBQO64R70O6JP Fj4pbqb3B74JtNoj/kfZRb0TgXmhRDVBpuDr2nHUHUnQnsoslms9i4lxHUEqE597f0 dsKBFbP0qhEmAOCAG72w3Jw4tGGCdcmaS+BdhFHar4cmpTgkAp9kjNy3bhZerCy1fm yb4VLYz3eRYNRP0qJgIXtuCQgNCwAPfOp2U/Lehb0PDMMPAW6dfU3J1HAJf8t1L7ga V8U2HDDNFoYsA== Received: from [192.168.1.26] (mr38p00im-dlb-asmtp-mailmevip.me.com [17.57.152.18]) by mr85p00im-hyfv06021401.me.com (Postfix) with ESMTPSA id D31F830384C0; Mon, 3 Mar 2025 11:30:17 +0000 (UTC) Message-ID: Date: Mon, 3 Mar 2025 19:30:13 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH *-next 00/18] Remove weird and needless 'return' for void APIs To: Peter Zijlstra Cc: Zijun Hu , 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: <20250221-rmv_return-v1-0-cc8dff275827@quicinc.com> <46d17d84-5298-4460-96b0-9c62672167a0@icloud.com> <20250227130347.GA5880@noisy.programming.kicks-ass.net> Content-Language: en-US From: Zijun Hu In-Reply-To: <20250227130347.GA5880@noisy.programming.kicks-ass.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-ORIG-GUID: VRiK2BwrsvBlqf3istvRC36nkjOjRITT X-Proofpoint-GUID: VRiK2BwrsvBlqf3istvRC36nkjOjRITT X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1093,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-03-03_07,2025-03-03_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 bulkscore=0 suspectscore=0 mlxscore=0 adultscore=0 clxscore=1015 mlxlogscore=855 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2503030088 X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 12D821A0002 X-Stat-Signature: d6nb6qiydj86bfcyxntuowxw8nxdme5t X-HE-Tag: 1741001433-312839 X-HE-Meta: U2FsdGVkX18laGij6p7JFxxnXLcTu0yWfV7n2bgW4WOq2utB7YK++7DjRn3I/GqPDBNed4qVCDYw+8p1T09irC7aQJn+VKKdwFbk88K1DH6hmAwPIWu5SMXJf7KzU+b/Z6DtMtCIe8vRhE6DnF+Yc2J4fwqgQ6CoOoqAXE1K5efiI3BOSnsDtckUvtmBPAJe+CRTfqGIkBW1BmeSiMR3+jiNyjQFY1dL6zoeFy2XUSqCFDHYWtfe7yYhoymY2Z+o/vgJ7tHuaQJqbrsagTVas5SorNX335NNOD/q6yPV45ryJXocoogd6BvojTDXAoUUjj1Az2g8kkWGQhyasnepNYTdne4zIwVgcjCr6DOajL74zfYBaAtgFsGaRD5/kU2oA+pL2QOIBT/Su9TSy2UoigYgMe0ByFuMR5SRBaf1Vl+WMh+Yigvy4LtmOZ95N2u3u/ip/p7evPg0dKYrQ6ERIeiQQqUBYoRqi6Kqsno1V8ZdFE59uE3Zn61IWqp5k5mPdWHES8R6TMzBf8OOO1oPyiwZeMqvgamRJCUvN+rtxIzvnUc2W8q8rxnt0q2s0NaRT2a4LrBePo+oMqUX7ud0hTfEM2eBK+RqKZEfXT+Emc3BaDJwM2AZNxNFLGjq8h6/uOWr+rie9KBJp+HCiV933+VCODG1HjWGAl94DPEUNqOxHiAuGgHki4bMQZFIstyeLRuL77kkcFPi3exrnwj7yCn6+cLU5GhMB99o0sW4aazY55EuTdZQey8pBa01gMaLQDoZC7henlYAaainLktn3O1AfqjI0Imynt8pWxVZr5x4L4JbKCdKyyCMRnUFZkMzLhNJF5nU5PPSoWgRISeMvTJT5ePLMns3o/217xCCFdAMnXYwUeyxDEvqUWJz/15bAClHciFdHHz5rDVlMq/GNbEmwlOCanl2aKhdEtfS/eWfi3+UOP4ieJ0UnlkDwZq0aZTtse9BgvD/uF5lr3I 5BG3IAXB XIYg949DjVzkiQRxj+YsBGRJugSKP24p0LPoCMlX0qBzl4DEUvPXEo6hrjsQDyn1cfvOZBD0YSyXygrbQPPlll0ohj95v6wyY996xBJGe4q3fa36s6iiBOI6m1VES7TM8Dkt7tBEnEUp81LQDSAEEygEhBT1ixa4q90V66UBKnRKfokR8uaut3oRtMoPrRDcG5UctGM5bThli6B4XHvpDLJo0Chnm8pLJ0uiuuCQvwF3vyyxrD0jJYAI06UA83r/8cfAYsFZhaRGuFJkVRmA/wDsyx1cb5hs1jFSZ8SkyFwzYJpO2wKtvdLWbLiJaRtbCLtHrjqmI4EDhH1QkpRWf7cfl9zV1LSNZ/ywYG5aiwyfGLNwwGB6H/DVfVBumvBeOU89hPrPC/UqV3gR193yyQZ1TDA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On 2025/2/27 21:03, Peter Zijlstra wrote: >> C) perhaps, most ordinary developers don't known the function mentioned >> by B), and also feel strange for the usage > It is quite common to do kernel wide updates using scripts / cocinelle. > > If you have a specialization that wraps a function to fill out a default > value, then you want the return types to keep matching. > > Ex. > > return_type foo(type1 a1, type2 a2); > > return_type my_foo(type1 a1) > { > return foo(a1, value); > } > > is a normal thing to do. The whole STD C cannot return void bollocks > breaks that when return_type := void, so in that regards I would call > this a STD C defect. The usage is a GCC extension. but the usage is prone to be used within *inappropriate* context, take this patch series for an example: 1) both foo() and my_foo() are in the same module 2) or it seems return type void is the best type for foo(). so no good reason to track its type.