public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: "tiantao (H)" <tiantao6@huawei.com>
Cc: Tian Tao <tiantao6@hisilicon.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	 Vignesh Raghavendra <vigneshr@ti.com>,
	 linux-mtd <linux-mtd@lists.infradead.org>
Subject: Re: [PATCH] mtd: core: Convert sysfs sprintf/snprintf family to sysfs_emit
Date: Mon, 12 Apr 2021 10:07:52 +0200 (CEST)	[thread overview]
Message-ID: <754065655.172978.1618214872038.JavaMail.zimbra@nod.at> (raw)
In-Reply-To: <049f8110-5777-db77-d374-275d1ceee81d@huawei.com>

----- Ursprüngliche Mail -----
>>> Fix the following coccicheck warning:
>>> drivers/mtd/mtdcore.c:296:8-16: WARNING: use scnprintf or sprintf
>>> drivers/mtd/mtdcore.c:306:8-16: WARNING: use scnprintf or sprintf
>>> drivers/mtd/mtdcore.c:237:8-16: WARNING: use scnprintf or sprintf
>>> drivers/mtd/mtdcore.c:275:8-16: WARNING: use scnprintf or sprintf
>>> drivers/mtd/mtdcore.c:286:8-16: WARNING: use scnprintf or sprintf
>>> drivers/mtd/mtdcore.c:264:8-16: WARNING: use scnprintf or sprintf
>>> drivers/mtd/mtdcore.c:227:8-16: WARNING: use scnprintf or sprintf
>>> drivers/mtd/mtdcore.c:162:8-16: WARNING: use scnprintf or sprintf
>>> drivers/mtd/mtdcore.c:143:8-16: WARNING: use scnprintf or sprintf
>>> drivers/mtd/mtdcore.c:218:8-16: WARNING: use scnprintf or sprintf
>>> drivers/mtd/mtdcore.c:208:8-16: WARNING: use scnprintf or sprintf
>>> drivers/mtd/mtdcore.c:199:8-16: WARNING: use scnprintf or sprintf
>>> drivers/mtd/mtdcore.c:190:8-16: WARNING: use scnprintf or sprintf
>>> drivers/mtd/mtdcore.c:152:8-16: WARNING: use scnprintf or sprintf
>>> drivers/mtd/mtdcore.c:181:8-16: WARNING: use scnprintf or sprintf
>>> drivers/mtd/mtdcore.c:134:8-16: WARNING: use scnprintf or sprintf
>>> drivers/mtd/mtdcore.c:171:8-16: WARNING: use scnprintf or sprintf

>> see: [
>> https://lore.kernel.org/linux-mtd/CAFLxGvxC4KtvtU2rza_aGx2RPONxr7XygUwXCDriYiCr8qN3qg@mail.gmail.com/
>> |
>> https://lore.kernel.org/linux-mtd/CAFLxGvxC4KtvtU2rza_aGx2RPONxr7XygUwXCDriYiCr8qN3qg@mail.gmail.com/
>> ] Please explain why a patch is needed and what it fixes.

> Using syfs_emit will avoid buffer overrun by avoiding buf being null or buf
> being in the middle of the page.

> no function change.

All this needs to go into the commit message.
Like I said, please explain changes.

The coccicheck warning in the commit message is also close to useless because
it advises you to use scnprintf or sprintf, which is not what your patch does.

Thanks,
//richard

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  parent reply	other threads:[~2021-04-12  8:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12  6:44 [PATCH] mtd: core: Convert sysfs sprintf/snprintf family to sysfs_emit Tian Tao
2021-04-12  6:49 ` Richard Weinberger
     [not found]   ` <049f8110-5777-db77-d374-275d1ceee81d@huawei.com>
2021-04-12  8:07     ` Richard Weinberger [this message]
2021-04-12  8:17       ` tiantao (H)
2021-04-12  8:25         ` Richard Weinberger
2021-04-12  8:29           ` tiantao (H)

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=754065655.172978.1618214872038.JavaMail.zimbra@nod.at \
    --to=richard@nod.at \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=tiantao6@hisilicon.com \
    --cc=tiantao6@huawei.com \
    --cc=vigneshr@ti.com \
    /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