All of lore.kernel.org
 help / color / mirror / Atom feed
From: "yukuai (C)" <yukuai3@huawei.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: <joern@lazybastard.org>, <richard@nod.at>, <vigneshr@ti.com>,
	<matthias.bgg@gmail.com>, <linux-mtd@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>, <yi.zhang@huawei.com>
Subject: Re: [PATCH 3/3] mtd: phram: Fix error return code in phram_setup()
Date: Thu, 8 Apr 2021 21:26:09 +0800	[thread overview]
Message-ID: <cc02de9c-6315-3fa6-4b0a-4287b2713484@huawei.com> (raw)
In-Reply-To: <20210408144610.0c0686ae@xps13>

On 2021/04/08 20:46, Miquel Raynal wrote:
> Hi Yu,
> 
> Yu Kuai <yukuai3@huawei.com> wrote on Thu, 8 Apr 2021 19:15:14 +0800:
> 
>> Fix to return a negative error code from the error handling
>> case instead of 0, as done elsewhere in this function.
>>
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Signed-off-by: Yu Kuai <yukuai3@huawei.com>
>> ---
>>   drivers/mtd/devices/phram.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c
>> index 5b04ae6c3057..6ed6c51fac69 100644
>> --- a/drivers/mtd/devices/phram.c
>> +++ b/drivers/mtd/devices/phram.c
>> @@ -270,6 +270,7 @@ static int phram_setup(const char *val)
>>   	if (len == 0 || erasesize == 0 || erasesize > len
>>   	    || erasesize > UINT_MAX || rem) {
>>   		parse_err("illegal erasesize or len\n");
>> +		ret = -EINVAL;
>>   		goto error;
>>   	}
>>   
> 
> It looks like you're doing the opposite of what you say.
> 
Hi,

sorry about that, I misunderstood 'fix to'.

Thanks
Yu Kuai
> Thanks,
> Miquèl
> .
> 

WARNING: multiple messages have this Message-ID (diff)
From: "yukuai (C)" <yukuai3@huawei.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: <joern@lazybastard.org>, <richard@nod.at>, <vigneshr@ti.com>,
	<matthias.bgg@gmail.com>, <linux-mtd@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>, <yi.zhang@huawei.com>
Subject: Re: [PATCH 3/3] mtd: phram: Fix error return code in phram_setup()
Date: Thu, 8 Apr 2021 21:26:09 +0800	[thread overview]
Message-ID: <cc02de9c-6315-3fa6-4b0a-4287b2713484@huawei.com> (raw)
In-Reply-To: <20210408144610.0c0686ae@xps13>

On 2021/04/08 20:46, Miquel Raynal wrote:
> Hi Yu,
> 
> Yu Kuai <yukuai3@huawei.com> wrote on Thu, 8 Apr 2021 19:15:14 +0800:
> 
>> Fix to return a negative error code from the error handling
>> case instead of 0, as done elsewhere in this function.
>>
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Signed-off-by: Yu Kuai <yukuai3@huawei.com>
>> ---
>>   drivers/mtd/devices/phram.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c
>> index 5b04ae6c3057..6ed6c51fac69 100644
>> --- a/drivers/mtd/devices/phram.c
>> +++ b/drivers/mtd/devices/phram.c
>> @@ -270,6 +270,7 @@ static int phram_setup(const char *val)
>>   	if (len == 0 || erasesize == 0 || erasesize > len
>>   	    || erasesize > UINT_MAX || rem) {
>>   		parse_err("illegal erasesize or len\n");
>> +		ret = -EINVAL;
>>   		goto error;
>>   	}
>>   
> 
> It looks like you're doing the opposite of what you say.
> 
Hi,

sorry about that, I misunderstood 'fix to'.

Thanks
Yu Kuai
> Thanks,
> Miquèl
> .
> 

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

WARNING: multiple messages have this Message-ID (diff)
From: "yukuai (C)" <yukuai3@huawei.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: <joern@lazybastard.org>, <richard@nod.at>, <vigneshr@ti.com>,
	<matthias.bgg@gmail.com>, <linux-mtd@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>, <yi.zhang@huawei.com>
Subject: Re: [PATCH 3/3] mtd: phram: Fix error return code in phram_setup()
Date: Thu, 8 Apr 2021 21:26:09 +0800	[thread overview]
Message-ID: <cc02de9c-6315-3fa6-4b0a-4287b2713484@huawei.com> (raw)
In-Reply-To: <20210408144610.0c0686ae@xps13>

On 2021/04/08 20:46, Miquel Raynal wrote:
> Hi Yu,
> 
> Yu Kuai <yukuai3@huawei.com> wrote on Thu, 8 Apr 2021 19:15:14 +0800:
> 
>> Fix to return a negative error code from the error handling
>> case instead of 0, as done elsewhere in this function.
>>
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Signed-off-by: Yu Kuai <yukuai3@huawei.com>
>> ---
>>   drivers/mtd/devices/phram.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c
>> index 5b04ae6c3057..6ed6c51fac69 100644
>> --- a/drivers/mtd/devices/phram.c
>> +++ b/drivers/mtd/devices/phram.c
>> @@ -270,6 +270,7 @@ static int phram_setup(const char *val)
>>   	if (len == 0 || erasesize == 0 || erasesize > len
>>   	    || erasesize > UINT_MAX || rem) {
>>   		parse_err("illegal erasesize or len\n");
>> +		ret = -EINVAL;
>>   		goto error;
>>   	}
>>   
> 
> It looks like you're doing the opposite of what you say.
> 
Hi,

