Re: [PATCH] rtc: Use str_enable_disable-like helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux