X86 platform drivers
 help / color / mirror / Atom feed
From: Denis Efremov <efremov-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org>
To: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>,
	LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Greg Kroah-Hartman
	<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
	"Rafael J. Wysocki"
	<rafael-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Kees Cook <keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	"Gustavo A . R . Silva"
	<gustavoars-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Julia Lawall <julia.lawall-MZpvjPyXg2s@public.gmane.org>,
	Alex Dewar <alex.dewar90-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: York Sun <york.sun-3arQi8VN3Tc@public.gmane.org>,
	Borislav Petkov <bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org>,
	Mauro Carvalho Chehab
	<mchehab-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Tony Luck <tony.luck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	James Morse <james.morse-5wv7dgnIgG8@public.gmane.org>,
	Robert Richter <rric-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Michal Simek
	<michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>,
	Boris Brezillon
	<bbrezillon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Maxim Levitsky
	<maximlevitsky-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Alex Dubov <oakad-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>,
	Ulf Hansson <ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Tomas Winkler
	<tomas.winkler-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
	Madalin Bucur <madalin.bucur-3arQi8VN3Tc@public.gmane.org>,
	"David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
	Jakub Kicinski <kuba-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Douglas Miller <dougmill-tEXmvtCZX7AybS5Ee8rs3A@public.gmane.org>,
	Stanislav Yakovlev
	<stas.yakovlev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Kalle Valo <kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Darren Hart <dvhart-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	An
Subject: Re: sysfs output without newlines
Date: Sat, 29 Aug 2020 23:23:39 +0300	[thread overview]
Message-ID: <4cd6275c-6e95-3aeb-9924-141f62e00449@linux.com> (raw)
In-Reply-To: <0f837bfb394ac632241eaac3e349b2ba806bce09.camel-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>

Hi,

On 8/29/20 9:23 PM, Joe Perches wrote:
> While doing an investigation for a possible treewide conversion of
> sysfs output using sprintf/snprintf/scnprintf, I discovered
> several instances of sysfs output without terminating newlines.
> 
> It seems likely all of these should have newline terminations
> or have the \n\r termination changed to a single newline.

I think that it could break badly written scripts in rare cases.

> 
> Anyone have any objection to patches adding newlines to these
> in their original forms using sprintf/snprintf/scnprintf?

I'm not sure about existing cases, but I think it's a good
checkpatch.pl warning for new patches. It should be 
possible to check sysfs_emit() calls.

Thanks,
Denis

  parent reply	other threads:[~2020-08-29 20:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-29 18:23 sysfs output without newlines Joe Perches
     [not found] ` <0f837bfb394ac632241eaac3e349b2ba806bce09.camel-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2020-08-29 20:23   ` Denis Efremov [this message]
2020-08-29 20:33     ` Joe Perches
     [not found]       ` <b64a4cb0ee68fee01973616e5ef0f299ac191f6d.camel-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2020-09-01  9:07         ` David Laight
2020-09-01 22:22           ` Pete Zaitcev
2020-09-02  7:57             ` Andy Shevchenko
2020-08-30  9:11 ` Greg Kroah-Hartman

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=4cd6275c-6e95-3aeb-9924-141f62e00449@linux.com \
    --to=efremov-vytec60ixjuavxtiumwx3w@public.gmane.org \
    --cc=alex.dewar90-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=bbrezillon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=dougmill-tEXmvtCZX7AybS5Ee8rs3A@public.gmane.org \
    --cc=dvhart-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=gustavoars-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=james.morse-5wv7dgnIgG8@public.gmane.org \
    --cc=joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org \
    --cc=julia.lawall-MZpvjPyXg2s@public.gmane.org \
    --cc=keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=kuba-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=madalin.bucur-3arQi8VN3Tc@public.gmane.org \
    --cc=maximlevitsky-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=mchehab-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org \
    --cc=oakad-/E1597aS9LQAvxtiuMwx3w@public.gmane.org \
    --cc=rafael-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=rric-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=stas.yakovlev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=tomas.winkler-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=tony.luck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=york.sun-3arQi8VN3Tc@public.gmane.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox