Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4348544rwd; Sat, 17 Jun 2023 11:46:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6dIdKl4zQrDavft6T4Gbf/mlIIpX/kAFEuoHUFiFUHcD6c74JVc1/aL9zKzai99HXRhrFX X-Received: by 2002:a17:902:c403:b0:1b3:fafd:11c5 with SMTP id k3-20020a170902c40300b001b3fafd11c5mr4894461plk.44.1687027575771; Sat, 17 Jun 2023 11:46:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687027575; cv=none; d=google.com; s=arc-20160816; b=C60oVIZKOF8W83FdzWo7EcFQrplLIQuvNeMbHRuTX8iC1tXibr5xmp3BDAiCpGnwUa msqRqv2dfXR6UzYnn2a2Ra+KG+Taeco+1r3eRwOeJBGJ5RNbVnky42IRCqZQ1i0xFIXE FWJKHx1RBTFZS30U0Huza+tCM7x7I3ybwk/+dO5oxTfI8mpFaW78wupnbSbrNj7/pQjs smun/f2dcXNxonsaJ1kYBW/lCkIm8pigWY8Yc8WaxAGNBznauQOq34KvQVadq2HeFNzn /5TD4HzT0p+vqj8U10z4N95YIjJNCpWzqs4P3wp4nlHOC0tAAf1z2rWV2V9fWA7E0zla +OfA== 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=XmeOP2wBSJSWGatvNrZMxdXKG7YKmEztBo+8B4BMdhk=; b=FRj4FbiabdHiMqlc9Wg9qnKcdR4QDd6atQpPwbT5/OfEV6bca1sae+psuA4qdnui5b X/QcXSRALcu9PakXj6HxF+eEfp5qTjve31p4owEUtGUblvwceDc+MWzH4/gEuWmQRiGY EKkLbES0eJWciAtddk+i06AMKmwNHun2+mBehVwH80vfoCFdAg1nFTko4FdG3KDXEa2Y JKAIyHOoAVU0QRpYtQ8m7BCDsNT51EddvzIr11qDW9xfbz+Fmi0myhRgQFyc7y2HmoBt yQaDbIr5H0AhdRfS+xE5/37OlAW+xzjbpxkmZc+CzQq6fBGYYX0xlp7153pBc/RtCGwu hg0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HbBW2yCh; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q5-20020a170902eb8500b001ae42afbf93si10825384plg.450.2023.06.17.11.46.01; Sat, 17 Jun 2023 11:46:15 -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=@kernel.org header.s=k20201202 header.b=HbBW2yCh; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346444AbjFQSRJ (ORCPT + 99 others); Sat, 17 Jun 2023 14:17:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346363AbjFQSRH (ORCPT ); Sat, 17 Jun 2023 14:17:07 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52239173D; Sat, 17 Jun 2023 11:17:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B454160F56; Sat, 17 Jun 2023 18:17:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0C443C433C0; Sat, 17 Jun 2023 18:17:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687025824; bh=ueWStTbqbLW6LcZTy4ADQaePn4EDhabTtkcgFvECcjM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=HbBW2yCh7qaZ/dBunxgvmE89K1Av8DhvPUMICVIJymc7b1F2joSbFgJHpRBHVkzrq FEKfLs15EpwuRXptQ10aReKEGNeqpf/THvJxCFlw/agxBdmgdeMF1RPWIUIt5aa3zv ZEOOuMfIDu3NZkRbGCve4dZc2HCG4ZlHPEYDFP2Uw8I0e3ABYbJsU1N0KGj46pjsdx zOp6DIj+rGiH/xz9Fd/eiKrZ4tbgd03Zdn2KS7RIc/4IUYKlMvjldMmPCef1zEH2DH Wxvx+JxSdXhsN3h4fZktCsHDeOxj46iu7yNAx8Y7PuIUbd836Nh3T6yRrqbXAYzffo EI6jx4CuOYztQ== Date: Sat, 17 Jun 2023 19:16:58 +0100 From: Jonathan Cameron To: Markus Burri Cc: linux-kernel@vger.kernel.org, Lars-Peter Clausen , Michael Hennerich , linux-iio@vger.kernel.org Subject: Re: [PATCH v3] iio: ado: ad7192: Add error check and more debug log Message-ID: <20230617191658.2ee5e82b@jic23-huawei> In-Reply-To: <20230614073033.2497318-1-markus.burri@mt.com> References: <20230614073033.2497318-1-markus.burri@mt.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=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Wed, 14 Jun 2023 09:30:33 +0200 Markus Burri wrote: > Print read and expected device ID as debug warning. > Add error check for ad_sd_init() result. > > Signed-off-by: Markus Burri Hi Markus, I've applied this to the togreg branch of iio.git which is initially pushed out as testing for 0-day to see if it can find anything we missed. A few things wrong process wise that I fixed. 1) Nuno had given a tag on v2. You should have added that to your v3 rather than relying on the maintainer happening to remember it (which I only did because of 2. 2) The patch title still has 'ado' not 'adi' So stuff to keep in mind for next time! Jonathan > --- > drivers/iio/adc/ad7192.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/drivers/iio/adc/ad7192.c b/drivers/iio/adc/ad7192.c > index d71977b..220c3b7 100644 > --- a/drivers/iio/adc/ad7192.c > +++ b/drivers/iio/adc/ad7192.c > @@ -403,8 +403,8 @@ static int ad7192_setup(struct ad7192_state *st, struct device_node *np) > id &= AD7192_ID_MASK; > > if (id != st->chip_info->chip_id) > - dev_warn(&st->sd.spi->dev, "device ID query failed (0x%X)\n", > - id); > + dev_warn(&st->sd.spi->dev, "device ID query failed (0x%X != 0x%X)\n", > + id, st->chip_info->chip_id); > > st->mode = AD7192_MODE_SEL(AD7192_MODE_IDLE) | > AD7192_MODE_CLKSRC(st->clock_sel) | > @@ -1049,7 +1049,9 @@ static int ad7192_probe(struct spi_device *spi) > else > indio_dev->info = &ad7192_info; > > - ad_sd_init(&st->sd, indio_dev, spi, &ad7192_sigma_delta_info); > + ret = ad_sd_init(&st->sd, indio_dev, spi, &ad7192_sigma_delta_info); > + if (ret) > + return ret; > > ret = devm_ad_sd_setup_buffer_and_trigger(&spi->dev, indio_dev); > if (ret)