linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] device property: Unify access to of_node
@ 2021-06-04 13:13 Andy Shevchenko
  2021-06-04 13:25 ` Greg Kroah-Hartman
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Andy Shevchenko @ 2021-06-04 13:13 UTC (permalink / raw)
  To: Andy Shevchenko, Greg Kroah-Hartman, linux-kernel
  Cc: Rafael J. Wysocki, linux-acpi

Historically we have a few variants how we access dev->fwnode
and dev->of_node. Some of the functions during development
gained different versions of the getters. Unify access to of_node
and as a side change slightly refactor ACPI specific branches.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/base/property.c  | 29 +++++++++++++----------------
 include/linux/property.h |  2 +-
 2 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/drivers/base/property.c b/drivers/base/property.c
index c26370aacdc6..d0874f6c29bb 100644
--- a/drivers/base/property.c
+++ b/drivers/base/property.c
@@ -759,13 +759,8 @@ EXPORT_SYMBOL_GPL(fwnode_get_next_available_child_node);
 struct fwnode_handle *device_get_next_child_node(struct device *dev,
 						 struct fwnode_handle *child)
 {
-	struct acpi_device *adev = ACPI_COMPANION(dev);
-	struct fwnode_handle *fwnode = NULL, *next;
-
-	if (dev->of_node)
-		fwnode = of_fwnode_handle(dev->of_node);
-	else if (adev)
-		fwnode = acpi_fwnode_handle(adev);
+	const struct fwnode_handle *fwnode = dev_fwnode(dev);
+	struct fwnode_handle *next;
 
 	/* Try to find a child in primary fwnode */
 	next = fwnode_get_next_child_node(fwnode, child);
@@ -868,28 +863,31 @@ EXPORT_SYMBOL_GPL(device_get_child_node_count);
 
 bool device_dma_supported(struct device *dev)
 {
+	const struct fwnode_handle *fwnode = dev_fwnode(dev);
+
 	/* For DT, this is always supported.
 	 * For ACPI, this depends on CCA, which
 	 * is determined by the acpi_dma_supported().
 	 */
-	if (IS_ENABLED(CONFIG_OF) && dev->of_node)
+	if (is_of_node(fwnode))
 		return true;
 
-	return acpi_dma_supported(ACPI_COMPANION(dev));
+	return acpi_dma_supported(to_acpi_device_node(fwnode));
 }
 EXPORT_SYMBOL_GPL(device_dma_supported);
 
 enum dev_dma_attr device_get_dma_attr(struct device *dev)
 {
+	const struct fwnode_handle *fwnode = dev_fwnode(dev);
 	enum dev_dma_attr attr = DEV_DMA_NOT_SUPPORTED;
 
-	if (IS_ENABLED(CONFIG_OF) && dev->of_node) {
-		if (of_dma_is_coherent(dev->of_node))
+	if (is_of_node(fwnode)) {
+		if (of_dma_is_coherent(to_of_node(fwnode)))
 			attr = DEV_DMA_COHERENT;
 		else
 			attr = DEV_DMA_NON_COHERENT;
 	} else
-		attr = acpi_get_dma_attr(ACPI_COMPANION(dev));
+		attr = acpi_get_dma_attr(to_acpi_device_node(fwnode));
 
 	return attr;
 }
@@ -1007,14 +1005,13 @@ EXPORT_SYMBOL(device_get_mac_address);
  * Returns Linux IRQ number on success. Other values are determined
  * accordingly to acpi_/of_ irq_get() operation.
  */
-int fwnode_irq_get(struct fwnode_handle *fwnode, unsigned int index)
+int fwnode_irq_get(const struct fwnode_handle *fwnode, unsigned int index)
 {
-	struct device_node *of_node = to_of_node(fwnode);
 	struct resource res;
 	int ret;
 
-	if (IS_ENABLED(CONFIG_OF) && of_node)
-		return of_irq_get(of_node, index);
+	if (is_of_node(fwnode))
+		return of_irq_get(to_of_node(fwnode), index);
 
 	ret = acpi_irq_get(ACPI_HANDLE_FWNODE(fwnode), index, &res);
 	if (ret)
diff --git a/include/linux/property.h b/include/linux/property.h
index 0d876316e61d..073e680c35e2 100644
--- a/include/linux/property.h
+++ b/include/linux/property.h
@@ -119,7 +119,7 @@ struct fwnode_handle *device_get_named_child_node(struct device *dev,
 struct fwnode_handle *fwnode_handle_get(struct fwnode_handle *fwnode);
 void fwnode_handle_put(struct fwnode_handle *fwnode);
 
-int fwnode_irq_get(struct fwnode_handle *fwnode, unsigned int index);
+int fwnode_irq_get(const struct fwnode_handle *fwnode, unsigned int index);
 
 unsigned int device_get_child_node_count(struct device *dev);
 
-- 
2.30.2


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

* Re: [PATCH v1 1/1] device property: Unify access to of_node
  2021-06-04 13:13 [PATCH v1 1/1] device property: Unify access to of_node Andy Shevchenko
@ 2021-06-04 13:25 ` Greg Kroah-Hartman
  2021-06-04 14:55 ` kernel test robot
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Greg Kroah-Hartman @ 2021-06-04 13:25 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-kernel, Rafael J. Wysocki, linux-acpi

On Fri, Jun 04, 2021 at 04:13:43PM +0300, Andy Shevchenko wrote:
> Historically we have a few variants how we access dev->fwnode
> and dev->of_node. Some of the functions during development
> gained different versions of the getters. Unify access to of_node
> and as a side change slightly refactor ACPI specific branches.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/base/property.c  | 29 +++++++++++++----------------
>  include/linux/property.h |  2 +-
>  2 files changed, 14 insertions(+), 17 deletions(-)

Less code and const structures are always a win.  If I get an ack from
Rafael I will merge this in my tree.

thanks,
greg k-h

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

* Re: [PATCH v1 1/1] device property: Unify access to of_node
  2021-06-04 13:13 [PATCH v1 1/1] device property: Unify access to of_node Andy Shevchenko
  2021-06-04 13:25 ` Greg Kroah-Hartman
