dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [v1,3/4] dmaengine: hidma: Constify returned by device_get_match_data() value
@ 2018-01-31 21:27 Andy Shevchenko
  0 siblings, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2018-01-31 21:27 UTC (permalink / raw)
  To: dmaengine; +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] 4+ messages in thread
* [v1,3/4] dmaengine: hidma: Constify returned by device_get_match_data() value
@ 2018-01-31 21:29 Andy Shevchenko
  0 siblings, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2018-01-31 21:29 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] 4+ messages in thread
* [v1,3/4] dmaengine: hidma: Constify returned by device_get_match_data() value
@ 2018-02-03 17:16 kbuild test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2018-02-03 17:16 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: kbuild-all, dmaengine, Rafael J. Wysocki, linux-acpi, Sinan Kaya,
	Sakari Ailus, Vinod Koul

Hi Andy,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on next-20180202]
[cannot apply to pm/linux-next v4.15]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andy-Shevchenko/ACPI-bus-Remove-checks-in-acpi_get_match_data/20180204-000348
config: x86_64-randconfig-x014-201805 (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/dma/qcom/hidma.c: In function 'hidma_test_capability':
>> drivers/dma/qcom/hidma.c:748:6: error: assignment of read-only variable 'cap'
     cap = (const enum hidma_cap) device_get_match_data(dev);
         ^

vim +/cap +748 drivers/dma/qcom/hidma.c

   743	
   744	static bool hidma_test_capability(struct device *dev, enum hidma_cap test_cap)
   745	{
   746		const enum hidma_cap cap;
   747	
 > 748		cap = (const enum hidma_cap) device_get_match_data(dev);
   749		return cap ? ((cap & test_cap) > 0) : 0;
   750	}
   751
---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [v1,3/4] dmaengine: hidma: Constify returned by device_get_match_data() value
@ 2018-02-11  3:48 kbuild test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2018-02-11  3:48 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: kbuild-all, dmaengine, Sinan Kaya, Sakari Ailus, Vinod Koul

Hi Andy,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on next-20180209]
[cannot apply to pm/linux-next v4.15]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andy-Shevchenko/ACPI-bus-Remove-checks-in-acpi_get_match_data/20180204-003119
config: x86_64-randconfig-u0-02111037 (attached as .config)
compiler: gcc-5 (Debian 5.5.0-3) 5.4.1 20171010
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/dma/qcom/hidma.c: In function 'hidma_test_capability':
>> drivers/dma/qcom/hidma.c:748:6: error: assignment of read-only variable 'cap'
     cap = (const enum hidma_cap) device_get_match_data(dev);
         ^

vim +/cap +748 drivers/dma/qcom/hidma.c

   743	
   744	static bool hidma_test_capability(struct device *dev, enum hidma_cap test_cap)
   745	{
   746		const enum hidma_cap cap;
   747	
 > 748		cap = (const enum hidma_cap) device_get_match_data(dev);
   749		return cap ? ((cap & test_cap) > 0) : 0;
   750	}
   751
---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

end of thread, other threads:[~2018-02-11  3:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-31 21:27 [v1,3/4] dmaengine: hidma: Constify returned by device_get_match_data() value Andy Shevchenko
  -- strict thread matches above, loose matches on Subject: below --
2018-01-31 21:29 Andy Shevchenko
2018-02-03 17:16 kbuild test robot
2018-02-11  3:48 kbuild test robot

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).