Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp36323476rwd; Mon, 10 Jul 2023 22:33:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlGkmTJNPBmrie9VpptYm9V9gCP8fjy6c26+o3K3trd7MpujihWpmDmN4sidCzRDmLbLtFNw X-Received: by 2002:a17:903:41c8:b0:1b8:a73e:aaac with SMTP id u8-20020a17090341c800b001b8a73eaaacmr20584119ple.62.1689053635367; Mon, 10 Jul 2023 22:33:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689053635; cv=none; d=google.com; s=arc-20160816; b=H5CVmEl4srMWDo539fJsxf5Gry05x9Ek352TYws/4tTfdqs41ie3rnN/kFK5Di9pjr PHeiDo2RVkqsodGswpu7d/qCiwaIdtzI6shKz8px7YMBxkMgFnyoaqjl5yZDlZTLUqQe GWG1b+tbPhgBWfeexbyN2s/aEtAICASCNMVy+6yIccaw3w+/MoSUf7su/OvC2M/kfOzV gv100DW3zZ7gxn4kwzS0jLmA1z9lKcG9IjAtjZTKwtI9lzWpjJ01ZcpLwKo3cy2OOVBM xqMAnDXYJ1MdSSuDzZST+7bfGGE9mK5L3claRGqrOPZpvpW7WUj6XDEsJwfaXqTyTpKD 344w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=J9GM/ilzKp71HIAckRdNrtLwkcej9mux7tDYpRNE8jA=; fh=yUWKEvVAA0HiFIh+aAjIaAZ4wJYMkjOG1HRVkjeqQkU=; b=way/ef85qqEgzi6wLldTm+7Po0KiQNplCS7dCWuznADQhtPCxWwALkba9AG7cGA/UQ NHdj8LzsYKxsbzbl/iOh1VgXYyYW/ErBLX2I7SA0m7zUE5vIe3qivbP1hRU91bKRzHdD kLwXUiiSPL9StzmgprCK5T0i75i9EJq/FjXdbXJSvVZRUSclNZwtZ4Mld6grMGxVQga2 5/uMP2zBQrP5nhGEncvwn7miZmgEuZ7jEu/jWbmuGiOXOYeshxG0Gwd1u5ARm9stQPKm jtry3fqT/YZJdf5MXLKp7kNNGvZZfMu9eEbjPgfscMCaOkfRH4jQCSJekD1Gr6/W67lX Tc8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=OLuLrIvo; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p22-20020a170902a41600b001b3d822f131si962000plq.239.2023.07.10.22.33.38; Mon, 10 Jul 2023 22:33:55 -0700 (PDT) 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=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=OLuLrIvo; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230296AbjGKFG3 (ORCPT + 99 others); Tue, 11 Jul 2023 01:06:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229583AbjGKFG2 (ORCPT ); Tue, 11 Jul 2023 01:06:28 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09F1CFB; Mon, 10 Jul 2023 22:06:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=J9GM/ilzKp71HIAckRdNrtLwkcej9mux7tDYpRNE8jA=; b=OLuLrIvoJpoh+zQtPow9i0DJFd FiuDwRevDBZdslkiTu5Mif0ylqDaxIu/g30Uk3RK5u3mBkNuvPCvszgbjt+CCtivUzZyMN5Ek7JpD j6yAk9FJIEL7eqRj2SJ3xlZNvzPd2Blkh0PnQaj0D3Mn+e+EHaQuqwPjy/htojd4OBlp4rLj6QQzD Aozk1XNqmFM0BNGExCIBTDacCFN1JYB4NFKkVfiBjYcvM2JlXy5FoMd9vbwosBlUU6S1JHr1rYELd kML68F29Kx3SlTgBTfWkSbiqHZW7TiXwTgf/b77EkEoJT80OPAF9iJs6Z/dBzDpe//uey4/uKvtYm caB/Fy2g==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1qJ5Zv-00DiFr-00; Tue, 11 Jul 2023 05:06:23 +0000 Date: Mon, 10 Jul 2023 22:06:22 -0700 From: Christoph Hellwig To: Gabriel Krisman Bertazi Cc: Lu Hongfei , Jens Axboe , Pavel Begunkov , io-uring@vger.kernel.org, linux-kernel@vger.kernel.org, opensource.kernel@vivo.com Subject: Re: [PATCH] io_uring: Redefined the meaning of io_alloc_async_data's return value Message-ID: References: <20230710090957.10463-1-luhongfei@vivo.com> <87o7kjr9d9.fsf@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87o7kjr9d9.fsf@suse.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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, Jul 10, 2023 at 12:58:58PM -0400, Gabriel Krisman Bertazi wrote: > practice to change the symbol, making the change hard to miss. Or > make the function return int instead of bool, which preserves the > interface and is a common C idiom. Or leave it as it is, which is quite > readable already.. Yeah, returning -ENOMEM and 0 would make a lot more sense here. But I'd only change it if we have any good reason to touch the interface anyway.