Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp115695iof; Sun, 5 Jun 2022 22:50:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynrgKekbdIDcsnto1WcrR6+WxDNBtekgJNvgPsrMHqwQkffzrOCRTxUgUpvPfsQt4TF/1D X-Received: by 2002:a17:902:f68a:b0:167:52ee:2c00 with SMTP id l10-20020a170902f68a00b0016752ee2c00mr13426240plg.106.1654494638232; Sun, 05 Jun 2022 22:50:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654494638; cv=none; d=google.com; s=arc-20160816; b=xhhlUv7a4PiAnrbneSB5yKDOywAJRitSqO0xj+mVmagemh1bcCTdWbjwPkJy4qfLvP 9a8ohOO5j2lcBZ+belnRwpCT0/cHdUVxAQxWBVw8Qit1l18p8Yzst58UVA5v9z7kDxBh FYDHWXhHiMpAX20kMshPW1ttPWUml4ioN6Z5V7E5Dz9h9Tq0sfpSxJoC5PPC1If5CEza 0wn7wC8PdInfVBiUvJ/WB00Ha3KDMLBguI9VlsvUrVpv6xiiEK0k5B1kCGBxR31a6m23 8lFrCdyBNYqyh2eMdMbIXPtsjPNLxTsQWzNc2EwcvDpDpUQm/nJo79bMCd5w9gaZJSGX KdaQ== 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=0WLs4N8h1ZPARpTwOqG2Uq2/wQgX2sFKhQ9ZI3xKOkM=; b=grjZMYWJVeb67gB3glGzCWt/MXBR8E/3ObASNJmFm+SbOuqrD9UMOwUz/FXAinIAEq //xIPnGYBr2zsq9Jl7bG4CKBXExqQi1OkCy+8CjiWXGbcBZJjiCxwtO/FbHZpFKp3U79 8nfl+tvl65V34u0cQCDO8ElkSpo+Owihz0NEIm6zCvQRWMfQWhFow36xm379BW6zBGc+ fE1560DmoWU7LVuACuei7ZeiWlBHDa6Y0jk0YqoY2l6wEXYZnbM9pJ4jDdQy99CWgFyL xZ4x/3ZEQkzkhWaZ6MHCrtThYPbW+saf8DNMVl+KkukyfBMB2R0P/oT04vBmaG4khkJn SfFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KQVT60gj; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id h1-20020a636c01000000b003fd97d4ed97si5765512pgc.21.2022.06.05.22.50.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 22:50:38 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KQVT60gj; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 29C8A296311; Sun, 5 Jun 2022 21:40:23 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343660AbiFCQMW (ORCPT + 99 others); Fri, 3 Jun 2022 12:12:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343659AbiFCQMU (ORCPT ); Fri, 3 Jun 2022 12:12:20 -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 CF3CC24591; Fri, 3 Jun 2022 09:12:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3765D61988; Fri, 3 Jun 2022 16:12:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E3980C385A9; Fri, 3 Jun 2022 16:12:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654272737; bh=O9M5jqdylfIYfPPpysrTSvpb5Slsp0Ov8SEYrUNJiRs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=KQVT60gjcauzcYjwva9tzOpQ2w+i89jrkPNenFv4Y74edbsCMOv5m50Ec+jofIe6c C+EqPf6Wd3vnsieZ/Pj72WbHbtO8ihiv/EcpJaRbpkB0gwr2vdde1wEzgaSkkO7kWI U1ZXQjPAAzB3ZfvBZp3sdsRAf+PUn9shAuYbCmnvdPzmWIZu8nO/z8+jRdxvnLqHXS 0l9fy9HXF4CPmfmAPCluDMT7BySyzznnWyM3jXzsNjHORYgGJ2P6vjq3ZRY+rU0lqk xfiWFz79f+EI8EyMMyihqFD0APlz6dfM/abhxLHRhYVy4w+6P01L1/3Ew+ftJQjmKe wiOfUL8KR8bLA== Date: Fri, 3 Jun 2022 17:21:17 +0100 From: Jonathan Cameron To: Andy Shevchenko Cc: linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, Lars-Peter Clausen , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Subject: Re: [PATCH v3 2/6] iio: adc: meson_saradc: Align messages to be with physical device prefix Message-ID: <20220603172117.792ce869@jic23-huawei> In-Reply-To: <20220603100004.70336-2-andriy.shevchenko@linux.intel.com> References: <20220603100004.70336-1-andriy.shevchenko@linux.intel.com> <20220603100004.70336-2-andriy.shevchenko@linux.intel.com> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; 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=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 3 Jun 2022 13:00:00 +0300 Andy Shevchenko wrote: > Align messages to be printed with the physical device prefix as it's done > everywhere else in this driver. > > Signed-off-by: Andy Shevchenko Here I'm fine with the use of the parent as can only happen after all the setup is done, so it's obvious the parent will be assigned (some might argue it is obvious in the previous patch, but I had to check as I couldn't remember when we set it :) Anyhow, LGTM. > --- > v3: new patch (inspired by previous change) > drivers/iio/adc/meson_saradc.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c > index 4fe6b997cd03..658047370db0 100644 > --- a/drivers/iio/adc/meson_saradc.c > +++ b/drivers/iio/adc/meson_saradc.c > @@ -345,6 +345,7 @@ static int meson_sar_adc_read_raw_sample(struct iio_dev *indio_dev, > int *val) > { > struct meson_sar_adc_priv *priv = iio_priv(indio_dev); > + struct device *dev = indio_dev->dev.parent; > int regval, fifo_chan, fifo_val, count; > > if (!wait_for_completion_timeout(&priv->done, > @@ -353,16 +354,14 @@ static int meson_sar_adc_read_raw_sample(struct iio_dev *indio_dev, > > count = meson_sar_adc_get_fifo_count(indio_dev); > if (count != 1) { > - dev_err(&indio_dev->dev, > - "ADC FIFO has %d element(s) instead of one\n", count); > + dev_err(dev, "ADC FIFO has %d element(s) instead of one\n", count); > return -EINVAL; > } > > regmap_read(priv->regmap, MESON_SAR_ADC_FIFO_RD, ®val); > fifo_chan = FIELD_GET(MESON_SAR_ADC_FIFO_RD_CHAN_ID_MASK, regval); > if (fifo_chan != chan->address) { > - dev_err(&indio_dev->dev, > - "ADC FIFO entry belongs to channel %d instead of %lu\n", > + dev_err(dev, "ADC FIFO entry belongs to channel %d instead of %lu\n", > fifo_chan, chan->address); > return -EINVAL; > }