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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 E9C58EC8722 for ; Thu, 7 Sep 2023 12:37:05 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=aaOEyihv; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4RhJf80CbRz3bx8 for ; Thu, 7 Sep 2023 22:37:04 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=aaOEyihv; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::42f; helo=mail-pf1-x42f.google.com; envelope-from=mimi05633@gmail.com; receiver=lists.ozlabs.org) Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4RhJd05WzKz2xbC for ; Thu, 7 Sep 2023 22:36:03 +1000 (AEST) Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-68bedc0c268so862052b3a.0 for ; Thu, 07 Sep 2023 05:36:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694090158; x=1694694958; darn=lists.ozlabs.org; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:from:to:cc:subject:date:message-id :reply-to; bh=92ZzARlgvwbUgPGukrjbEt7NIUtDZ/sbGDiLDmqSYTc=; b=aaOEyihvuhO4/dmlMT1QqUjzYiGdfKUD003twbsfL1JR6/rGptOI3bZtrYBrMWi+Bz 316VNBAFhoPCV7QAZP1jViiWDhsCCVO3EtWNGsQtpORLRYJzgwFeicnhRsrdrNRJxZbc AJ9xt5ilCFNAUcDVcsIzR/Q6MwBwi8DaYiY9G0pwamlQY/8RbF+ivFjCUwOsv7wqmI7H rIhwXNhT3zI2SiMsOSXpRh2J9az5pLaLV5IhCYEmxnoRq51JdntTQgDsMW8sCfwnFA6L Ns1IrOETQ+rgJCztia6YPTKN32ELF0wRKOtDdb596byhLPR9dOMGMge5ZT+8xH9sVPPf yoRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694090158; x=1694694958; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=92ZzARlgvwbUgPGukrjbEt7NIUtDZ/sbGDiLDmqSYTc=; b=Tnwelad6bqgk59sFkMCTDYPBKKMXKMyfDPZNoyoAO2NjXTM8O6AmpuGov/vrghxGZl 2/c9TDsfZjYHZAlikt/F2XIZUmDjUc1qP/Gr6f6VQX/773yO4kBwSmfrA3Kz9UT9Cvyw vxszU1m1rU5hqINZo6h1Jwq8vmoWKxCr6HOVPhtun2GjM2V/t68zhvj60ZvnifoqKUXd OcrZULusBFL6ryIWmd+kCTK9rY0qPOsu0qQPUKbm2BlwpMNTEj0WQexAM3CSqEk39UW2 x38eDx2H+pirkuFoCfHfZvrwr1JyCQeZfyRi+ruRfZnXWpDL8Mo7JvyPu49ecvvj53x1 gH9g== X-Gm-Message-State: AOJu0Ywjdl9UbaLNqmDHd+dcqPwJGsVLhzckNmUtoEuYZY9+/mNvaghr 8Yrb4HEePYlzv3xWZnP2utA= X-Google-Smtp-Source: AGHT+IGAwoAH1VuEf0uLg7JzznbpK7+58KcqeTEwKuzaqoEerqdZGEl+5m4s+IUxsXsAAxGB04D6nQ== X-Received: by 2002:a05:6a21:7786:b0:153:a897:3be5 with SMTP id bd6-20020a056a21778600b00153a8973be5mr3705184pzc.42.1694090158062; Thu, 07 Sep 2023 05:35:58 -0700 (PDT) Received: from smtpclient.apple (27-52-169-67.adsl.fetnet.net. [27.52.169.67]) by smtp.gmail.com with ESMTPSA id z8-20020aa791c8000000b006870ed427b2sm12607500pfa.94.2023.09.07.05.35.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 Sep 2023 05:35:57 -0700 (PDT) Content-Type: multipart/alternative; boundary=Apple-Mail-2185EB29-4669-4079-BEF3-A86D4031405D Content-Transfer-Encoding: 7bit From: Mining Lin Mime-Version: 1.0 (1.0) Subject: Re: [PATCH v5 1/1] rtc: nuvoton: Compatible with NCT3015Y-R and NCT3018Y-R Date: Thu, 7 Sep 2023 20:35:44 +0800 Message-Id: References: <20230906140123dd8ffac4@mail.local> In-Reply-To: <20230906140123dd8ffac4@mail.local> To: Alexandre Belloni X-Mailer: iPhone Mail (20G75) X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-rtc@vger.kernel.org, a.zummo@towertech.it, mylin1@nuvoton.com, benjaminfair@google.com, KWLIU@nuvoton.com, avifishman70@gmail.com, venture@google.com, openbmc@lists.ozlabs.org, JJLIU0@nuvoton.com, linux-kernel@vger.kernel.org, tali.perry1@gmail.com, KFLIN@nuvoton.com, tmaimon77@gmail.com Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" --Apple-Mail-2185EB29-4669-4079-BEF3-A86D4031405D Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Dear Alexandre, Thanks for your comments. The replies are as follow. Thanks. Best regard, Mia Sent from my iPhone > On Sep 6, 2023, at 10:01 PM, Alexandre Belloni wrote: >=20 > =EF=BB=BFOn 06/09/2023 09:19:29+0800, Mining Lin wrote: >>>> static int nct3018y_set_alarm_mode(struct i2c_client *client, bool on) >>>> { >>>> int err, flags; >>>> @@ -55,7 +59,7 @@ static int nct3018y_set_alarm_mode(struct i2c_client *= client, bool on) >>>> flags =3D i2c_smbus_read_byte_data(client, NCT3018Y_REG_CTRL); >>>> if (flags < 0) { >>>> dev_dbg(&client->dev, >>>> - "Failed to read NCT3018Y_REG_CTRL\n"); >>>> + "%s: Failed to read ctrl reg.\n", __func__); >>>=20 >>> If you really insist on this change, what about: >>>=20 >>> #define pr_fmt(fmt) "%s: " fmt, __func__ >> [Mia] Do you mean to replace dev_dbg with pr_debug? If yes, for consisten= cy, I'm going to refine all messages via pr_debug. Thank you for your sugges= tion. >=20 > No, I mean that instead of adding __func__ to all the messages just > define pr_fmt, this should achieve what you want. [Mia] I'd like to confirm that you mean that I just need to define pr_fmt so= that dev_dbg can show function name in the log? I try to define pr_fmt and the function name is shown in the log by pr_*(e.g= . pr_debug) but not by dev_*(e.g. dev_dbg). And I also add #define dev_fmt pr_fmt but build error. > --=20 > Alexandre Belloni, co-owner and COO, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com --Apple-Mail-2185EB29-4669-4079-BEF3-A86D4031405D Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

