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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D008CCCA47F for ; Mon, 18 Jul 2022 22:28:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234972AbiGRW2s (ORCPT ); Mon, 18 Jul 2022 18:28:48 -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-Google-Smtp-Source: AGRyM1vPyGVktBCtcTaxH8G86pSgyCdxCEPnpid+y/LK/LtOaq0k5UVTTe7VlXBijDZQo/uwJ6aRSQ== 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: 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