@ 2021-06-04 14:55 ` kernel test robot
  2021-06-04 15:55   ` Andy Shevchenko
  2021-06-04 16:14 ` kernel test robot
  2021-06-04 17:29 ` kernel test robot
  3 siblings, 1 reply; 7+ messages in thread
From: kernel test robot @ 2021-06-04 14:55 UTC (permalink / raw)
  To: Andy Shevchenko, Greg Kroah-Hartman, linux-kernel
  Cc: kbuild-all, Rafael J. Wysocki, linux-acpi

[-- Attachment #1: Type: text/plain, Size: 3573 bytes --]

Hi Andy,

I love your patch! Perhaps something to improve:

[auto build test WARNING on next-20210604]
[cannot apply to driver-core/driver-core-testing linux/master linus/master v5.13-rc4 v5.13-rc3 v5.13-rc2 v5.13-rc4]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Andy-Shevchenko/device-property-Unify-access-to-of_node/20210604-211443
base:    ccc252d2e818f6a479441119ad453c3ce7c7c461
config: csky-randconfig-r024-20210604 (attached as .config)
compiler: csky-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/dfc2a97acf9b5c5ba11d180bf411721f723a9042
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Andy-Shevchenko/device-property-Unify-access-to-of_node/20210604-211443
        git checkout dfc2a97acf9b5c5ba11d180bf411721f723a9042
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=csky 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/base/property.c: In function 'device_dma_supported':
>> drivers/base/property.c:875:48: warning: passing argument 1 of 'to_acpi_device_node' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     875 |  return acpi_dma_supported(to_acpi_device_node(fwnode));
         |                                                ^~~~~~
   In file included from drivers/base/property.c:10:
   include/linux/acpi.h:768:77: note: expected 'struct fwnode_handle *' but argument is of type 'const struct fwnode_handle *'
     768 | static inline struct acpi_device *to_acpi_device_node(struct fwnode_handle *fwnode)
         |                                                       ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
   drivers/base/property.c: In function 'device_get_dma_attr':
   drivers/base/property.c:890:48: warning: passing argument 1 of 'to_acpi_device_node' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     890 |   attr = acpi_get_dma_attr(to_acpi_device_node(fwnode));
         |                                                ^~~~~~
   In file included from drivers/base/property.c:10:
   include/linux/acpi.h:768:77: note: expected 'struct fwnode_handle *' but argument is of type 'const struct fwnode_handle *'
     768 | static inline struct acpi_device *to_acpi_device_node(struct fwnode_handle *fwnode)
         |                                                       ~~~~~~~~~~~~~~~~~~~~~~^~~~~~


vim +875 drivers/base/property.c

   863	
   864	bool device_dma_supported(struct device *dev)
   865	{
   866		const struct fwnode_handle *fwnode = dev_fwnode(dev);
   867	
   868		/* For DT, this is always supported.
   869		 * For ACPI, this depends on CCA, which
   870		 * is determined by the acpi_dma_supported().
   871		 */
   872		if (is_of_node(fwnode))
   873			return true;
   874	
 > 875		return acpi_dma_supported(to_acpi_device_node(fwnode));
   876	}
   877	EXPORT_SYMBOL_GPL(device_dma_supported);
   878	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33882 bytes --]

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

