* [PATCH] imx/gpmi: Make debug prints more clear
@ 2012-09-23 9:48 Vikram Narayanan
2012-10-08 16:58 ` Vikram Narayanan
2012-10-10 12:48 ` Artem Bityutskiy
0 siblings, 2 replies; 4+ messages in thread
From: Vikram Narayanan @ 2012-09-23 9:48 UTC (permalink / raw)
To: linux-mtd; +Cc: Huang Shijie, dedekind1
Make the error messages more debugging friendly
Signed-off-by: Vikram Narayanan <vikram186@gmail.com>
Cc: Huang Shijie <b32955@freescale.com>
---
drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
index 5999b15..24fbfb8 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
@@ -222,7 +222,7 @@ void prepare_data_dma(struct gpmi_nand_data *this, enum dma_data_direction dr)
ret = dma_map_sg(this->dev, sgl, 1, dr);
if (ret == 0)
- pr_err("map failed.\n");
+ pr_err("DMA mapping failed.\n");
this->direct_dma_map_ok = false;
}
@@ -456,7 +456,7 @@ static int __devinit acquire_dma_channels(struct gpmi_nand_data *this)
dma_chan = dma_request_channel(mask, gpmi_dma_filter, this);
if (!dma_chan) {
- pr_err("dma_request_channel failed.\n");
+ pr_err("Failed to request DMA channel.\n");
goto acquire_err;
}
@@ -630,7 +630,8 @@ static int read_page_prepare(struct gpmi_nand_data *this,
length, DMA_FROM_DEVICE);
if (dma_mapping_error(dev, dest_phys)) {
if (alt_size < length) {
- pr_err("Alternate buffer is too small\n");
+ pr_err("%s, Alternate buffer is too small\n",
+ __func__);
return -ENOMEM;
}
goto map_failed;
@@ -680,7 +681,8 @@ static int send_page_prepare(struct gpmi_nand_data *this,
DMA_TO_DEVICE);
if (dma_mapping_error(dev, source_phys)) {
if (alt_size < length) {
- pr_err("Alternate buffer is too small\n");
+ pr_err("%s, Alternate buffer is too small\n",
+ __func__);
return -ENOMEM;
}
goto map_failed;
@@ -768,7 +770,7 @@ static int gpmi_alloc_dma_buffer(struct gpmi_nand_data *this)
error_alloc:
gpmi_free_dma_buffer(this);
- pr_err("allocate DMA buffer ret!!\n");
+ pr_err("Error allocating DMA buffers!\n");
return -ENOMEM;
}
@@ -1479,7 +1481,7 @@ static int gpmi_set_geometry(struct gpmi_nand_data *this)
/* Set up the NFC geometry which is used by BCH. */
ret = bch_set_geometry(this);
if (ret) {
- pr_err("set geometry ret : %d\n", ret);
+ pr_err("Error setting BCH geometry : %d\n", ret);
return ret;
}
--
1.7.4.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] imx/gpmi: Make debug prints more clear
2012-09-23 9:48 [PATCH] imx/gpmi: Make debug prints more clear Vikram Narayanan
@ 2012-10-08 16:58 ` Vikram Narayanan
2012-10-09 1:43 ` Huang Shijie
2012-10-10 12:48 ` Artem Bityutskiy
1 sibling, 1 reply; 4+ messages in thread
From: Vikram Narayanan @ 2012-10-08 16:58 UTC (permalink / raw)
To: linux-mtd; +Cc: Huang Shijie, dedekind1
Hello Huang,
Can you please give an ACK for this?
Thanks,
Vikram
On 9/23/2012 3:18 PM, Vikram Narayanan wrote:
> Make the error messages more debugging friendly
>
> Signed-off-by: Vikram Narayanan<vikram186@gmail.com>
> Cc: Huang Shijie<b32955@freescale.com>
> ---
> drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 14 ++++++++------
> 1 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> index 5999b15..24fbfb8 100644
> --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> @@ -222,7 +222,7 @@ void prepare_data_dma(struct gpmi_nand_data *this, enum dma_data_direction dr)
>
> ret = dma_map_sg(this->dev, sgl, 1, dr);
> if (ret == 0)
> - pr_err("map failed.\n");
> + pr_err("DMA mapping failed.\n");
>
> this->direct_dma_map_ok = false;
> }
> @@ -456,7 +456,7 @@ static int __devinit acquire_dma_channels(struct gpmi_nand_data *this)
>
> dma_chan = dma_request_channel(mask, gpmi_dma_filter, this);
> if (!dma_chan) {
> - pr_err("dma_request_channel failed.\n");
> + pr_err("Failed to request DMA channel.\n");
> goto acquire_err;
> }
>
> @@ -630,7 +630,8 @@ static int read_page_prepare(struct gpmi_nand_data *this,
> length, DMA_FROM_DEVICE);
> if (dma_mapping_error(dev, dest_phys)) {
> if (alt_size< length) {
> - pr_err("Alternate buffer is too small\n");
> + pr_err("%s, Alternate buffer is too small\n",
> + __func__);
> return -ENOMEM;
> }
> goto map_failed;
> @@ -680,7 +681,8 @@ static int send_page_prepare(struct gpmi_nand_data *this,
> DMA_TO_DEVICE);
> if (dma_mapping_error(dev, source_phys)) {
> if (alt_size< length) {
> - pr_err("Alternate buffer is too small\n");
> + pr_err("%s, Alternate buffer is too small\n",
> + __func__);
> return -ENOMEM;
> }
> goto map_failed;
> @@ -768,7 +770,7 @@ static int gpmi_alloc_dma_buffer(struct gpmi_nand_data *this)
>
> error_alloc:
> gpmi_free_dma_buffer(this);
> - pr_err("allocate DMA buffer ret!!\n");
> + pr_err("Error allocating DMA buffers!\n");
> return -ENOMEM;
> }
>
> @@ -1479,7 +1481,7 @@ static int gpmi_set_geometry(struct gpmi_nand_data *this)
> /* Set up the NFC geometry which is used by BCH. */
> ret = bch_set_geometry(this);
> if (ret) {
> - pr_err("set geometry ret : %d\n", ret);
> + pr_err("Error setting BCH geometry : %d\n", ret);
> return ret;
> }
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] imx/gpmi: Make debug prints more clear
2012-10-08 16:58 ` Vikram Narayanan
@ 2012-10-09 1:43 ` Huang Shijie
0 siblings, 0 replies; 4+ messages in thread
From: Huang Shijie @ 2012-10-09 1:43 UTC (permalink / raw)
To: Vikram Narayanan; +Cc: linux-mtd, dedekind1
于 2012年10月09日 00:58, Vikram Narayanan 写道:
> Hello Huang,
>
> Can you please give an ACK for this?
>
> Thanks,
> Vikram
>
> On 9/23/2012 3:18 PM, Vikram Narayanan wrote:
>> Make the error messages more debugging friendly
>>
>> Signed-off-by: Vikram Narayanan<vikram186@gmail.com>
>> Cc: Huang Shijie<b32955@freescale.com>
>> ---
>> drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 14 ++++++++------
>> 1 files changed, 8 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
>> b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
>> index 5999b15..24fbfb8 100644
>> --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
>> +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
>> @@ -222,7 +222,7 @@ void prepare_data_dma(struct gpmi_nand_data
>> *this, enum dma_data_direction dr)
>>
>> ret = dma_map_sg(this->dev, sgl, 1, dr);
>> if (ret == 0)
>> - pr_err("map failed.\n");
>> + pr_err("DMA mapping failed.\n");
>>
>> this->direct_dma_map_ok = false;
>> }
>> @@ -456,7 +456,7 @@ static int __devinit acquire_dma_channels(struct
>> gpmi_nand_data *this)
>>
>> dma_chan = dma_request_channel(mask, gpmi_dma_filter, this);
>> if (!dma_chan) {
>> - pr_err("dma_request_channel failed.\n");
>> + pr_err("Failed to request DMA channel.\n");
>> goto acquire_err;
>> }
>>
>> @@ -630,7 +630,8 @@ static int read_page_prepare(struct
>> gpmi_nand_data *this,
>> length, DMA_FROM_DEVICE);
>> if (dma_mapping_error(dev, dest_phys)) {
>> if (alt_size< length) {
>> - pr_err("Alternate buffer is too small\n");
>> + pr_err("%s, Alternate buffer is too small\n",
>> + __func__);
>> return -ENOMEM;
>> }
>> goto map_failed;
>> @@ -680,7 +681,8 @@ static int send_page_prepare(struct
>> gpmi_nand_data *this,
>> DMA_TO_DEVICE);
>> if (dma_mapping_error(dev, source_phys)) {
>> if (alt_size< length) {
>> - pr_err("Alternate buffer is too small\n");
>> + pr_err("%s, Alternate buffer is too small\n",
>> + __func__);
>> return -ENOMEM;
>> }
>> goto map_failed;
>> @@ -768,7 +770,7 @@ static int gpmi_alloc_dma_buffer(struct
>> gpmi_nand_data *this)
>>
>> error_alloc:
>> gpmi_free_dma_buffer(this);
>> - pr_err("allocate DMA buffer ret!!\n");
>> + pr_err("Error allocating DMA buffers!\n");
>> return -ENOMEM;
>> }
>>
>> @@ -1479,7 +1481,7 @@ static int gpmi_set_geometry(struct
>> gpmi_nand_data *this)
>> /* Set up the NFC geometry which is used by BCH. */
>> ret = bch_set_geometry(this);
>> if (ret) {
>> - pr_err("set geometry ret : %d\n", ret);
>> + pr_err("Error setting BCH geometry : %d\n", ret);
>> return ret;
>> }
>>
>
>
thanks.
Acked-by: Huang Shijie <b32955@freescale.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] imx/gpmi: Make debug prints more clear
2012-09-23 9:48 [PATCH] imx/gpmi: Make debug prints more clear Vikram Narayanan
2012-10-08 16:58 ` Vikram Narayanan
@ 2012-10-10 12:48 ` Artem Bityutskiy
1 sibling, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2012-10-10 12:48 UTC (permalink / raw)
To: Vikram Narayanan; +Cc: Huang Shijie, linux-mtd
[-- Attachment #1: Type: text/plain, Size: 288 bytes --]
On Sun, 2012-09-23 at 15:18 +0530, Vikram Narayanan wrote:
> Make the error messages more debugging friendly
>
> Signed-off-by: Vikram Narayanan <vikram186@gmail.com>
> Cc: Huang Shijie <b32955@freescale.com>
Pushed to l2-mtd.git, thanks!
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-10-10 12:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-23 9:48 [PATCH] imx/gpmi: Make debug prints more clear Vikram Narayanan
2012-10-08 16:58 ` Vikram Narayanan
2012-10-09 1:43 ` Huang Shijie
2012-10-10 12:48 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox