From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Huijin Park <huijin.park@samsung.com>
Cc: Marek Vasut <marek.vasut@gmail.com>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
bbanghj.park@gmail.com
Subject: Re: [PATCH v2] mtd: change len type from signed to unsigned type
Date: Thu, 15 Nov 2018 14:34:17 +0100 [thread overview]
Message-ID: <20181115143417.4e0e7dbe@bbrezillon> (raw)
In-Reply-To: <1542258430-19885-1-git-send-email-huijin.park@samsung.com>
On Thu, 15 Nov 2018 00:07:10 -0500
Huijin Park <huijin.park@samsung.com> wrote:
> From: "huijin.park" <huijin.park@samsung.com>
>
> This patch casts the "len" parameter to an unsigned int.
Hm, that's not really what this patch actually. Actually it avoids the
cast from an int to an unsigned int.
> The callers of erase_write() pass the "len" parameter as unsigned int.
That's the important part here. Callers of erase_write() always pass an
unsigned int, so what you're trying to do here is avoid a cast to an
int.
>
> Signed-off-by: huijin.park <huijin.park@samsung.com>
> ---
You should have a changelog here.
> drivers/mtd/mtdblock.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mtd/mtdblock.c b/drivers/mtd/mtdblock.c
> index a5b1933..b2d5ed1 100644
> --- a/drivers/mtd/mtdblock.c
> +++ b/drivers/mtd/mtdblock.c
> @@ -56,7 +56,7 @@ struct mtdblk_dev {
> */
>
> static int erase_write (struct mtd_info *mtd, unsigned long pos,
> - int len, const char *buf)
> + unsigned int len, const char *buf)
> {
> struct erase_info erase;
> size_t retlen;
prev parent reply other threads:[~2018-11-15 13:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20181115050724eucas1p169b2046c03e108035199a4481a82a560@eucas1p1.samsung.com>
2018-11-15 5:07 ` [PATCH v2] mtd: change len type from signed to unsigned type Huijin Park
2018-11-15 9:29 ` Miquel Raynal
2018-11-28 14:51 ` Huijin Park
2018-11-15 13:34 ` Boris Brezillon [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=20181115143417.4e0e7dbe@bbrezillon \
--to=boris.brezillon@bootlin.com \
--cc=bbanghj.park@gmail.com \
--cc=huijin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.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