* Re: [PATCH v1 1/1] device property: Unify access to of_node
  2021-06-04 14:55 ` kernel test robot
@ 2021-06-04 15:55   ` Andy Shevchenko
  0 siblings, 0 replies; 7+ messages in thread
From: Andy Shevchenko @ 2021-06-04 15:55 UTC (permalink / raw)
  To: kernel test robot
  Cc: Greg Kroah-Hartman, linux-kernel, kbuild-all, Rafael J. Wysocki,
	linux-acpi

On Fri, Jun 04, 2021 at 10:55:05PM +0800, kernel test robot wrote:
> Hi Andy,
> 
> I love your patch! Perhaps something to improve:

Definitely. Thanks for report!

> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>):
> 
>    drivers/base/property.c: In function 'device_dma_supported':
> >> drivers/base/property.c:875:48: warning: passing argument 1 of 'to_acpi_device_node' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
>      875 |  return acpi_dma_supported(to_acpi_device_node(fwnode));
>          |                                                ^~~~~~
>    In file included from drivers/base/property.c:10:
>    include/linux/acpi.h:768:77: note: expected 'struct fwnode_handle *' but argument is of type 'const struct fwnode_handle *'
>      768 | static inline struct acpi_device *to_acpi_device_node(struct fwnode_handle *fwnode)
>          |                                                       ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
>    drivers/base/property.c: In function 'device_get_dma_attr':
>    drivers/base/property.c:890:48: warning: passing argument 1 of 'to_acpi_device_node' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
>      890 |   attr = acpi_get_dma_attr(to_acpi_device_node(fwnode));
>          |                                                ^~~~~~
>    In file included from drivers/base/property.c:10:
>    include/linux/acpi.h:768:77: note: expected 'struct fwnode_handle *' but argument is of type 'const struct fwnode_handle *'
>      768 | static inline struct acpi_device *to_acpi_device_node(struct fwnode_handle *fwnode)
>          |                                                       ~~~~~~~~~~~~~~~~~~~~~~^~~~~~



-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH v1 1/1] device property: Unify access to of_node
  2021-06-04 13:13 [PATCH v1 1/1] device property: Unify access to of_node Andy Shevchenko
  2021-06-04 13:25 ` Greg Kroah-Hartman
  2021-06-04 14:55 ` kernel test robot
