Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp4997847rwb; Wed, 21 Sep 2022 01:28:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7beSOuBgaPhB0ByV2mGZs0U/IkN7tqWLtMJbCRDckHnyO4gEGreGqdbZPL5yWltyepx8i3 X-Received: by 2002:a17:907:31c3:b0:770:852b:71a2 with SMTP id xf3-20020a17090731c300b00770852b71a2mr20383980ejb.557.1663748910274; Wed, 21 Sep 2022 01:28:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663748910; cv=none; d=google.com; s=arc-20160816; b=cy0VIi2sId63GnahUunzEiPf4Ycq5VqiMHqUAN8uV5Xy8rSvg3IuzrTJ5TrH9fNqRv 9DZS7EhzWIsTdif7ffbQkRpdqpLT9tB20DjrxvOHmw92izFJFoB1VCLStQmW3kJmJ0jM gPjMNMYw/7HIy5GUNIlalM0sNgpFnmRsK1YvuEoFNHy4uNLnfgydUMm3jIfCaKs0dHNt n+Tff+ekIqcRIjXQof0P38DjV5oVfRLFIVxNJ35kZ6x9BM3ue8YHxOqWVsumVvdcgJY7 84AkVIpZkqq6znl/3zdXgVhcfMfopeHDdnRbugffAHes9GT1sH7axzmzlv4U0BDfMVa5 KTYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=OPV61B8fcJib1mvJP+g7glWnejDZkZxpKL+a1xKlpbM=; b=LJ8aa+838w9kG6SyMVk/p5FzxJebobk6QV2S9JlWjk374E3prY/76PIs1Y28zpsyxC MMdtL7vOMoZtBq+vmFAT7m3bDjWYq+NAsJTCxzkAo9oOFRrTKG6sgu5zQcwoSyFgVN77 tY5KJI69pPBomIw39w6L2A4t74T4Dl4Us4KkMi3w423K3jZQpZ8LRGthUjCO/lYgGwuj 4o7YVNp4XlaAVuTfiSqtU+3+wCddhRIEyOdTN4VaFFX2V2KfB0CcTJzN7WqCgTGJJKyS rB8qJ1BlrxJ1mRPYNnvjJOQPxeYuxpzhW1I1rANOEeLBHcTnQI4UU3EdcnKhKb0RCU6p 1OxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=kyrfLl9U; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v18-20020a17090690d200b007307c26f6ddsi1607810ejw.995.2022.09.21.01.28.04; Wed, 21 Sep 2022 01:28:30 -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=@bootlin.com header.s=gm1 header.b=kyrfLl9U; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229823AbiIUHMv (ORCPT + 99 others); Wed, 21 Sep 2022 03:12:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229996AbiIUHMQ (ORCPT ); Wed, 21 Sep 2022 03:12:16 -0400 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBE6D3D581; Wed, 21 Sep 2022 00:12:10 -0700 (PDT) Received: (Authenticated sender: alexandre.belloni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id F1284C000B; Wed, 21 Sep 2022 07:12:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1663744329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OPV61B8fcJib1mvJP+g7glWnejDZkZxpKL+a1xKlpbM=; b=kyrfLl9Uhdn67c6A1JzrK3qRcgAQSCwpJpdFXnHFAcS9FOUVPtsIgLJIpiswpsK2X5Ohck Xm6DuWcCmoLZeSWY6uRxafAIkLT07Xm4VYJ7MTGjYq5cT+L+osQTaEg1toB2oROKZEoaVk iIcOdt0dl21rHNviLBD4B9kf3o7OJC606Qq6C61UFwA9gUxYzMJcSu3QYcfxRrcAnefTBh U8z5aBt3O/k5hPII6ArndGre9Xqtlxm8oG5tpqp9dGCG2wMVx7Q1xo1fD6pv+aDbWz2FgX VgIfx0JOm0aweqvsWJ3cxsC6/7aFEngujAVs1hIIddk0K1ubfC5U67phKfwuHg== Date: Wed, 21 Sep 2022 09:12:08 +0200 From: Alexandre Belloni To: Rasmus Villemoes Cc: Alessandro Zummo , linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/6] rtc: isl12022: simplify some expressions Message-ID: References: <20220830100152.698506-1-linux@rasmusvillemoes.dk> <20220830100152.698506-3-linux@rasmusvillemoes.dk> <4fdd52c9-2de7-b86b-f081-cb59a8f72c5a@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4fdd52c9-2de7-b86b-f081-cb59a8f72c5a@rasmusvillemoes.dk> X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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 21/09/2022 09:08:52+0200, Rasmus Villemoes wrote: > On 14/09/2022 17.08, Alexandre Belloni wrote: > > Hi, > > > > On 30/08/2022 12:01:48+0200, Rasmus Villemoes wrote: > >> These instances of '&client->dev' might as well be spelled 'dev', since > >> 'client' has been computed from 'dev' via 'client = > >> to_i2c_client(dev)'. > >> > >> Later patches will get rid of that local variable 'client', so remove > >> these unnecessary references so those later patches become easier to > >> read. > >> > >> Signed-off-by: Rasmus Villemoes > >> --- > >> drivers/rtc/rtc-isl12022.c | 11 +++++------ > >> 1 file changed, 5 insertions(+), 6 deletions(-) > >> > >> diff --git a/drivers/rtc/rtc-isl12022.c b/drivers/rtc/rtc-isl12022.c > >> index 2dc19061cf5f..5e6bb9153c89 100644 > >> --- a/drivers/rtc/rtc-isl12022.c > >> +++ b/drivers/rtc/rtc-isl12022.c > >> @@ -112,13 +112,13 @@ static int isl12022_rtc_read_time(struct device *dev, struct rtc_time *tm) > >> return ret; > >> > >> if (buf[ISL12022_REG_SR] & (ISL12022_SR_LBAT85 | ISL12022_SR_LBAT75)) { > >> - dev_warn(&client->dev, > >> + dev_warn(dev, > > > > While at it, I would prefer that one to also become a dev_dbg > > Well, I prefer to keep it, because my customer actually wants to use > this information. Grepping it out from dmesg is of course not the best > interface, but if it gets demoted to a dev_dbg() it doesn't even get there. > There is a proper userspace interface, look for RTC_VL_READ. -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com