* [PATCH] mtd: nand: gpmi: fixup return type of wait_for_completion_timeout
@ 2015-02-08 16:37 ` Nicholas Mc Guire
0 siblings, 0 replies; 8+ messages in thread
From: Nicholas Mc Guire @ 2015-02-08 16:37 UTC (permalink / raw)
To: David Woodhouse
Cc: Brian Norris, Huang Shijie, Boris BREZILLON, Fabio Estevam,
linux-mtd, linux-kernel, Nicholas Mc Guire
return type of wait_for_completion_timeout is unsigned long not int. The
return variable is renamed to reflect its use and the type adjusted to
unsigned long.
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
---
Patch was only compile tested with imx_v6_v7_defconfig
(implies CONFIG_MTD_NAND_GPMI_NAND=y)
Patch is against 3.19.0-rc7 (localversion-next is -next-20150204)
drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
index 33f3c3c..6e44d32 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
@@ -446,7 +446,7 @@ int start_dma_without_bch_irq(struct gpmi_nand_data *this,
struct dma_async_tx_descriptor *desc)
{
struct completion *dma_c = &this->dma_done;
- int err;
+ unsigned long timeout;
init_completion(dma_c);
@@ -456,8 +456,8 @@ int start_dma_without_bch_irq(struct gpmi_nand_data *this,
dma_async_issue_pending(get_dma_chan(this));
/* Wait for the interrupt from the DMA block. */
- err = wait_for_completion_timeout(dma_c, msecs_to_jiffies(1000));
- if (!err) {
+ timeout = wait_for_completion_timeout(dma_c, msecs_to_jiffies(1000));
+ if (!timeout) {
dev_err(this->dev, "DMA timeout, last DMA :%d\n",
this->last_dma_type);
gpmi_dump_info(this);
@@ -477,7 +477,7 @@ int start_dma_with_bch_irq(struct gpmi_nand_data *this,
struct dma_async_tx_descriptor *desc)
{
struct completion *bch_c = &this->bch_done;
- int err;
+ unsigned long timeout;
/* Prepare to receive an interrupt from the BCH block. */
init_completion(bch_c);
@@ -486,8 +486,8 @@ int start_dma_with_bch_irq(struct gpmi_nand_data *this,
start_dma_without_bch_irq(this, desc);
/* Wait for the interrupt from the BCH block. */
- err = wait_for_completion_timeout(bch_c, msecs_to_jiffies(1000));
- if (!err) {
+ timeout = wait_for_completion_timeout(bch_c, msecs_to_jiffies(1000));
+ if (!timeout) {
dev_err(this->dev, "BCH timeout, last DMA :%d\n",
this->last_dma_type);
gpmi_dump_info(this);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] mtd: nand: gpmi: fixup return type of wait_for_completion_timeout
@ 2015-02-08 16:37 ` Nicholas Mc Guire
0 siblings, 0 replies; 8+ messages in thread
From: Nicholas Mc Guire @ 2015-02-08 16:37 UTC (permalink / raw)
To: David Woodhouse
Cc: Fabio Estevam, Boris BREZILLON, linux-kernel, Huang Shijie,
linux-mtd, Nicholas Mc Guire, Brian Norris
return type of wait_for_completion_timeout is unsigned long not int. The
return variable is renamed to reflect its use and the type adjusted to
unsigned long.
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
---
Patch was only compile tested with imx_v6_v7_defconfig
(implies CONFIG_MTD_NAND_GPMI_NAND=y)
Patch is against 3.19.0-rc7 (localversion-next is -next-20150204)
drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
index 33f3c3c..6e44d32 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
@@ -446,7 +446,7 @@ int start_dma_without_bch_irq(struct gpmi_nand_data *this,
struct dma_async_tx_descriptor *desc)
{
struct completion *dma_c = &this->dma_done;
- int err;
+ unsigned long timeout;
init_completion(dma_c);
@@ -456,8 +456,8 @@ int start_dma_without_bch_irq(struct gpmi_nand_data *this,
dma_async_issue_pending(get_dma_chan(this));
/* Wait for the interrupt from the DMA block. */
- err = wait_for_completion_timeout(dma_c, msecs_to_jiffies(1000));
- if (!err) {
+ timeout = wait_for_completion_timeout(dma_c, msecs_to_jiffies(1000));
+ if (!timeout) {
dev_err(this->dev, "DMA timeout, last DMA :%d\n",
this->last_dma_type);
gpmi_dump_info(this);
@@ -477,7 +477,7 @@ int start_dma_with_bch_irq(struct gpmi_nand_data *this,
struct dma_async_tx_descriptor *desc)
{
struct completion *bch_c = &this->bch_done;
- int err;
+ unsigned long timeout;
/* Prepare to receive an interrupt from the BCH block. */
init_completion(bch_c);
@@ -486,8 +486,8 @@ int start_dma_with_bch_irq(struct gpmi_nand_data *this,
start_dma_without_bch_irq(this, desc);
/* Wait for the interrupt from the BCH block. */
- err = wait_for_completion_timeout(bch_c, msecs_to_jiffies(1000));
- if (!err) {
+ timeout = wait_for_completion_timeout(bch_c, msecs_to_jiffies(1000));
+ if (!timeout) {
dev_err(this->dev, "BCH timeout, last DMA :%d\n",
this->last_dma_type);
gpmi_dump_info(this);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] mtd: nand: gpmi: fixup return type of wait_for_completion_timeout
2015-02-08 16:37 ` Nicholas Mc Guire
@ 2015-02-08 17:58 ` Boris Brezillon
-1 siblings, 0 replies; 8+ messages in thread
From: Boris Brezillon @ 2015-02-08 17:58 UTC (permalink / raw)
To: Nicholas Mc Guire
Cc: David Woodhouse, Brian Norris, Huang Shijie, Fabio Estevam,
linux-mtd, linux-kernel
On Sun, 8 Feb 2015 11:37:33 -0500
Nicholas Mc Guire <hofrat@osadl.org> wrote:
> return type of wait_for_completion_timeout is unsigned long not int. The
> return variable is renamed to reflect its use and the type adjusted to
> unsigned long.
>
> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> ---
>
> Patch was only compile tested with imx_v6_v7_defconfig
> (implies CONFIG_MTD_NAND_GPMI_NAND=y)
>
> Patch is against 3.19.0-rc7 (localversion-next is -next-20150204)
>
> drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> index 33f3c3c..6e44d32 100644
> --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> @@ -446,7 +446,7 @@ int start_dma_without_bch_irq(struct gpmi_nand_data *this,
> struct dma_async_tx_descriptor *desc)
> {
> struct completion *dma_c = &this->dma_done;
> - int err;
> + unsigned long timeout;
>
> init_completion(dma_c);
>
> @@ -456,8 +456,8 @@ int start_dma_without_bch_irq(struct gpmi_nand_data *this,
> dma_async_issue_pending(get_dma_chan(this));
>
> /* Wait for the interrupt from the DMA block. */
> - err = wait_for_completion_timeout(dma_c, msecs_to_jiffies(1000));
> - if (!err) {
> + timeout = wait_for_completion_timeout(dma_c, msecs_to_jiffies(1000));
> + if (!timeout) {
> dev_err(this->dev, "DMA timeout, last DMA :%d\n",
> this->last_dma_type);
> gpmi_dump_info(this);
> @@ -477,7 +477,7 @@ int start_dma_with_bch_irq(struct gpmi_nand_data *this,
> struct dma_async_tx_descriptor *desc)
> {
> struct completion *bch_c = &this->bch_done;
> - int err;
> + unsigned long timeout;
>
> /* Prepare to receive an interrupt from the BCH block. */
> init_completion(bch_c);
> @@ -486,8 +486,8 @@ int start_dma_with_bch_irq(struct gpmi_nand_data *this,
> start_dma_without_bch_irq(this, desc);
>
> /* Wait for the interrupt from the BCH block. */
> - err = wait_for_completion_timeout(bch_c, msecs_to_jiffies(1000));
> - if (!err) {
> + timeout = wait_for_completion_timeout(bch_c, msecs_to_jiffies(1000));
> + if (!timeout) {
> dev_err(this->dev, "BCH timeout, last DMA :%d\n",
> this->last_dma_type);
> gpmi_dump_info(this);
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mtd: nand: gpmi: fixup return type of wait_for_completion_timeout
@ 2015-02-08 17:58 ` Boris Brezillon
0 siblings, 0 replies; 8+ messages in thread
From: Boris Brezillon @ 2015-02-08 17:58 UTC (permalink / raw)
To: Nicholas Mc Guire
Cc: Fabio Estevam, linux-kernel, Huang Shijie, linux-mtd,
Brian Norris, David Woodhouse
On Sun, 8 Feb 2015 11:37:33 -0500
Nicholas Mc Guire <hofrat@osadl.org> wrote:
> return type of wait_for_completion_timeout is unsigned long not int. The
> return variable is renamed to reflect its use and the type adjusted to
> unsigned long.
>
> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> ---
>
> Patch was only compile tested with imx_v6_v7_defconfig
> (implies CONFIG_MTD_NAND_GPMI_NAND=y)
>
> Patch is against 3.19.0-rc7 (localversion-next is -next-20150204)
>
> drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> index 33f3c3c..6e44d32 100644
> --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> @@ -446,7 +446,7 @@ int start_dma_without_bch_irq(struct gpmi_nand_data *this,
> struct dma_async_tx_descriptor *desc)
> {
> struct completion *dma_c = &this->dma_done;
> - int err;
> + unsigned long timeout;
>
> init_completion(dma_c);
>
> @@ -456,8 +456,8 @@ int start_dma_without_bch_irq(struct gpmi_nand_data *this,
> dma_async_issue_pending(get_dma_chan(this));
>
> /* Wait for the interrupt from the DMA block. */
> - err = wait_for_completion_timeout(dma_c, msecs_to_jiffies(1000));
> - if (!err) {
> + timeout = wait_for_completion_timeout(dma_c, msecs_to_jiffies(1000));
> + if (!timeout) {
> dev_err(this->dev, "DMA timeout, last DMA :%d\n",
> this->last_dma_type);
> gpmi_dump_info(this);
> @@ -477,7 +477,7 @@ int start_dma_with_bch_irq(struct gpmi_nand_data *this,
> struct dma_async_tx_descriptor *desc)
> {
> struct completion *bch_c = &this->bch_done;
> - int err;
> + unsigned long timeout;
>
> /* Prepare to receive an interrupt from the BCH block. */
> init_completion(bch_c);
> @@ -486,8 +486,8 @@ int start_dma_with_bch_irq(struct gpmi_nand_data *this,
> start_dma_without_bch_irq(this, desc);
>
> /* Wait for the interrupt from the BCH block. */
> - err = wait_for_completion_timeout(bch_c, msecs_to_jiffies(1000));
> - if (!err) {
> + timeout = wait_for_completion_timeout(bch_c, msecs_to_jiffies(1000));
> + if (!timeout) {
> dev_err(this->dev, "BCH timeout, last DMA :%d\n",
> this->last_dma_type);
> gpmi_dump_info(this);
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mtd: nand: gpmi: fixup return type of wait_for_completion_timeout
2015-02-08 16:37 ` Nicholas Mc Guire
@ 2015-02-10 4:01 ` Huang Shijie
-1 siblings, 0 replies; 8+ messages in thread
From: Huang Shijie @ 2015-02-10 4:01 UTC (permalink / raw)
To: Nicholas Mc Guire
Cc: David Woodhouse, Fabio Estevam, Boris BREZILLON, linux-kernel,
Huang Shijie, linux-mtd, Brian Norris
On Sun, Feb 08, 2015 at 11:37:33AM -0500, Nicholas Mc Guire wrote:
> return type of wait_for_completion_timeout is unsigned long not int. The
> return variable is renamed to reflect its use and the type adjusted to
> unsigned long.
>
> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Acked-by: Huang Shijie <shijie.huang@intel.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mtd: nand: gpmi: fixup return type of wait_for_completion_timeout
@ 2015-02-10 4:01 ` Huang Shijie
0 siblings, 0 replies; 8+ messages in thread
From: Huang Shijie @ 2015-02-10 4:01 UTC (permalink / raw)
To: Nicholas Mc Guire
Cc: Fabio Estevam, Boris BREZILLON, linux-kernel, Huang Shijie,
linux-mtd, Brian Norris, David Woodhouse
On Sun, Feb 08, 2015 at 11:37:33AM -0500, Nicholas Mc Guire wrote:
> return type of wait_for_completion_timeout is unsigned long not int. The
> return variable is renamed to reflect its use and the type adjusted to
> unsigned long.
>
> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Acked-by: Huang Shijie <shijie.huang@intel.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mtd: nand: gpmi: fixup return type of wait_for_completion_timeout
2015-02-08 16:37 ` Nicholas Mc Guire
@ 2015-03-31 1:13 ` Brian Norris
-1 siblings, 0 replies; 8+ messages in thread
From: Brian Norris @ 2015-03-31 1:13 UTC (permalink / raw)
To: Nicholas Mc Guire
Cc: David Woodhouse, Boris BREZILLON, Fabio Estevam, linux-mtd,
linux-kernel, Huang Shijie
On Sun, Feb 08, 2015 at 11:37:33AM -0500, Nicholas Mc Guire wrote:
> return type of wait_for_completion_timeout is unsigned long not int. The
> return variable is renamed to reflect its use and the type adjusted to
> unsigned long.
>
> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Pushed to l2-mtd.git.
Brian
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mtd: nand: gpmi: fixup return type of wait_for_completion_timeout
@ 2015-03-31 1:13 ` Brian Norris
0 siblings, 0 replies; 8+ messages in thread
From: Brian Norris @ 2015-03-31 1:13 UTC (permalink / raw)
To: Nicholas Mc Guire
Cc: Fabio Estevam, Boris BREZILLON, linux-kernel, linux-mtd,
Huang Shijie, David Woodhouse
On Sun, Feb 08, 2015 at 11:37:33AM -0500, Nicholas Mc Guire wrote:
> return type of wait_for_completion_timeout is unsigned long not int. The
> return variable is renamed to reflect its use and the type adjusted to
> unsigned long.
>
> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Pushed to l2-mtd.git.
Brian
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-03-31 1:14 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-08 16:37 [PATCH] mtd: nand: gpmi: fixup return type of wait_for_completion_timeout Nicholas Mc Guire
2015-02-08 16:37 ` Nicholas Mc Guire
2015-02-08 17:58 ` Boris Brezillon
2015-02-08 17:58 ` Boris Brezillon
2015-02-10 4:01 ` Huang Shijie
2015-02-10 4:01 ` Huang Shijie
2015-03-31 1:13 ` Brian Norris
2015-03-31 1:13 ` Brian Norris
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.