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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BA623C43334 for ; Fri, 3 Jun 2022 16:13:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QKuMdeMtAOmeyFjQImvw9Kfc1mWCH3v96VbYe4TCn3A=; b=zO/kTWDZaeWhOa OPSFb6CA9ilGtXTEZ1CB8sz4iGKOv7Gy9SV8tFzYL6QpKrhzNwcA/HJPlQtwCJAZTzwbKl91q1iD8 VIJWms0ji8u1w1b4b8bsiAy6Wn1UaNEzQpNyQ4T6sQdBMANoWD6yNvICt9qH5OXWDGk+o7wb8Pyz6 7dMK3dhVaAwFA6BrOoZRPRNzbtdJV8ftN8ad/hWQ0iiAWDSq43gnKU98QtUFlxFjoyztyeTqGS2XG /7Za9hQ5DlW2C2ydJI6d+69FBNq2p8hzQhlNnJ8q67/JksTJl/zxnAFo0s69xxc8Dy2fpZqXCB7Ok JIGXuPxF2UCzYaH5c2pQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nx9uS-0087fJ-FM; Fri, 03 Jun 2022 16:12:24 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nx9uO-0087eD-3w; Fri, 03 Jun 2022 16:12:21 +0000 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 ams.source.kernel.org (Postfix) with ESMTPS id D087AB82371; 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220603_091220_346883_11B501F5 X-CRM114-Status: GOOD ( 20.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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; > } _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel