Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3837042imw; Mon, 18 Jul 2022 15:40:41 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vNLv/6r8C2+t3Nva6qMjOr8v8o85pd7bT6uVtO5bQ56RCj1f38D4kgnF+vlFonp0yoUOhV X-Received: by 2002:a17:902:c755:b0:16c:71c9:eb0c with SMTP id q21-20020a170902c75500b0016c71c9eb0cmr30532130plq.107.1658184040845; Mon, 18 Jul 2022 15:40:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658184040; cv=none; d=google.com; s=arc-20160816; b=d0mXTwlv1BCgbZt0r8rSSKxgXYZHkoRQFPkF8GScPn7cYayVGUVnh0hv2aIUmkBp3C vN6dZuCVhp2KDWCNB1Kjt1jmR7H6LzRoss7uuvNlEW2YfpKphinIwpXWV9MnK5uhJyMq llVhfpS5d5hex0D6BMUQfYzLjiFeUMRM9/PTBnhQRPnAopBJgmNn8mSN598Su7fwneg2 NSvpb4dVgwMdvE+lGQByWCsyskjBnzAh5Ii7+FjGGOAoa7nBIBQmkCfR8WjQ2C3Muczz ltqUnY1v+Hpr2XhmWp16rMcnVYZWu9KHE0oMEjyMx69YVoKQJ/McH0e+QJMv4nAfhTHO idAQ== 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=CM+L+F29IjkyytSgiUJ9L1anz4s5cjBnkaXschPxT+s=; b=UNVMtLxmlpWMlKZcz107SfTeZ1F6bH6cCMzRvc8g7lebmW8D+PxNGwCJAdj/PJlbxR 8tMVzzaxFcQXsIW6UOjN48Val1q9hW5vqKRn//SRz+pY+5xNVryqB/pQd/VlG6957U17 SHLKffSQ0cIZ4OTWMj/qrSiITTEBz10UpKf1+thoWSNsiZMfODpa5n4TUhaP5U+mutaE UKPA0elEGkRut3VHnJhwj2YRqfdPWqj7ldP0iUbRP1giImEA19EgrCGZGPs90IKkGC4n e4/pRYCKNfxIp4sotJK6QmBwMhSvuyrijwq+p1sxbRQmYxvPTfldMIOl8TGkuFK2gyDr TJOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Yq+Uz2Uf; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x6-20020a170902ec8600b001623b7ba910si18611000plg.29.2022.07.18.15.40.24; Mon, 18 Jul 2022 15:40:40 -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=@linaro.org header.s=google header.b=Yq+Uz2Uf; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233338AbiGRW2r (ORCPT + 99 others); Mon, 18 Jul 2022 18:28:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229647AbiGRW2p (ORCPT ); Mon, 18 Jul 2022 18:28:45 -0400 Received: from mail-oa1-x30.google.com (mail-oa1-x30.google.com [IPv6:2001:4860:4864:20::30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C3F5286D3 for ; Mon, 18 Jul 2022 15:28:41 -0700 (PDT) Received: by mail-oa1-x30.google.com with SMTP id 586e51a60fabf-10c8e8d973eso27728301fac.5 for ; Mon, 18 Jul 2022 15:28:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=CM+L+F29IjkyytSgiUJ9L1anz4s5cjBnkaXschPxT+s=; b=Yq+Uz2UfmII9HsrH9h2DcdOQOcBpvQWk4eGZIG76Nm98EAHedcqcyuNAfAsNGU5wnS LBfYbf7o2RvpXaly6M22s2nyQ0ugJJqli+6xTfusfX5eDw/5Biz17R25ooPX8/RGqFe6 OhV5B4sZZFKnCfWKZHTTvnAslOt4t+I6ricgU1JoXJwNm6omRCV9Fq2vQpnJRFf7cBUU 5xgKP/GqmnHWela1juasxpglmhsEAHiS5Jzx4um2HEd+pUW9hAEK2VoeQEAz6GA9zF7c OA9Y0yqapLTCWBLRlmqrWwOGdnTrfeKDVBup2BqP9eIerIjg9AOe0PdhrQnZh498afur ps4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=CM+L+F29IjkyytSgiUJ9L1anz4s5cjBnkaXschPxT+s=; b=ZgrDjxW/DbXDbM4lKAmvP2PMclLUHEx2Lr48Y4kh3wRgF9xnmJSXdEhIAkFSN2869D ekwpyM/kjmO39cCumdQhHbiUo53yZayR0lNh9vhLUQ2nZzDqpxoV11+1trtoy7gvRr8R 0H9JFj1ASQ/Mxkr1bWwLmMfxRPhPg914zdqwAjjmHuumfqnl4jw1lu7W5ZKA2nUpnKAX vtRXBlE5kUGNJ4UdX+vvsxo5O4ziYqQEYN6sVft1L9AS9etK9W8GuhCEcGF35MzIIZJD A57t6qmOPR2yDxw3DfE969790Fe5RSC3zoI2p+Tojq6m7jIW4greMHWmL/d/milmVGeR qvog== X-Gm-Message-State: AJIora+X1LUNPE2qBVifoNxmn/FXQhQpdfNCEZXTz9F2/4aopOGIJzo9 y2Odi+trCAoFI8Wq+I1cJi6a7w== X-Received: by 2002:a05:6870:c5a0:b0:10c:5a7f:1e1c with SMTP id ba32-20020a056870c5a000b0010c5a7f1e1cmr16718133oab.250.1658183320998; Mon, 18 Jul 2022 15:28:40 -0700 (PDT) Received: from baldur ([2600:380:7819:4216:5926:b852:ebc3:8111]) by smtp.gmail.com with ESMTPSA id e11-20020a4ada0b000000b0042568efdaccsm5388483oou.15.2022.07.18.15.28.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 15:28:40 -0700 (PDT) Date: Mon, 18 Jul 2022 17:28:24 -0500 From: Bjorn Andersson To: Vinod Koul Cc: Konrad Dybcio , Wolfram Sang , linux-arm-msm@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] i2c: qcom-geni: Use the correct return value Message-ID: References: <20220717035027.2135106-1-bjorn.andersson@linaro.org> <20220717035027.2135106-2-bjorn.andersson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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_NONE, SPF_HELO_NONE,SPF_PASS 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 18 Jul 00:36 CDT 2022, Vinod Koul wrote: > On 16-07-22, 20:50, Bjorn Andersson wrote: > > The introduction of GPI support moved things around and instead of > > returning the result from geni_i2c_xfer() the number of messages in the > > request was returned, ignoring the actual result. Fix this. > > Thanks for the fix, looking at master_xfer() it does expect error > return, so look good with one nit: > > > > > Fixes: d8703554f4de ("i2c: qcom-geni: Add support for GPI DMA") > > Signed-off-by: Bjorn Andersson > > --- > > drivers/i2c/busses/i2c-qcom-geni.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c > > index 6ac402ea58fb..3bec7c782824 100644 > > --- a/drivers/i2c/busses/i2c-qcom-geni.c > > +++ b/drivers/i2c/busses/i2c-qcom-geni.c > > @@ -688,7 +688,7 @@ static int geni_i2c_xfer(struct i2c_adapter *adap, > > pm_runtime_put_autosuspend(gi2c->se.dev); > > gi2c->cur = NULL; > > gi2c->err = 0; > > Unrelated, should gi2c->err be set to ret here..? > When we reach this point we have concluded the current transfer (successfully or not...), so I believe that the purpose of this line is to clear the "error state" that might have occurred during that transfer. I believe this line could be removed, as the first step in a transfer is to clear the error state again. But as you suggest this is separate to the proposed change. May I have a R-b? Regards, Bjorn > > - return num; > > + return ret; > > } > > > > static u32 geni_i2c_func(struct i2c_adapter *adap) > > -- > > 2.35.1 > > -- > ~Vinod