* [PATCH v2] mtd:ubi: Remove useless code in bytes_str_to_int
@ 2020-11-03 11:56 ` Chengsong Ke
0 siblings, 0 replies; 10+ messages in thread
From: Chengsong Ke @ 2020-11-03 11:56 UTC (permalink / raw)
To: richard, s.hauer; +Cc: linux-mtd, linux-kernel
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;
case '\0':
break;
default:
--
2.12.3
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2] mtd:ubi: Remove useless code in bytes_str_to_int
2020-11-03 11:56 ` Chengsong Ke
@ 2020-11-03 12:34 ` Richard Weinberger
-1 siblings, 0 replies; 10+ messages in thread
From: Richard Weinberger @ 2020-11-03 12:34 UTC (permalink / raw)
To: Chengsong Ke; +Cc: Richard Weinberger, Sascha Hauer, linux-mtd, LKML
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] mtd:ubi: Remove useless code in bytes_str_to_int
@ 2020-11-03 12:34 ` Richard Weinberger
0 siblings, 0 replies; 10+ messages in thread
From: Richard Weinberger @ 2020-11-03 12:34 UTC (permalink / raw)
To: Chengsong Ke; +Cc: Richard Weinberger, Sascha Hauer, linux-mtd, LKML
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/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] mtd:ubi: Remove useless code in bytes_str_to_int
2020-11-03 11:56 ` Chengsong Ke
@ 2020-11-03 13:16 ` kechengsong
-1 siblings, 0 replies; 10+ messages in thread
From: kechengsong @ 2020-11-03 13:16 UTC (permalink / raw)
To: richard; +Cc: linux-mtd, linux-kernel
On Tue, Nov 3, 2020 at 1:00 PM Chengsong Ke <kechengsong@huawei.com> wrote:
>
> From: Chengsong Ke <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
I just send the v1 with the wrong module name 'ubifs'.
[PATCH] ubifs: Remove useless code in bytes_str_to_int
:-)
Thanks,
//Chengsong Ke
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] mtd:ubi: Remove useless code in bytes_str_to_int
@ 2020-11-03 13:16 ` kechengsong
0 siblings, 0 replies; 10+ messages in thread
From: kechengsong @ 2020-11-03 13:16 UTC (permalink / raw)
To: richard; +Cc: linux-mtd, linux-kernel
On Tue, Nov 3, 2020 at 1:00 PM Chengsong Ke <kechengsong@huawei.com> wrote:
>
> From: Chengsong Ke <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
I just send the v1 with the wrong module name 'ubifs'.
[PATCH] ubifs: Remove useless code in bytes_str_to_int
:-)
Thanks,
//Chengsong Ke
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] mtd:ubi: Remove useless code in bytes_str_to_int
2020-11-03 11:56 ` Chengsong Ke
@ 2020-12-11 3:31 ` Chengsong Ke
-1 siblings, 0 replies; 10+ messages in thread
From: Chengsong Ke @ 2020-12-11 3:31 UTC (permalink / raw)
To: richard; +Cc: linux-mtd, linux-kernel
On Tue, Nov 3, 2020 at 1:00 PM Chengsong Ke <kechengsong@huawei.com> wrote:
>
> From: Chengsong Ke <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
> I just send the v1 with the wrong module name 'ubifs'.
> [PATCH] ubifs: Remove useless code in bytes_str_to_int
> :-)
> Thanks,
> //Chengsong Ke
ping
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] mtd:ubi: Remove useless code in bytes_str_to_int
@ 2020-12-11 3:31 ` Chengsong Ke
0 siblings, 0 replies; 10+ messages in thread
From: Chengsong Ke @ 2020-12-11 3:31 UTC (permalink / raw)
To: richard; +Cc: linux-mtd, linux-kernel
On Tue, Nov 3, 2020 at 1:00 PM Chengsong Ke <kechengsong@huawei.com> wrote:
>
> From: Chengsong Ke <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
> I just send the v1 with the wrong module name 'ubifs'.
> [PATCH] ubifs: Remove useless code in bytes_str_to_int
> :-)
> Thanks,
> //Chengsong Ke
ping
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] mtd:ubi: Remove useless code in bytes_str_to_int
2020-12-11 3:31 ` Chengsong Ke
@ 2020-12-13 21:18 ` Richard Weinberger
-1 siblings, 0 replies; 10+ messages in thread
From: Richard Weinberger @ 2020-12-13 21:18 UTC (permalink / raw)
To: Chengsong Ke; +Cc: Richard Weinberger, linux-mtd, LKML
On Fri, Dec 11, 2020 at 4:38 AM Chengsong Ke <kechengsong@huawei.com> wrote:
> > I just send the v1 with the wrong module name 'ubifs'.
> > [PATCH] ubifs: Remove useless code in bytes_str_to_int
> > :-)
> > Thanks,
> > //Chengsong Ke
> ping
Both patches are in my next tree and should appear soon on linux-next.
Thanks for your patience.
--
Thanks,
//richard
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] mtd:ubi: Remove useless code in bytes_str_to_int
@ 2020-12-13 21:18 ` Richard Weinberger
0 siblings, 0 replies; 10+ messages in thread
From: Richard Weinberger @ 2020-12-13 21:18 UTC (permalink / raw)
To: Chengsong Ke; +Cc: Richard Weinberger, linux-mtd, LKML
On Fri, Dec 11, 2020 at 4:38 AM Chengsong Ke <kechengsong@huawei.com> wrote:
> > I just send the v1 with the wrong module name 'ubifs'.
> > [PATCH] ubifs: Remove useless code in bytes_str_to_int
> > :-)
> > Thanks,
> > //Chengsong Ke
> ping
Both patches are in my next tree and should appear soon on linux-next.
Thanks for your patience.
--
Thanks,
//richard
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 10+ messages in thread