[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8976e64c-34aa-47ca-9d5c-81cb06392621@linaro.org>
Date: Wed, 15 Jan 2025 17:56:29 +0100
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Alexandre Belloni <alexandre.belloni@...tlin.com>
Cc: Nicolas Ferre <nicolas.ferre@...rochip.com>,
Claudiu Beznea <claudiu.beznea@...on.dev>, Joshua Kinard <kumba@...too.org>,
linux-rtc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] rtc: Use str_enable_disable-like helpers
On 15/01/2025 17:29, Alexandre Belloni wrote:
>> /*
>> @@ -252,7 +253,7 @@ static int at91_rtc_proc(struct device *dev, struct seq_file *seq)
>> u32 mr = rtt_readl(rtc, MR);
>>
>> seq_printf(seq, "update_IRQ\t: %s\n",
>> - (mr & AT91_RTT_RTTINCIEN) ? "yes" : "no");
>> + str_yes_no(mr & AT91_RTT_RTTINCIEN));
>> return 0;
>> }
>>
>> diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
>> index 78f2ce12c75a..1f556cdd778f 100644
>> --- a/drivers/rtc/rtc-cmos.c
>> +++ b/drivers/rtc/rtc-cmos.c
>> @@ -32,6 +32,7 @@
>> #include <linux/init.h>
>> #include <linux/interrupt.h>
>> #include <linux/spinlock.h>
>> +#include <linux/string_choices.h>
>> #include <linux/platform_device.h>
>> #include <linux/log2.h>
>> #include <linux/pm.h>
>> @@ -604,12 +605,12 @@ static int cmos_procfs(struct device *dev, struct seq_file *seq)
>> "DST_enable\t: %s\n"
>> "periodic_freq\t: %d\n"
>> "batt_status\t: %s\n",
>> - (rtc_control & RTC_PIE) ? "yes" : "no",
>> - (rtc_control & RTC_UIE) ? "yes" : "no",
>> - use_hpet_alarm() ? "yes" : "no",
>> + str_yes_no(rtc_control & RTC_PIE),
>> + str_yes_no(rtc_control & RTC_UIE),
>> + str_yes_no(use_hpet_alarm()),
>> // (rtc_control & RTC_SQWE) ? "yes" : "no",
>> (rtc_control & RTC_DM_BINARY) ? "no" : "yes",
>
> I guess you missed those two.
Yeah, indeed.
> However, I'm in favor of ripping the whole procfs out of the kernel
>
I can send changing these two or skipping procfs parts entirely.
Best regards,
Krzysztof
Powered by blists - more mailing lists