Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1333319rdb; Wed, 20 Sep 2023 06:30:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEOmgecx2AfBNhZYu+WuFhURYEBiWAc0BuWBlt8HnBJki1uaGD380kvNI2otF2FFNgGTiaW X-Received: by 2002:a05:6e02:1be1:b0:349:48eb:4e2f with SMTP id y1-20020a056e021be100b0034948eb4e2fmr3507425ilv.22.1695216650188; Wed, 20 Sep 2023 06:30:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695216650; cv=none; d=google.com; s=arc-20160816; b=q9HOBMKIJaz/MyqZoFseX0q5dqIsEJr9SzXg/FbOxtaq/upGQBTg3w8b9PB1rAEUs1 wvdUGl2rl/gpon/ohXvlNLyn8UCIcgx2Cbqj+OMJypnDVh5JcC1i4Zkn66PYictUJg8W NEY0PNKMt6HwcBby5nK1p7O8YmLfGCj+wRVPUAxem56adYi8zC+BURZX8wKIkTCQcnWo Y52ZVmz5qwmUg+Hi4tfzKhC9/LbvYGEWOis4CCffpYh+KWLTwzJ+ZOoth4WG34oxLaCh 6sQWEx2R6pXHuQ9bgTt36q+OVNNmMlOOyMETM+eYMGEzhOh6qG/D0k9+XZx9eYQoT+CB gG9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=TATR48KknxYCVQmXB/ArrjHjjrRvMfOg3mMbI777JrI=; fh=EXSy16HkiosLCNOArVPENZNMlk6wzeM9RSy7MyN3otQ=; b=W6SgXZwPKk0d1vXQfck1TNWldx1TTuaU0Uj7EKsjjTuFPgnZ+lJVEk2y1zNkknwst2 HGgaT2Rwcj443b2t18KNLbkhQV1ziwX9OhiPKq+WlAMdx0cV59ll4dlp6Jdq6wnUjexl z0NiNyTEPki0bkF3Bxc7+kiGR80yrIZ0kh4n/kqwH22I0NyZ9o/g5U0Jk3VDJVvKrAgI kbyQ1B8RmgLWwNBeKHe+FSP1pRTToqyLKTLUyzGHYz4/Pv9le9g9/igyLSiCh5JAkYK9 uhKj9HHTl9Ug119AEygTwCxBgjOqkSRVTSJ3JLeJBRwEeTEnmR3wS50nszjXtJHeFs2w NbVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ss+Tkz3b; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id o15-20020a656a4f000000b00578f4c71cf6si344648pgu.85.2023.09.20.06.30.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 06:30:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ss+Tkz3b; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 9BA0F8220D79; Wed, 20 Sep 2023 06:23:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234696AbjITNX0 (ORCPT + 56 others); Wed, 20 Sep 2023 09:23:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233952AbjITNXZ (ORCPT ); Wed, 20 Sep 2023 09:23:25 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FC4AA9 for ; Wed, 20 Sep 2023 06:23:20 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 186B1C433C8; Wed, 20 Sep 2023 13:23:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695216199; bh=2Et11YtI8kBzyLko0A2MfjzkF+6hxxDNxXxX0g0Jl8U=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Ss+Tkz3brJULw9FCZUQKqAVU1bZUmIQwcTwz4OWfH34VkeBVKeLhkD4oWKx/Wi5Ls fV3pQTEPTWElBbIpv2Qdzb46X4t+0/UYjbX9AIx9F0RYLQ2aK9juSSLVJBdPzB4OYE +nnsazloGFtngv/0VazOi9uALgY5xrlwKviBQB5Wvqnxk8bnD9iPxQMDlWLNSLLUjA pqJcRz4LDSexgY/it52oJm7B+oHSfcYsG9hOZ6zKbCTrortk2+DgvpiO20uzzibuZo NKawn6d6io7WKg2Pgnb2pbWOU69tgCuPfKofqIyamSpe9HbyyOmvdJdSzNmuQIBp3D BmOpBkZwqJpgQ== From: Kalle Valo To: Dmitry Antipov Cc: Jeff Johnson , linux-wireless@vger.kernel.org, lvc-project@linuxtesting.org, ath10k@lists.infradead.org Subject: Re: [PATCH 1/6] [v3] wifi: ath10k: cleanup CE ring initialization References: <997f4b09-7087-4788-aa2a-ef835ce6ebb3@quicinc.com> <20230824055117.42309-1-dmantipov@yandex.ru> Date: Wed, 20 Sep 2023 16:23:16 +0300 In-Reply-To: <20230824055117.42309-1-dmantipov@yandex.ru> (Dmitry Antipov's message of "Thu, 24 Aug 2023 08:51:06 +0300") Message-ID: <874jjpashn.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 20 Sep 2023 06:23:22 -0700 (PDT) Dmitry Antipov writes: > Commit 25d0dbcbd5c7 ("ath10k: split ce initialization and allocation") > changes 'ath10k_ce_init_src_ring()' and 'ath10k_ce_init_dest_ring()' > so these functions can't return -ENOMEM but always returns 0. This way > both of them may be converted to 'void', and 'ath10k_ce_init_pipe()' > may be simplified accordingly. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Signed-off-by: Dmitry Antipov > --- > v3: split to smaller units per Jeff's suggestion > v2: change 'ath10k_ce_alloc_rri()' to return -ENOMEM in case > of 'dma_alloc_coherent()' failure and fix error handling in > 'ath10k_snoc_hif_power_up()' [...] > -static int ath10k_ce_init_src_ring(struct ath10k *ar, > - unsigned int ce_id, > - const struct ce_attr *attr) > +static void ath10k_ce_init_src_ring(struct ath10k *ar, > + unsigned int ce_id, > + const struct ce_attr *attr) I have on purpose avoided to use void functions in ath10k/ath11k/ath12k. The problem is that if some of the functions return void and some of the functions return int it's much harder to review the code. If most/all of the functions return the same error value type as int it makes a lot easier to read the code. Is there a benefit from function returning void? Why do this in the first place? -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches