dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [v2,5/6] dmaengine: hidma: Constify returned by device_get_match_data() value
@ 2018-02-01 20:20 Andy Shevchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2018-02-01 20:20 UTC (permalink / raw)
  To: dmaengine, Rafael J . Wysocki, linux-acpi
  Cc: Andy Shevchenko, Sinan Kaya, Sakari Ailus, Vinod Koul

The value under the hood is constant in any case.
It makes sense to show this explicitly.

Fixes: 95fbfb7aa28d ("dmaengine: qcom_hidma: Add support for the new revision")
Cc: Sinan Kaya <okaya@codeaurora.org>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/dma/qcom/hidma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c
index 963cc5228d05..24e163cefb7c 100644
--- a/drivers/dma/qcom/hidma.c
+++ b/drivers/dma/qcom/hidma.c
@@ -743,9 +743,9 @@ static int hidma_request_msi(struct hidma_dev *dmadev,
 
 static bool hidma_test_capability(struct device *dev, enum hidma_cap test_cap)
 {
-	enum hidma_cap cap;
+	const enum hidma_cap cap;
 
-	cap = (enum hidma_cap) device_get_match_data(dev);
+	cap = (const enum hidma_cap) device_get_match_data(dev);
 	return cap ? ((cap & test_cap) > 0) : 0;
 }
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [v2,5/6] dmaengine: hidma: Constify returned by device_get_match_data() value
@ 2018-02-04 14:06 Andy Shevchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2018-02-04 14:06 UTC (permalink / raw)
  To: dmaengine, Rafael J . Wysocki, linux-acpi
  Cc: Sinan Kaya, Sakari Ailus, Vinod Koul

On Thu, 2018-02-01 at 22:20 +0200, Andy Shevchenko wrote:
> The value under the hood is constant in any case.
> It makes sense to show this explicitly.
> 

This patch is wrong, sorry.

> Fixes: 95fbfb7aa28d ("dmaengine: qcom_hidma: Add support for the new
> revision")
> Cc: Sinan Kaya <okaya@codeaurora.org>
> Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
> Cc: Vinod Koul <vinod.koul@intel.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/dma/qcom/hidma.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c
> index 963cc5228d05..24e163cefb7c 100644
> --- a/drivers/dma/qcom/hidma.c
> +++ b/drivers/dma/qcom/hidma.c
> @@ -743,9 +743,9 @@ static int hidma_request_msi(struct hidma_dev
> *dmadev,
>  
>  static bool hidma_test_capability(struct device *dev, enum hidma_cap
> test_cap)
>  {
> -	enum hidma_cap cap;
> +	const enum hidma_cap cap;
>  
> -	cap = (enum hidma_cap) device_get_match_data(dev);
> +	cap = (const enum hidma_cap) device_get_match_data(dev);
>  	return cap ? ((cap & test_cap) > 0) : 0;
>  }
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-02-04 14:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-01 20:20 [v2,5/6] dmaengine: hidma: Constify returned by device_get_match_data() value Andy Shevchenko
  -- strict thread matches above, loose matches on Subject: below --
2018-02-04 14:06 Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).