[v2,10/14] mtd: rawnand: qcom: fix return value for raw page read

Message ID 1525350041-22995-11-git-send-email-absahu@codeaurora.org
State Superseded
Delegated to: Miquel Raynal
Headers show
Series
  • Update for QCOM NAND driver
Related show

Commit Message

Abhishek Sahu May 3, 2018, 12:20 p.m.
Currently zero is being returned for all raw page read so
fix the same.

Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
---
* Changes from v1:

 NEW CHANGE

 drivers/mtd/nand/raw/qcom_nandc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Miquel Raynal May 22, 2018, 12:04 p.m. | #1
Hi Abhishek,

On Thu,  3 May 2018 17:50:37 +0530, Abhishek Sahu
<absahu@codeaurora.org> wrote:

> Currently zero is being returned for all raw page read so
> fix the same.

What about "Fix value returned by ->read_page_raw() to be the
actual operation status, instead of always 0."?

> 
> Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
> ---
> * Changes from v1:
> 
>  NEW CHANGE
> 
>  drivers/mtd/nand/raw/qcom_nandc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c
> index f85d8ab..17b7f3af 100644
> --- a/drivers/mtd/nand/raw/qcom_nandc.c
> +++ b/drivers/mtd/nand/raw/qcom_nandc.c
> @@ -1900,7 +1900,7 @@ static int qcom_nandc_read_page_raw(struct mtd_info *mtd,
>  
>  	free_descs(nandc);
>  
> -	return 0;
> +	return ret;
>  }
>  
>  /* implements ecc->read_oob() */

Thanks,
Miquèl
Abhishek Sahu May 22, 2018, 2:15 p.m. | #2
On 2018-05-22 17:34, Miquel Raynal wrote:
> Hi Abhishek,
> 
> On Thu,  3 May 2018 17:50:37 +0530, Abhishek Sahu
> <absahu@codeaurora.org> wrote:
> 
>> Currently zero is being returned for all raw page read so
>> fix the same.
> 
> What about "Fix value returned by ->read_page_raw() to be the
> actual operation status, instead of always 0."?
> 

  Sure Miquel. It looks better.
  I will change this.

  Thanks,
  Abhishek

>> 
>> Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
>> ---
>> * Changes from v1:
>> 
>>  NEW CHANGE
>> 
>>  drivers/mtd/nand/raw/qcom_nandc.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/mtd/nand/raw/qcom_nandc.c 
>> b/drivers/mtd/nand/raw/qcom_nandc.c
>> index f85d8ab..17b7f3af 100644
>> --- a/drivers/mtd/nand/raw/qcom_nandc.c
>> +++ b/drivers/mtd/nand/raw/qcom_nandc.c
>> @@ -1900,7 +1900,7 @@ static int qcom_nandc_read_page_raw(struct 
>> mtd_info *mtd,
>> 
>>  	free_descs(nandc);
>> 
>> -	return 0;
>> +	return ret;
>>  }
>> 
>>  /* implements ecc->read_oob() */
> 
> Thanks,
> Miquèl

Patch

diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c
index f85d8ab..17b7f3af 100644
--- a/drivers/mtd/nand/raw/qcom_nandc.c
+++ b/drivers/mtd/nand/raw/qcom_nandc.c
@@ -1900,7 +1900,7 @@  static int qcom_nandc_read_page_raw(struct mtd_info *mtd,
 
 	free_descs(nandc);
 
-	return 0;
+	return ret;
 }
 
 /* implements ecc->read_oob() */