All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard.weinberger@gmail.com>
To: Chengsong Ke <kechengsong@huawei.com>
Cc: Richard Weinberger <richard@nod.at>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	linux-mtd@lists.infradead.org,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] mtd:ubi: Remove useless code in bytes_str_to_int
Date: Tue, 3 Nov 2020 13:34:51 +0100	[thread overview]
Message-ID: <CAFLxGvwKTezooPvWQDZViaXsZ6zsbgf6b-O8RtcU9x6w27xYpQ@mail.gmail.com> (raw)
In-Reply-To: <20201103115645.684-1-kechengsong@huawei.com>

On Tue, Nov 3, 2020 at 1:00 PM Chengsong Ke <kechengsong@huawei.com> wrote:
>
> From: k00524021 <kechengsong@huawei.com>
>
> As a local variable, "endp" is neither refered nor returned
> after this line "endp += 2", it looks like a useless code,
> suggest to remove it.
>
> Signed-off-by: Chengsong Ke <kechengsong@huawei.com>
> ---
>  drivers/mtd/ubi/build.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
> index e85b04e9716b..46a6dd75e533 100644
> --- a/drivers/mtd/ubi/build.c
> +++ b/drivers/mtd/ubi/build.c
> @@ -1351,8 +1351,6 @@ static int bytes_str_to_int(const char *str)
>                 fallthrough;
>         case 'K':
>                 result *= 1024;
> -               if (endp[1] == 'i' && endp[2] == 'B')
> -                       endp += 2;

Makes sense. But why did you send a v2?

-- 
Thanks,
//richard

WARNING: multiple messages have this Message-ID (diff)
From: Richard Weinberger <richard.weinberger@gmail.com>
To: Chengsong Ke <kechengsong@huawei.com>
Cc: Richard Weinberger <richard@nod.at>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	linux-mtd@lists.infradead.org,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] mtd:ubi: Remove useless code in bytes_str_to_int
Date: Tue, 3 Nov 2020 13:34:51 +0100	[thread overview]
Message-ID: <CAFLxGvwKTezooPvWQDZViaXsZ6zsbgf6b-O8RtcU9x6w27xYpQ@mail.gmail.com> (raw)
In-Reply-To: <20201103115645.684-1-kechengsong@huawei.com>

On Tue, Nov 3, 2020 at 1:00 PM Chengsong Ke <kechengsong@huawei.com> wrote:
>
> From: k00524021 <kechengsong@huawei.com>
>
> As a local variable, "endp" is neither refered nor returned
> after this line "endp += 2", it looks like a useless code,
> suggest to remove it.
>
> Signed-off-by: Chengsong Ke <kechengsong@huawei.com>
> ---
>  drivers/mtd/ubi/build.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
> index e85b04e9716b..46a6dd75e533 100644
> --- a/drivers/mtd/ubi/build.c
> +++ b/drivers/mtd/ubi/build.c
> @@ -1351,8 +1351,6 @@ static int bytes_str_to_int(const char *str)
>                 fallthrough;
>         case 'K':
>                 result *= 1024;
> -               if (endp[1] == 'i' && endp[2] == 'B')
> -                       endp += 2;

Makes sense. But why did you send a v2?

-- 
Thanks,
//richard

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

  reply	other threads:[~2020-11-03 12:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03 11:56 [PATCH v2] mtd:ubi: Remove useless code in bytes_str_to_int Chengsong Ke
2020-11-03 11:56 ` Chengsong Ke
2020-11-03 12:34 ` Richard Weinberger [this message]
2020-11-03 12:34   ` Richard Weinberger
2020-11-03 13:16 ` kechengsong
2020-11-03 13:16   ` kechengsong
2020-12-11  3:31 ` Chengsong Ke
2020-12-11  3:31   ` Chengsong Ke
2020-12-13 21:18   ` Richard Weinberger
2020-12-13 21:18     ` Richard Weinberger

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=CAFLxGvwKTezooPvWQDZViaXsZ6zsbgf6b-O8RtcU9x6w27xYpQ@mail.gmail.com \
    --to=richard.weinberger@gmail.com \
    --cc=kechengsong@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    --cc=s.hauer@pengutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.