Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1021386pxb; Tue, 8 Feb 2022 07:38:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJwCmTP0+mkMWSvKz5PIoCQ1ijpR921/nW8nlBHfQa6P4G3GG58l4F6UxkbbPLLTtLkBEUKy X-Received: by 2002:a63:565a:: with SMTP id g26mr4043481pgm.48.1644334683106; Tue, 08 Feb 2022 07:38:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644334683; cv=none; d=google.com; s=arc-20160816; b=L5/9+9buwByUt22UpAqqJLBtxhh3DUq/p3pTp3ot9AXEaUtT2P5Smoyg4/IuBlBWx0 MX3GI5arMvl0v80+043o+wQZBbQfMIK7VBIB9PDd+oReoXDoyZ9hakHQUm21eB8EKdYR eJBtgVtYFEKfahuCI4mTmNSxyZZT6V+MnHNZ/Ny28zx+8Trk1Nry+IYpcElPu4Uzu3Jk W5PaZOq4sqDLid5y6s3RjCt67saijMsuaRjGnAOgldfuOUGf3OeJN4FQLUPZhUjt4+Uj XA64F1czJysLQX1mOd5vqdc4gvHePoo6P+C4TuNzJi0G4WhLVIZk5sjPXCJpD92prBBL mlOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=N9DuAothrqG9nC60VlENZY3tmDm8PUH3W5VZewotNvk=; b=g1iuu3WZb2mJeZ12OcdmIg6fTyBjPleOWrNqgLgQt7evLTxOOf6XPuipl1wzOh9oHc iKB6GbAnRO0isIXK7rhuFJn7g01PgZX7Ttr14t+snTgj+7Up5QTvNyOdeapd+9uNEWpp TemCCJBB4++hrcE5VO/fOguqXnUg3tvnBjtlkCvpfNolmOhqDPz4Uz2gyKiCtdjOrFcP oP+FwoXU27GesF0F4ua0OBpuNBC/OShN+4/LqPQ5fiOw5MY9x42NqbRfB+889EwV4med ukOdEHB5CIX4dPIvrcfVNIFfFPsRkEjUqAjXKw/11TM8+Huo69flcNnrxTrt8Q+8ilLv yO7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (no key) header.i=@lespinasse.org header.s=srv-54-ed header.b=HuciXOYU; dkim=pass (test mode) header.i=@lespinasse.org header.s=srv-54-rsa header.b=Ld6HgFYA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lespinasse.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e27si10736543pge.40.2022.02.08.07.37.49; Tue, 08 Feb 2022 07:38:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=neutral (no key) header.i=@lespinasse.org header.s=srv-54-ed header.b=HuciXOYU; dkim=pass (test mode) header.i=@lespinasse.org header.s=srv-54-rsa header.b=Ld6HgFYA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lespinasse.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353266AbiBGRqm (ORCPT + 99 others); Mon, 7 Feb 2022 12:46:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346651AbiBGRjP (ORCPT ); Mon, 7 Feb 2022 12:39:15 -0500 Received: from server.lespinasse.org (server.lespinasse.org [IPv6:2001:470:82ab::100:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B28EC0401DF for ; Mon, 7 Feb 2022 09:39:12 -0800 (PST) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=lespinasse.org; i=@lespinasse.org; q=dns/txt; s=srv-54-ed; t=1644255550; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to : from; bh=N9DuAothrqG9nC60VlENZY3tmDm8PUH3W5VZewotNvk=; b=HuciXOYUEVzuxkHzcPxkWdIaJU+mV9e9A9bKswY6UMA9agbasPfj1deeMZN1cxrjgWVbV ++1806jS1RsPKt5BA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lespinasse.org; i=@lespinasse.org; q=dns/txt; s=srv-54-rsa; t=1644255550; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to : from; bh=N9DuAothrqG9nC60VlENZY3tmDm8PUH3W5VZewotNvk=; b=Ld6HgFYAffThRNAh94Shpci4MPicTr6mHeIQAfUyUbjrkI0zRGACCA72Zf2fN/agDIrDk P5Yxx6pGMvV25JVPFIvQpW18XiYHjE4QNnqXblaRIWKFdKm3Yv2PSZrKdlVgbV8O7GBQ4GF L82GQwFuT/49kxH6BySuJnD9pLncR4nBSM2evayXIVq71rFiYKFlfaBjWH3Ne9yqfWNGM1i Jli87AjSGcRpnGVjiSPNbKgpM7i7rd2OLGsv2ahPBna59MVRGXs40qZbKBW7X3nP4afS7yg 3+rEW0WZ7ij5i01kcz+Czku6wnU76ZyKPldhFqzfDxFSHLp5J5TKkD9T7bZA== Received: by server.lespinasse.org (Postfix, from userid 1000) id E9436160B2E; Mon, 7 Feb 2022 09:39:10 -0800 (PST) Date: Mon, 7 Feb 2022 09:39:10 -0800 From: Michel Lespinasse To: Liam Howlett Cc: Michel Lespinasse , Linux-MM , "linux-kernel@vger.kernel.org" , Andrew Morton , "kernel-team@fb.com" , Laurent Dufour , Jerome Glisse , Peter Zijlstra , Michal Hocko , Vlastimil Babka , Davidlohr Bueso , Matthew Wilcox , Rik van Riel , Paul McKenney , Song Liu , Suren Baghdasaryan , Minchan Kim , Joel Fernandes , David Rientjes , Axel Rasmussen , Andy Lutomirski Subject: Re: [PATCH v2 03/35] mmap locking API: name the return values Message-ID: <20220207173910.GA12302@lespinasse.org> References: <20220128131006.67712-1-michel@lespinasse.org> <20220128131006.67712-4-michel@lespinasse.org> <20220131161737.cclyx2ntil3opted@revolver> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220131161737.cclyx2ntil3opted@revolver> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 31, 2022 at 04:17:43PM +0000, Liam Howlett wrote: > * Michel Lespinasse [220128 08:10]: > > In the mmap locking API, the *_killable() functions return an error > > (or 0 on success), and the *_trylock() functions return a boolean > > (true on success). > > > > Rename the return values "int error" and "bool ok", respectively, > > rather than using "ret" for both cases which I find less readable. > > Would it be better to add function documentation in regards to return > types? I think changing the variables does help, but putting a block > with Return: would work best. That would work, I guess. I'm not sure what it says about our general coding style, that the comment would kinda stick out like a sore thumb compared to the rest of the file, or of similar include files (say, other lock definitions). I don't care very strongly either way. -- Michel "walken" Lespinasse