Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2587364rdb; Mon, 4 Dec 2023 01:33:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IGnO3d23pcLTToQwaExyLbj7dYN1jhZ+KIRoumB9ZQe45nbKk5fH4knQ0k9Jjo0FtvernWy X-Received: by 2002:a05:6a00:1d29:b0:6be:25c5:4f74 with SMTP id a41-20020a056a001d2900b006be25c54f74mr5052575pfx.13.1701682404547; Mon, 04 Dec 2023 01:33:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701682404; cv=none; d=google.com; s=arc-20160816; b=rqDYM2GmjSAZ7R+MZ9GhP4XU+YD9l+sTkdgFGpCawD2DTKBdaSVYcJKNzftM1L0bs2 VBCXHlAlqiyf6WTpYuUSh8zZH0SCJsbC5E5iZ3oVFGTUrOO30rEJns2MkVKC67Ehq8Kt E+Giq+7Qvu64NW4vAN7qZaxfwveB1o4pfqCy6DVqGufl1XoY2BvdgVR7mjxh6LlYE/pY CSKajE9AUwyl/1xFnzfMl0n9rMYaNzJBK4c97VbACTOkXNADgsaA6f0LFAmrMKpGE9u4 A5vL9LmiHfIs+CzICEq4L+nxKUXeVrSnImv2aX+7DnoCUoBxhuDffyFVNO+J2yO/XugL aEBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=vB8lCoBUTdZMjJNGpuqpA44Y595SsonNAART47Zyvi4=; fh=ttJ8F1HQWqaNsgd4IGWyA37Awldb2BGV1HyYEfHiC5c=; b=HRUTgRAzz2ZBeJ+rNLVgyy1ul8mCLPWqNT5TNMGj/o7fP/15j9VXowzs+vC7/tshI5 gHIlqtaLYITpJNiPfYbumQEVjJ5fJkd0DiYxql28i1qfv+ZiJR7DuHO4Udm1mYLB5vT+ zHI4XrWZbxppOwnJQoSf8L7TF6pY32hUzjuzAWz78KutRerLkf95Si4pzq8ZyrpoHRg4 XZ7c+NbBqnlFwLSrwJ+KSWw/l2atfsB4glvPTzsaVSs6g1ihFm28RxLUIOrDRLWYLIcj EWeu5gP+/4DbZmOj/Z5M04XqrJBMQBqnx+sjXbc+Uavjcw3iyepf0odqbQpQsax0OtsP yR1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="tt/KrIt8"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id q23-20020a62e117000000b006cda3292e38si7382918pfh.358.2023.12.04.01.33.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 01:33:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="tt/KrIt8"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-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 fry.vger.email (Postfix) with ESMTP id 13195808F01E; Mon, 4 Dec 2023 01:33:22 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229517AbjLDJdH (ORCPT + 99 others); Mon, 4 Dec 2023 04:33:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234788AbjLDJdE (ORCPT ); Mon, 4 Dec 2023 04:33:04 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D824FD for ; Mon, 4 Dec 2023 01:33:11 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F31ABC433C7; Mon, 4 Dec 2023 09:33:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701682390; bh=vB8lCoBUTdZMjJNGpuqpA44Y595SsonNAART47Zyvi4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=tt/KrIt8+kPOXxH+cpLndZy/lmbUVptSb6qGW7voPOcd28sxyY/dgZXdpMgeOki/0 ToNRUr3HOpB9m6hrfG72U8xhngOX3W0Gl7UlGwvGytegiO5d2uL4srb/DHXV3WuU3D yljUBN9UlLAl05Xj7TpcB9/9jNkFazbOv/RMEkM4ZK6A06Oy8BRqvOyfDb58YH77rM 6OLp3IMu3oezGZw25OsYegeF8mIeg1T7Zyca8tZjO7R66oqpLrj+6d0M7ZkuUTNvbL SLZL4V+8bFzmy4KKPnFldQAMNPWIDpj7+xtADNqwFGWrBKQCSiDOJOluaKmLghrU6Q GrmqK+ksKYgCQ== Date: Mon, 4 Dec 2023 09:33:01 +0000 From: Jonathan Cameron To: Bhavya Kapoor Cc: Wadim Egorov , , , , , , , , , Subject: Re: [PATCH v2] iio: adc: ti_am335x_adc: Fix return value check of tiadc_request_dma() Message-ID: <20231204093301.05c19b96@jic23-huawei> In-Reply-To: <0c26613b-4aba-4e1e-bf0e-57feff23e303@ti.com> References: <20230925134427.214556-1-w.egorov@phytec.de> <20231005150917.2d0c833e@jic23-huawei> <0c26613b-4aba-4e1e-bf0e-57feff23e303@ti.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 04 Dec 2023 01:33:22 -0800 (PST) On Mon, 27 Nov 2023 15:14:29 +0530 Bhavya Kapoor wrote: > LGTM !!=F0=9F=99=82 >=20 > On 24/11/23 5:41 pm, Wadim Egorov wrote: > > > > Am 05.10.23 um 16:09 schrieb Jonathan Cameron: =20 > >> On Mon, 25 Sep 2023 15:44:27 +0200 > >> Wadim Egorov wrote: > >> =20 > >>> Fix wrong handling of a DMA request where the probing only failed > >>> if -EPROPE_DEFER was returned. Instead, let us fail if a non -ENODEV > >>> value is returned. This makes DMAs explicitly optional. Even if the > >>> DMA request is unsuccessfully, the ADC can still work properly. > >>> We do also handle the defer probe case by making use of=20 > >>> dev_err_probe(). > >>> > >>> Fixes: f438b9da75eb ("drivers: iio: ti_am335x_adc: add dma support") > >>> Signed-off-by: Wadim Egorov =20 > Reviewed-by: Bhavya Kapoor Applied to the fixes-togreg branch of iio.git and marked for stable. > >> +CC Bhavya, > >> > >> Could you take a look at this given you had comments on v1. =20 > > > > Bhavya, any comments on this? > > If not, is there anything else that is blocking this patch? > > > > Regards, > > Wadim > > =20 > >> > >> Thanks, > >> > >> Jonathan > >> =20 > >>> --- > >>> v2: > >>> =C2=A0=C2=A0 - Update description > >>> =C2=A0=C2=A0 - Drop line break after Fixes tag > >>> =C2=A0=C2=A0 - Move decision about optional DMA into probe/caller > >>> --- > >>> =C2=A0 drivers/iio/adc/ti_am335x_adc.c | 4 +++- > >>> =C2=A0 1 file changed, 3 insertions(+), 1 deletion(-) > >>> > >>> diff --git a/drivers/iio/adc/ti_am335x_adc.c=20 > >>> b/drivers/iio/adc/ti_am335x_adc.c > >>> index 8db7a01cb5fb..5f8795986995 100644 > >>> --- a/drivers/iio/adc/ti_am335x_adc.c > >>> +++ b/drivers/iio/adc/ti_am335x_adc.c > >>> @@ -670,8 +670,10 @@ static int tiadc_probe(struct platform_device=20 > >>> *pdev) > >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 platform_set_drvdata(pdev, indio_dev); > >>> =C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 err =3D tiadc_request_dma(pdev,= adc_dev); > >>> -=C2=A0=C2=A0=C2=A0 if (err && err =3D=3D -EPROBE_DEFER) > >>> +=C2=A0=C2=A0=C2=A0 if (err && err !=3D -ENODEV) { > >>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 dev_err_probe(&pdev->dev,= err, "DMA request failed\n"); > >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 goto err_dma; > >>> +=C2=A0=C2=A0=C2=A0 } > >>> =C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return 0; =20