Re: [PATCH 1/2] spi: spi-geni-qcom: fix nitpicks

2018-11-03 Thread Stephen Boyd
Quoting Alok Chauhan (2018-10-25 09:40:28)
> fixed the nitpicks.

Agree with Doug, this commit text needs work.

> 
> Signed-off-by: Alok Chauhan 
> ---

Code is fine though.

Reviewed-by: Stephen Boyd 



Re: [PATCH 1/2] spi: spi-geni-qcom: fix nitpicks

2018-11-03 Thread Stephen Boyd
Quoting Alok Chauhan (2018-10-25 09:40:28)
> fixed the nitpicks.

Agree with Doug, this commit text needs work.

> 
> Signed-off-by: Alok Chauhan 
> ---

Code is fine though.

Reviewed-by: Stephen Boyd 



Re: [PATCH 1/2] spi: spi-geni-qcom: fix nitpicks

2018-10-25 Thread Doug Anderson
Hi,
On Thu, Oct 25, 2018 at 9:40 AM Alok Chauhan  wrote:
>
> fixed the nitpicks.

I probably would have put more a proper sentence, like:

Fixed small nits that were pointed out on the mailing list.  No
functional change expected.

...but I guess it's up to Mark if he cares.


> @@ -533,7 +530,7 @@ static irqreturn_t geni_spi_isr(int irq, void *data)
>
> writel(m_irq, se->base + SE_GENI_M_IRQ_CLEAR);
> spin_unlock_irqrestore(>lock, flags);
> -   return ret;
> +   return IRQ_HANDLED;

I probably would have put a blank line before the return while I was
at it, but it's not a big deal to me.

Thanks for following up.

Reviewed-by: Douglas Anderson 


Re: [PATCH 1/2] spi: spi-geni-qcom: fix nitpicks

2018-10-25 Thread Doug Anderson
Hi,
On Thu, Oct 25, 2018 at 9:40 AM Alok Chauhan  wrote:
>
> fixed the nitpicks.

I probably would have put more a proper sentence, like:

Fixed small nits that were pointed out on the mailing list.  No
functional change expected.

...but I guess it's up to Mark if he cares.


> @@ -533,7 +530,7 @@ static irqreturn_t geni_spi_isr(int irq, void *data)
>
> writel(m_irq, se->base + SE_GENI_M_IRQ_CLEAR);
> spin_unlock_irqrestore(>lock, flags);
> -   return ret;
> +   return IRQ_HANDLED;

I probably would have put a blank line before the return while I was
at it, but it's not a big deal to me.

Thanks for following up.

Reviewed-by: Douglas Anderson 


[PATCH 1/2] spi: spi-geni-qcom: fix nitpicks

2018-10-25 Thread Alok Chauhan
fixed the nitpicks.

Signed-off-by: Alok Chauhan 
---
 drivers/spi/spi-geni-qcom.c | 15 ++-
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c
index 6432ecc..d1830fb 100644
--- a/drivers/spi/spi-geni-qcom.c
+++ b/drivers/spi/spi-geni-qcom.c
@@ -64,15 +64,13 @@
 #define TIMESTAMP_AFTERBIT(3)
 #define POST_CMD_DELAY BIT(4)
 
