Re: [PATCH] staging:board: fix build errors and warnings

2014-12-12 Thread Grant Likely
On Tue,  9 Dec 2014 01:24:09 +0800
, Tsung-Han Lin 
 wrote:
> Add dummy implementation of 'of_find_all_nodes',
> and remove the unnecessary 'of_can_translate_address',
> which is already removed in commit
> d9c6866be8a145e32da616d8dcbae806032d75b5 ("of: kill off
> of_can_translate_address"), to fix the build errors and warnings
> found by sparse.
> 
> Signed-off-by: Tsung-Han Lin 

???

This code is just weird. If CONFIG_OF is not enabled, then board.c
shouldn't be compiled at all. You can do this with a patch to the
Kconfig and Makefile. Also, if the functions in
drivers/staging/board/board.c are needed for driver support, then please
propose a patch that moves them in into drivers/of/base.c so that they
can be reviewed properly. They are so short and simple that fixing them
up as part of the normal review process should be sufficient.

As for fixing the compile error, please drop the change to
include/linux/of.h and resubmit.

g.


> ---
>  drivers/staging/board/board.c | 3 +--
>  include/linux/of.h| 5 +
>  2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/board/board.c b/drivers/staging/board/board.c
> index 6050fbdfd31f..d5a6abc84519 100644
> --- a/drivers/staging/board/board.c
> +++ b/drivers/staging/board/board.c
> @@ -11,8 +11,7 @@ static bool find_by_address(u64 base_address)
>   struct resource res;
>  
>   while (dn) {
> - if (of_can_translate_address(dn)
> - && !of_address_to_resource(dn, 0, &res)) {
> + if (!of_address_to_resource(dn, 0, &res)) {
>   if (res.start == base_address) {
>   of_node_put(dn);
>   return true;
> diff --git a/include/linux/of.h b/include/linux/of.h
> index dfde07e77a63..c2c5021c1ee4 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -616,6 +616,11 @@ static inline const char *of_prop_next_string(struct 
> property *prop,
>   return NULL;
>  }
>  
> +static inline struct device_node *of_find_all_nodes(struct device_node *prev)
> +{
> + return NULL;
> +}
> +
>  #define of_match_ptr(_ptr)   NULL
>  #define of_match_node(_matches, _node)   NULL
>  #endif /* CONFIG_OF */
> -- 
> 2.1.0
> 

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH V3] i2c: move of helpers into the core

2013-08-28 Thread Grant Likely
On Thu, 22 Aug 2013 18:00:14 +0200, Wolfram Sang  wrote:
> I2C of helpers used to live in of_i2c.c but experience (from SPI) shows
> that it is much cleaner to have this in the core. This also removes a
> circular dependency between the helpers and the core, and so we can
> finally register child nodes in the core instead of doing this manually
> in each driver. So, fix the drivers and documentation, too.
> 
> Acked-by: Rob Herring 
> Reviewed-by: Felipe Balbi 
> Acked-by: Rafael J. Wysocki 
> Tested-by: Sylwester Nawrocki 
> Signed-off-by: Wolfram Sang 

Acked-by: Grant Likely 

> ---
> 
> V2->V3: Was trying to be too smart by only fixing includes needed.
>   Took a more general approach this time, converting of_i2c.h
>   to i2c.h in case i2c.h was not already there. Otherwise
>   remove it. Improved my build scripts and no build failures,
>   no complaints from buildbot as well.
> 
> 
>  Documentation/acpi/enumeration.txt  |1 -
>  arch/powerpc/platforms/44x/warp.c   |1 -
>  drivers/gpu/drm/tilcdc/tilcdc_slave.c   |1 -
>  drivers/gpu/drm/tilcdc/tilcdc_tfp410.c  |1 -
>  drivers/gpu/host1x/drm/output.c |2 +-
>  drivers/i2c/busses/i2c-at91.c   |3 -
>  drivers/i2c/busses/i2c-cpm.c|6 --
>  drivers/i2c/busses/i2c-davinci.c|2 -
>  drivers/i2c/busses/i2c-designware-platdrv.c |2 -
>  drivers/i2c/busses/i2c-gpio.c   |3 -
>  drivers/i2c/busses/i2c-i801.c   |2 -
>  drivers/i2c/busses/i2c-ibm_iic.c|4 -
>  drivers/i2c/busses/i2c-imx.c|3 -
>  drivers/i2c/busses/i2c-mpc.c|2 -
>  drivers/i2c/busses/i2c-mv64xxx.c|3 -
>  drivers/i2c/busses/i2c-mxs.c|3 -
>  drivers/i2c/busses/i2c-nomadik.c|3 -
>  drivers/i2c/busses/i2c-ocores.c |3 -
>  drivers/i2c/busses/i2c-octeon.c |3 -
>  drivers/i2c/busses/i2c-omap.c   |3 -
>  drivers/i2c/busses/i2c-pnx.c|3 -
>  drivers/i2c/busses/i2c-powermac.c   |9 +-
>  drivers/i2c/busses/i2c-pxa.c|2 -
>  drivers/i2c/busses/i2c-s3c2410.c|2 -
>  drivers/i2c/busses/i2c-sh_mobile.c  |2 -
>  drivers/i2c/busses/i2c-sirf.c   |3 -
>  drivers/i2c/busses/i2c-stu300.c |2 -
>  drivers/i2c/busses/i2c-tegra.c  |3 -
>  drivers/i2c/busses/i2c-versatile.c  |2 -
>  drivers/i2c/busses/i2c-wmt.c|3 -
>  drivers/i2c/busses/i2c-xiic.c   |3 -
>  drivers/i2c/i2c-core.c  |  109 +-
>  drivers/i2c/i2c-mux.c   |3 -
>  drivers/i2c/muxes/i2c-arb-gpio-challenge.c  |1 -
>  drivers/i2c/muxes/i2c-mux-gpio.c|1 -
>  drivers/i2c/muxes/i2c-mux-pinctrl.c |1 -
>  drivers/media/platform/exynos4-is/fimc-is-i2c.c |4 +-
>  drivers/media/platform/exynos4-is/fimc-is.c |2 +-
>  drivers/media/platform/exynos4-is/media-dev.c   |1 -
>  drivers/of/Kconfig  |6 --
>  drivers/of/Makefile |1 -
>  drivers/of/of_i2c.c |  114 
> ---
>  drivers/staging/imx-drm/imx-tve.c   |2 +-
>  include/linux/i2c.h |   20 
>  include/linux/of_i2c.h  |   46 -
>  sound/soc/fsl/imx-sgtl5000.c|2 +-
>  sound/soc/fsl/imx-wm8962.c  |2 +-
>  47 files changed, 138 insertions(+), 262 deletions(-)
>  delete mode 100644 drivers/of/of_i2c.c
>  delete mode 100644 include/linux/of_i2c.h
> 
> diff --git a/Documentation/acpi/enumeration.txt 
> b/Documentation/acpi/enumeration.txt
> index d9be7a9..958266e 100644
> --- a/Documentation/acpi/enumeration.txt
> +++ b/Documentation/acpi/enumeration.txt
> @@ -238,7 +238,6 @@ An I2C bus (controller) driver does:
>   if (ret)
>   /* handle error */
>  
> - of_i2c_register_devices(adapter);
>   /* Enumerate the slave devices behind this bus via ACPI */
>   acpi_i2c_register_devices(adapter);
>  
> diff --git a/arch/powerpc/platforms/44x/warp.c 
> b/arch/powerpc/platforms/44x/warp.c
> index 4cfa499..534574a 100644
> --- a/arch/powerpc/platforms/44x/warp.c
> +++ b/arch/powerpc/platforms/44x/warp.c
> @@ -16,7 +16,6 @@
>  #include 
>  #include 
>  #include 
> -#include 
>

Re: [PATCH 22/51] DMA-API: amba: get rid of separate dma_mask

2013-09-22 Thread Grant Likely
On Thu, 19 Sep 2013 22:47:01 +0100, Russell King  
wrote:
> AMBA Primecell devices always treat streaming and coherent DMA exactly
> the same, so there's no point in having the masks separated.
> 
> Signed-off-by: Russell King 

for the drivers/of/platform.c portion:
Acked-by: Grant Likely 

g.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel