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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 10 Aug 2021 23:46:59 +0200
From:   Thomas Gleixner <>
To:     Joe Perches <>
Cc:     Craig Gallek <>,
        LKML <>
Subject: Re: [PATCH] genirq/irqdesc: Use sysfs_emit in the <foo>_show functions


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

> 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


> 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:// irq/core



Powered by blists - more mailing lists