sorry about that, I misunderstood 'fix to'.

Thanks
Yu Kuai
> Thanks,
> Miquèl
> .
> 

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: "yukuai (C)" <yukuai3@huawei.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: <joern@lazybastard.org>, <richard@nod.at>, <vigneshr@ti.com>,
	<matthias.bgg@gmail.com>, <linux-mtd@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>, <yi.zhang@huawei.com>
Subject: Re: [PATCH 3/3] mtd: phram: Fix error return code in phram_setup()
Date: Thu, 8 Apr 2021 21:26:09 +0800	[thread overview]
Message-ID: <cc02de9c-6315-3fa6-4b0a-4287b2713484@huawei.com> (raw)
In-Reply-To: <20210408144610.0c0686ae@xps13>

On 2021/04/08 20:46, Miquel Raynal wrote:
> Hi Yu,
> 
> Yu Kuai <yukuai3@huawei.com> wrote on Thu, 8 Apr 2021 19:15:14 +0800:
> 
>> Fix to return a negative error code from the error handling
>> case instead of 0, as done elsewhere in this function.
>>
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Signed-off-by: Yu Kuai <yukuai3@huawei.com>
>> ---
>>   drivers/mtd/devices/phram.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c
>> index 5b04ae6c3057..6ed6c51fac69 100644
>> --- a/drivers/mtd/devices/phram.c
>> +++ b/drivers/mtd/devices/phram.c
>> @@ -270,6 +270,7 @@ static int phram_setup(const char *val)
>>   	if (len == 0 || erasesize == 0 || erasesize > len
>>   	    || erasesize > UINT_MAX || rem) {
>>   		parse_err("illegal erasesize or len\n");
>> +		ret = -EINVAL;
>>   		goto error;
>>   	}
>>   
> 
> It looks like you're doing the opposite of what you say.
> 
Hi,

sorry about that, I misunderstood 'fix to'.

Thanks
Yu Kuai
> Thanks,
> Miquèl
> .
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-04-08 13:26 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-08 11:15 [PATCH 0/3] code optimization for mtd Yu Kuai
2021-04-08 11:15 ` Yu Kuai
2021-04-08 11:15 ` Yu Kuai
2021-04-08 11:15 ` Yu Kuai
2021-04-08 11:15 ` [PATCH 1/3] mtd: rawnand: mtk: remove redundant dev_err call in mtk_ecc_probe() Yu Kuai
2021-04-08 11:15   ` Yu Kuai
2021-04-08 11:15   ` Yu Kuai
2021-04-08 11:15   ` Yu Kuai
2021-05-10  9:10   ` Miquel Raynal
2021-05-10  9:10     ` Miquel Raynal
2021-05-10  9:10     ` Miquel Raynal
2021-05-10  9:10     ` Miquel Raynal
2021-04-08 11:15 ` [PATCH 2/3] mtd: plat-ram: remove redundant dev_err call in platram_probe() Yu Kuai
2021-04-08 11:15   ` Yu Kuai
2021-04-08 11:15   ` Yu Kuai
2021-04-08 11:15   ` Yu Kuai
2021-05-10  9:10   ` Miquel Raynal
2021-05-10  9:10     ` Miquel Raynal
2021-05-10  9:10     ` Miquel Raynal
2021-05-10  9:10     ` Miquel Raynal
2021-04-08 11:15 ` [PATCH 3/3] mtd: phram: Fix error return code in phram_setup() Yu Kuai
2021-04-08 11:15   ` Yu Kuai
2021-04-08 11:15   ` Yu Kuai
2021-04-08 11:15   ` Yu Kuai
2021-04-08 12:46   ` Miquel Raynal
2021-04-08 12:46     ` Miquel Raynal
2021-04-08 12:46     ` Miquel Raynal
2021-04-08 12:46     ` Miquel Raynal
2021-04-08 13:26     ` yukuai (C) [this message]
2021-04-08 13:26       ` yukuai (C)
2021-04-08 13:26       ` yukuai (C)
2021-04-08 13:26       ` yukuai (C)
2021-04-08 13:38     ` [PATCH V2] " Yu Kuai
2021-04-08 13:38       ` Yu Kuai
2021-04-08 13:33       ` Miquel Raynal
2021-04-08 13:33         ` Miquel Raynal
2021-05-10  9:10       ` Miquel Raynal
2021-05-10  9:10         ` Miquel Raynal

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=cc02de9c-6315-3fa6-4b0a-4287b2713484@huawei.com \
    --to=yukuai3@huawei.com \
    --cc=joern@lazybastard.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.com \
    --cc=yi.zhang@huawei.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 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.