@ 2021-06-04 16:14 ` kernel test robot
  2021-06-04 16:36   ` Andy Shevchenko
  2021-06-04 17:29 ` kernel test robot
  3 siblings, 1 reply; 7+ messages in thread
From: kernel test robot @ 2021-06-04 16:14 UTC (permalink / raw)
  To: Andy Shevchenko, Greg Kroah-Hartman, linux-kernel
  Cc: kbuild-all, Rafael J. Wysocki, linux-acpi

[-- Attachment #1: Type: text/plain, Size: 2973 bytes --]

Hi Andy,

I love your patch! Perhaps something to improve:

[auto build test WARNING on next-20210604]
[cannot apply to driver-core/driver-core-testing linux/master linus/master v5.13-rc4 v5.13-rc3 v5.13-rc2 v5.13-rc4]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Andy-Shevchenko/device-property-Unify-access-to-of_node/20210604-211443
base:    ccc252d2e818f6a479441119ad453c3ce7c7c461
config: sparc64-randconfig-s032-20210604 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # https://github.com/0day-ci/linux/commit/dfc2a97acf9b5c5ba11d180bf411721f723a9042
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Andy-Shevchenko/device-property-Unify-access-to-of_node/20210604-211443
        git checkout dfc2a97acf9b5c5ba11d180bf411721f723a9042
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=sparc64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
>> drivers/base/property.c:875:55: sparse: sparse: incorrect type in argument 1 (different modifiers) @@     expected struct fwnode_handle *fwnode @@     got struct fwnode_handle const *fwnode @@
   drivers/base/property.c:875:55: sparse:     expected struct fwnode_handle *fwnode
   drivers/base/property.c:875:55: sparse:     got struct fwnode_handle const *fwnode
   drivers/base/property.c:890:62: sparse: sparse: incorrect type in argument 1 (different modifiers) @@     expected struct fwnode_handle *fwnode @@     got struct fwnode_handle const *fwnode @@
   drivers/base/property.c:890:62: sparse:     expected struct fwnode_handle *fwnode
   drivers/base/property.c:890:62: sparse:     got struct fwnode_handle const *fwnode

vim +875 drivers/base/property.c

   863	
   864	bool device_dma_supported(struct device *dev)
   865	{
   866		const struct fwnode_handle *fwnode = dev_fwnode(dev);
   867	
   868		/* For DT, this is always supported.
   869		 * For ACPI, this depends on CCA, which
   870		 * is determined by the acpi_dma_supported().
   871		 */
   872		if (is_of_node(fwnode))
   873			return true;
   874	
 > 875		return acpi_dma_supported(to_acpi_device_node(fwnode));
   876	}
   877	EXPORT_SYMBOL_GPL(device_dma_supported);
   878	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28151 bytes --]

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

* Re: [PATCH v1 1/1] device property: Unify access to of_node
  2021-06-04 16:14 ` kernel test robot
@ 2021-06-04 16:36   ` Andy Shevchenko
  0 siblings, 0 replies; 7+ messages in thread
From: Andy Shevchenko @ 2021-06-04 16:36 UTC (permalink / raw)
  To: kernel test robot
  Cc: Greg Kroah-Hartman, linux-kernel, kbuild-all, Rafael J. Wysocki,
	linux-acpi

On Sat, Jun 05, 2021 at 12:14:45AM +0800, kernel test robot wrote:
> Hi Andy,
> 
> I love your patch! Perhaps something to improve:
> 
> [auto build test WARNING on next-20210604]
> [cannot apply to driver-core/driver-core-testing linux/master linus/master v5.13-rc4 v5.13-rc3 v5.13-rc2 v5.13-rc4]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
> 
> url:    https://github.com/0day-ci/linux/commits/Andy-Shevchenko/device-property-Unify-access-to-of_node/20210604-211443
> base:    ccc252d2e818f6a479441119ad453c3ce7c7c461
> config: sparc64-randconfig-s032-20210604 (attached as .config)
> compiler: sparc64-linux-gcc (GCC) 9.3.0
> reproduce:
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # apt-get install sparse
>         # sparse version: v0.6.3-341-g8af24329-dirty
>         # https://github.com/0day-ci/linux/commit/dfc2a97acf9b5c5ba11d180bf411721f723a9042
>         git remote add linux-review https://github.com/0day-ci/linux
>         git fetch --no-tags linux-review Andy-Shevchenko/device-property-Unify-access-to-of_node/20210604-211443
>         git checkout dfc2a97acf9b5c5ba11d180bf411721f723a9042
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=sparc64 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>

Oh là là, just in time when I sent v2...
I'll look at this :-)

> sparse warnings: (new ones prefixed by >>)
> >> drivers/base/property.c:875:55: sparse: sparse: incorrect type in argument 1 (different modifiers) @@     expected struct fwnode_handle *fwnode @@     got struct fwnode_handle const *fwnode @@
>    drivers/base/property.c:875:55: sparse:     expected struct fwnode_handle *fwnode
>    drivers/base/property.c:875:55: sparse:     got struct fwnode_handle const *fwnode
>    drivers/base/property.c:890:62: sparse: sparse: incorrect type in argument 1 (different modifiers) @@     expected struct fwnode_handle *fwnode @@     got struct fwnode_handle const *fwnode @@
>    drivers/base/property.c:890:62: sparse:     expected struct fwnode_handle *fwnode
>    drivers/base/property.c:890:62: sparse:     got struct fwnode_handle const *fwnode

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH v1 1/1] device property: Unify access to of_node
  2021-06-04 13:13 [PATCH v1 1/1] device property: Unify access to of_node Andy Shevchenko
                   ` (2 preceding siblings ...)
  2021-06-04 16:14 ` kernel test robot
@ 2021-06-04 17:29 ` kernel test robot
  3 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-06-04 17:29 UTC (permalink / raw)
  To: Andy Shevchenko, Greg Kroah-Hartman, linux-kernel
  Cc: kbuild-all, clang-built-linux, Rafael J. Wysocki, linux-acpi