-/* SPI M_COMMAND OPCODE */
-enum spi_mcmd_code {
+enum spi_m_cmd_opcode {
CMD_NONE,
CMD_XFER,
CMD_CS,
CMD_CANCEL,
 };
 
-
 struct spi_geni_master {
struct geni_se se;
struct device *dev;
@@ -87,7 +85,7 @@ struct spi_geni_master {
struct completion xfer_done;
unsigned int oversampling;
spinlock_t lock;
-   unsigned int cur_mcmd;
+   enum spi_m_cmd_opcode cur_mcmd;
int irq;
 };
 
@@ -129,7 +127,7 @@ static void spi_geni_set_cs(struct spi_device *slv, bool 
set_flag)
struct spi_geni_master *mas = spi_master_get_devdata(slv->master);
struct spi_master *spi = dev_get_drvdata(mas->dev);
struct geni_se *se = >se;
-   unsigned long timeout;
+   unsigned long time_left;
 
reinit_completion(>xfer_done);
pm_runtime_get_sync(mas->dev);
@@ -142,8 +140,8 @@ static void spi_geni_set_cs(struct spi_device *slv, bool 
set_flag)
else
geni_se_setup_m_cmd(se, SPI_CS_DEASSERT, 0);
 
-   timeout = wait_for_completion_timeout(>xfer_done, HZ);
-   if (!timeout)
+   time_left = wait_for_completion_timeout(>xfer_done, HZ);
+   if (!time_left)
handle_fifo_timeout(spi, NULL);
 
pm_runtime_put(mas->dev);
@@ -485,7 +483,6 @@ static irqreturn_t geni_spi_isr(int irq, void *data)
struct geni_se *se = >se;
u32 m_irq;
unsigned long flags;
-   irqreturn_t ret = IRQ_HANDLED;
 
if (mas->cur_mcmd == CMD_NONE)
return IRQ_NONE;
@@ -533,7 +530,7 @@ static irqreturn_t geni_spi_isr(int irq, void *data)
 
writel(m_irq, se->base + SE_GENI_M_IRQ_CLEAR);
spin_unlock_irqrestore(>lock, flags);
-   return ret;
+   return IRQ_HANDLED;
 }
 
 static int spi_geni_probe(struct platform_device *pdev)
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project



[PATCH 1/2] spi: spi-geni-qcom: fix nitpicks

2018-10-25 Thread Alok Chauhan
fixed the nitpicks.

Signed-off-by: Alok Chauhan 
---
 drivers/spi/spi-geni-qcom.c | 15 ++-
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c
index 6432ecc..d1830fb 100644
--- a/drivers/spi/spi-geni-qcom.c
+++ b/drivers/spi/spi-geni-qcom.c
@@ -64,15 +64,13 @@
 #define TIMESTAMP_AFTERBIT(3)
 #define POST_CMD_DELAY BIT(4)
 
-/* SPI M_COMMAND OPCODE */
-enum spi_mcmd_code {
+enum spi_m_cmd_opcode {
CMD_NONE,
CMD_XFER,
CMD_CS,
CMD_CANCEL,
 };
 
-
 struct spi_geni_master {
struct geni_se se;
struct device *dev;
@@ -87,7 +85,7 @@ struct spi_geni_master {
struct completion xfer_done;
unsigned int oversampling;
spinlock_t lock;
-   unsigned int cur_mcmd;
+   enum spi_m_cmd_opcode cur_mcmd;
int irq;
 };
 
@@ -129,7 +127,7 @@ static void spi_geni_set_cs(struct spi_device *slv, bool 
set_flag)
struct spi_geni_master *mas = spi_master_get_devdata(slv->master);
struct spi_master *spi = dev_get_drvdata(mas->dev);
struct geni_se *se = >se;
-   unsigned long timeout;
+   unsigned long time_left;
 
reinit_completion(>xfer_done);
pm_runtime_get_sync(mas->dev);
@@ -142,8 +140,8 @@ static void spi_geni_set_cs(struct spi_device *slv, bool 
set_flag)
else
geni_se_setup_m_cmd(se, SPI_CS_DEASSERT, 0);
 
-   timeout = wait_for_completion_timeout(>xfer_done, HZ);
-   if (!timeout)
+   time_left = wait_for_completion_timeout(>xfer_done, HZ);
+   if (!time_left)
handle_fifo_timeout(spi, NULL);
 
pm_runtime_put(mas->dev);
@@ -485,7 +483,6 @@ static irqreturn_t geni_spi_isr(int irq, void *data)
struct geni_se *se = >se;
u32 m_irq;
unsigned long flags;
-   irqreturn_t ret = IRQ_HANDLED;
 
if (mas->cur_mcmd == CMD_NONE)
return IRQ_NONE;
@@ -533,7 +530,7 @@ static irqreturn_t geni_spi_isr(int irq, void *data)
 
writel(m_irq, se->base + SE_GENI_M_IRQ_CLEAR);
spin_unlock_irqrestore(>lock, flags);
-   return ret;
+   return IRQ_HANDLED;
 }
 
 static int spi_geni_probe(struct platform_device *pdev)
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project