LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Joe Perches <joe@perches.com>
Cc: Craig Gallek <kraig@google.com>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] genirq/irqdesc: Use sysfs_emit in the <foo>_show functions
Date: Tue, 10 Aug 2021 23:46:59 +0200 [thread overview]
Message-ID: <87im0dotv0.ffs@tglx> (raw)
In-Reply-To: <5a7cf87075177ab374c55e15f677eac167ac767a.camel@perches.com>
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
prev parent reply other threads:[~2021-08-10 21:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-10 17:55 Joe Perches
2021-08-10 21:46 ` Thomas Gleixner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87im0dotv0.ffs@tglx \
--to=tglx@linutronix.de \
--cc=joe@perches.com \
--cc=kraig@google.com \
--cc=linux-kernel@vger.kernel.org \
--subject='Re: [PATCH] genirq/irqdesc: Use sysfs_emit in the <foo>_show functions' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).