Dear Alexandre,


Thank= s for your comments.

The replies are as follow.=


Thanks.

Best regard,

Mia


Sent from my iPhone

On Sep 6, 2023, at 10:01 PM, Alexandre B= elloni <alexandre.belloni@bootlin.com> wrote:

=EF=BB=BFOn 06/09/2023 09= :19:29+0800, Mining Lin wrote:
static int nct3018y_set_ala= rm_mode(struct i2c_client *client, bool on)
{
=
  int err, flags;
@@ -55,7 +59,7 @@ static int nct3018y_set_alarm_mode(struc= t i2c_client *client, bool on)
  flags =3D  i2c_smbus_read_byte_data(client, NC= T3018Y_REG_CTRL);
&= nbsp; if (flags < 0) {
      dev_dbg(&client->dev= ,
-   &nb= sp;        "Failed to read NCT3018Y_= REG_CTRL\n");
+ &nb= sp;          "%s: Failed t= o read ctrl reg.\n", __func__);

= If you really insist on this change, what about:

#define pr_fmt(fmt) "%s: " fmt, __func__
[Mia] Do you mean to replac= e dev_dbg with pr_debug? If yes, for consistency, I'm going to refine all me= ssages via pr_debug. Thank you for your suggestion.
<= span>
No, I mean that instead of adding __func__ to all the m= essages just
define pr_fmt, this should achieve what you wan= t.
[Mia] I'd like to confirm th= at you mean that I just need to define pr_fmt so that dev_dbg can show funct= ion name in the log?
I try to de= fine pr_fmt and the function name is shown in the log by pr_*(e.g. pr_debug)= but not by dev_*(e.g. dev_dbg). And I also add
#define dev_fmt pr_fmt
= but build error.

--
Alex= andre Belloni, co-owner and COO, Bootlin
Embedded Linux and K= ernel engineering
https://bootlin.com
= --Apple-Mail-2185EB29-4669-4079-BEF3-A86D4031405D--