[-- Attachment #1: Type: text/plain, Size: 3501 bytes --]

Hi Andy,

I love your patch! Yet something to improve:

[auto build test ERROR on next-20210604]
[cannot apply to driver-core/driver-core-testing linux/master linus/master v5.13-rc4 v5.13-rc3 v5.13-rc2 v5.13-rc4]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Andy-Shevchenko/device-property-Unify-access-to-of_node/20210604-211443
base:    ccc252d2e818f6a479441119ad453c3ce7c7c461
config: arm64-randconfig-r016-20210604 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 5c0d1b2f902aa6a9cf47cc7e42c5b83bb2217cf9)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/0day-ci/linux/commit/dfc2a97acf9b5c5ba11d180bf411721f723a9042
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Andy-Shevchenko/device-property-Unify-access-to-of_node/20210604-211443
        git checkout dfc2a97acf9b5c5ba11d180bf411721f723a9042
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/base/property.c:875:48: error: passing 'const struct fwnode_handle *' to parameter of type 'struct fwnode_handle *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
           return acpi_dma_supported(to_acpi_device_node(fwnode));
                                                         ^~~~~~
   include/linux/acpi.h:768:77: note: passing argument to parameter 'fwnode' here
   static inline struct acpi_device *to_acpi_device_node(struct fwnode_handle *fwnode)
                                                                               ^
   drivers/base/property.c:890:48: error: passing 'const struct fwnode_handle *' to parameter of type 'struct fwnode_handle *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
                   attr = acpi_get_dma_attr(to_acpi_device_node(fwnode));
                                                                ^~~~~~
   include/linux/acpi.h:768:77: note: passing argument to parameter 'fwnode' here
   static inline struct acpi_device *to_acpi_device_node(struct fwnode_handle *fwnode)
                                                                               ^
   2 errors generated.


vim +875 drivers/base/property.c

   863	
   864	bool device_dma_supported(struct device *dev)
   865	{
   866		const struct fwnode_handle *fwnode = dev_fwnode(dev);
   867	
   868		/* For DT, this is always supported.
   869		 * For ACPI, this depends on CCA, which
   870		 * is determined by the acpi_dma_supported().
   871		 */
   872		if (is_of_node(fwnode))
   873			return true;
   874	
 > 875		return acpi_dma_supported(to_acpi_device_node(fwnode));
   876	}
   877	EXPORT_SYMBOL_GPL(device_dma_supported);
   878	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 39971 bytes --]

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

end of thread, other threads:[~2021-06-04 17:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04 13:13 [PATCH v1 1/1] device property: Unify access to of_node Andy Shevchenko
2021-06-04 13:25 ` Greg Kroah-Hartman
2021-06-04 14:55 ` kernel test robot
2021-06-04 15:55   ` Andy Shevchenko
2021-06-04 16:14 ` kernel test robot
2021-06-04 16:36   ` Andy Shevchenko
2021-06-04 17:29 ` kernel 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).