[PATCH v5 1/1] rtc: nuvoton: Compatible with NCT3015Y-R and NCT3018Y-R

Mining Lin mimi05633 at gmail.com
Thu Sep 7 22:35:44 AEST 2023


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 <alexandre.belloni at bootlin.com> wrote:
> 
> On 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 =  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__);
>>> 
>>> If you really insist on this change, what about:
>>> 
>>> #define pr_fmt(fmt) "%s: " fmt, __func__
>> [Mia] Do you mean to replace dev_dbg with pr_debug? If yes, for consistency, I'm going to refine all messages via pr_debug. Thank you for your suggestion.
> 
> 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.

> -- 
> Alexandre Belloni, co-owner and COO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20230907/8d4852d5/attachment.htm>


More information about the openbmc mailing list