lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 10 Aug 2021 23:46:59 +0200 From: Thomas Gleixner <tglx@...utronix.de> To: Joe Perches <joe@...ches.com> Cc: Craig Gallek <kraig@...gle.com>, LKML <linux-kernel@...r.kernel.org> Subject: Re: [PATCH] genirq/irqdesc: Use sysfs_emit in the <foo>_show functions Joe! On Tue, Aug 10 2021 at 10:55, Joe Perches wrote: > Convert the nominally unbounded sprintf output to use sysfs_emit and the > scnprintf uses to sysfs_emit_at. Please use function_name() not function_name as that makes it clear what this is about. > Miscellanea: The point is? > o sysfs_emit: Use the more common int len not ssize_t ret You're not changing sysfs_emit(). You change the variables in the irq functions. > o hwirq_show: Add a minimum newline output when irq_data.domain is not set > and remove an unnecessary cast of an unsigned long to int ("%d" -> > "%lu) That's a separate change and has nothing to do with $subject > o name_show: Add a minimum newline output when desc->name is not set Ditto. > diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c > index fadb937660202..8d47b8667c989 100644 > --- a/kernel/irq/irqdesc.c > +++ b/kernel/irq/irqdesc.c > @@ -147,19 +147,20 @@ static ssize_t per_cpu_count_show(struct kobject *kobj, > struct kobj_attribute *attr, char *buf) > { > struct irq_desc *desc = container_of(kobj, struct irq_desc, kobj); > - ssize_t ret = 0; > - char *p = ""; > + int len = 0; > + const char *p = ""; > int cpu; Please keep reverse fir tree ordering and stick the two int variables into one line, i.e. struct irq_desc *desc = container_of(kobj, struct irq_desc, kobj); const char *p = ""; int cpu, len = 0; Please rework against git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip irq/core Thanks, tglx
Powered by blists - more mailing lists