linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] mfd: tc6393xb: Make disable callback return void
@ 2022-06-19  8:26 Uwe Kleine-König
  2022-06-19 18:20 ` kernel test robot
  2022-06-27 13:03 ` Lee Jones
  0 siblings, 2 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2022-06-19  8:26 UTC (permalink / raw)
  To: Lee Jones, Daniel Mack, Haojian Zhuang, Robert Jarzmik
  Cc: linux-arm-kernel, linux-kernel, kernel

All implementations return 0, so simplify accordingly.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
Hello,

compared to (implicit) v1
(https://lore.kernel.org/r/20220530192430.2108217-5-u.kleine-koenig@pengutronix.de)
this is rebased to v5.19-rc1. Up to now there is only a single patch in
next (next-20220617) since -rc1 touching one of the files:

	0fdebc5ec2ca ("treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_56.RULE (part 1)")

I don't expect any conflicts that need manual intervention.

Best regards
Uwe

 arch/arm/mach-pxa/eseries.c  | 3 +--
 arch/arm/mach-pxa/tosa.c     | 4 +---
 drivers/mfd/tc6393xb.c       | 5 ++---
 include/linux/mfd/tc6393xb.h | 2 +-
 4 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-pxa/eseries.c b/arch/arm/mach-pxa/eseries.c
index 08f8737aa8fd..114f0baf087f 100644
--- a/arch/arm/mach-pxa/eseries.c
+++ b/arch/arm/mach-pxa/eseries.c
@@ -86,11 +86,10 @@ int eseries_tmio_enable(struct platform_device *dev)
 	return 0;
 }
 
-int eseries_tmio_disable(struct platform_device *dev)
+void eseries_tmio_disable(struct platform_device *dev)
 {
 	gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND, 0);
 	gpio_set_value(GPIO_ESERIES_TMIO_PCLR, 0);
-	return 0;
 }
 
 int eseries_tmio_suspend(struct platform_device *dev)
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
index 6af8bc404825..d41641d6cfcd 100644
--- a/arch/arm/mach-pxa/tosa.c
+++ b/arch/arm/mach-pxa/tosa.c
@@ -678,13 +678,11 @@ static int tosa_tc6393xb_enable(struct platform_device *dev)
 	return rc;
 }
 
-static int tosa_tc6393xb_disable(struct platform_device *dev)
+static void tosa_tc6393xb_disable(struct platform_device *dev)
 {
 	gpio_free(TOSA_GPIO_TC6393XB_L3V_ON);
 	gpio_free(TOSA_GPIO_TC6393XB_SUSPEND);
 	gpio_free(TOSA_GPIO_TC6393XB_REST_IN);
-
-	return 0;
 }
 
 static int tosa_tc6393xb_resume(struct platform_device *dev)
diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
index 0be5731685b4..aa903a31dd43 100644
--- a/drivers/mfd/tc6393xb.c
+++ b/drivers/mfd/tc6393xb.c
@@ -798,20 +798,19 @@ static int tc6393xb_remove(struct platform_device *dev)
 {
 	struct tc6393xb_platform_data *tcpd = dev_get_platdata(&dev->dev);
 	struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
-	int ret;
 
 	mfd_remove_devices(&dev->dev);
 
 	tc6393xb_detach_irq(dev);
 
-	ret = tcpd->disable(dev);
+	tcpd->disable(dev);
 	clk_disable_unprepare(tc6393xb->clk);
 	iounmap(tc6393xb->scr);
 	release_resource(&tc6393xb->rscr);
 	clk_put(tc6393xb->clk);
 	kfree(tc6393xb);
 
-	return ret;
+	return 0;
 }
 
 #ifdef CONFIG_PM
diff --git a/include/linux/mfd/tc6393xb.h b/include/linux/mfd/tc6393xb.h
index d336c541b7df..d17807f2d0c9 100644
--- a/include/linux/mfd/tc6393xb.h
+++ b/include/linux/mfd/tc6393xb.h
@@ -22,7 +22,7 @@ struct tc6393xb_platform_data {
 	u16	scr_gper;	/* GP Enable */
 
 	int	(*enable)(struct platform_device *dev);
-	int	(*disable)(struct platform_device *dev);
+	void	(*disable)(struct platform_device *dev);
 	int	(*suspend)(struct platform_device *dev);
 	int	(*resume)(struct platform_device *dev);
 

base-commit: f2906aa863381afb0015a9eb7fefad885d4e5a56
-- 
2.36.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2] mfd: tc6393xb: Make disable callback return void
  2022-06-19  8:26 [PATCH v2] mfd: tc6393xb: Make disable callback return void Uwe Kleine-König
@ 2022-06-19 18:20 ` kernel test robot
  2022-06-19 19:35   ` Uwe Kleine-König
  2022-06-27 13:03 ` Lee Jones
  1 sibling, 1 reply; 4+ messages in thread
From: kernel test robot @ 2022-06-19 18:20 UTC (permalink / raw)
  To: Uwe Kleine-König, Lee Jones, Daniel Mack, Haojian Zhuang,
	Robert Jarzmik
  Cc: kbuild-all, linux-arm-kernel, linux-kernel, kernel

Hi "Uwe,

I love your patch! Yet something to improve:

[auto build test ERROR on f2906aa863381afb0015a9eb7fefad885d4e5a56]

url:    https://github.com/intel-lab-lkp/linux/commits/Uwe-Kleine-K-nig/mfd-tc6393xb-Make-disable-callback-return-void/20220619-162855
base:   f2906aa863381afb0015a9eb7fefad885d4e5a56
config: arm-pxa_defconfig (https://download.01.org/0day-ci/archive/20220620/202206200102.cUbYiyCL-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.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/intel-lab-lkp/linux/commit/e2b80b7c107cdbbff99189431a614f791435ebfd
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Uwe-Kleine-K-nig/mfd-tc6393xb-Make-disable-callback-return-void/20220619-162855
        git checkout e2b80b7c107cdbbff99189431a614f791435ebfd
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   arch/arm/mach-pxa/eseries.c:47:13: warning: no previous prototype for 'eseries_fixup' [-Wmissing-prototypes]
      47 | void __init eseries_fixup(struct tag *tags, char **cmdline)
         |             ^~~~~~~~~~~~~
   arch/arm/mach-pxa/eseries.c:76:5: warning: no previous prototype for 'eseries_tmio_enable' [-Wmissing-prototypes]
      76 | int eseries_tmio_enable(struct platform_device *dev)
         |     ^~~~~~~~~~~~~~~~~~~
   arch/arm/mach-pxa/eseries.c:89:6: warning: no previous prototype for 'eseries_tmio_disable' [-Wmissing-prototypes]
      89 | void eseries_tmio_disable(struct platform_device *dev)
         |      ^~~~~~~~~~~~~~~~~~~~
   arch/arm/mach-pxa/eseries.c:95:5: warning: no previous prototype for 'eseries_tmio_suspend' [-Wmissing-prototypes]
      95 | int eseries_tmio_suspend(struct platform_device *dev)
         |     ^~~~~~~~~~~~~~~~~~~~
   arch/arm/mach-pxa/eseries.c:101:5: warning: no previous prototype for 'eseries_tmio_resume' [-Wmissing-prototypes]
     101 | int eseries_tmio_resume(struct platform_device *dev)
         |     ^~~~~~~~~~~~~~~~~~~
   arch/arm/mach-pxa/eseries.c:108:6: warning: no previous prototype for 'eseries_get_tmio_gpios' [-Wmissing-prototypes]
     108 | void eseries_get_tmio_gpios(void)
         |      ^~~~~~~~~~~~~~~~~~~~~~
>> arch/arm/mach-pxa/eseries.c:141:21: error: initialization of 'int (*)(struct platform_device *)' from incompatible pointer type 'void (*)(struct platform_device *)' [-Werror=incompatible-pointer-types]
     141 |         .disable  = &eseries_tmio_disable,
         |                     ^
   arch/arm/mach-pxa/eseries.c:141:21: note: (near initialization for 'e330_tc6387xb_info.disable')
   cc1: some warnings being treated as errors


vim +141 arch/arm/mach-pxa/eseries.c

e478fe4cd50b86 Eric Miao 2010-06-20  138  
e478fe4cd50b86 Eric Miao 2010-06-20  139  static struct tc6387xb_platform_data e330_tc6387xb_info = {
e478fe4cd50b86 Eric Miao 2010-06-20  140  	.enable   = &eseries_tmio_enable,
e478fe4cd50b86 Eric Miao 2010-06-20 @141  	.disable  = &eseries_tmio_disable,
e478fe4cd50b86 Eric Miao 2010-06-20  142  	.suspend  = &eseries_tmio_suspend,
e478fe4cd50b86 Eric Miao 2010-06-20  143  	.resume   = &eseries_tmio_resume,
e478fe4cd50b86 Eric Miao 2010-06-20  144  };
e478fe4cd50b86 Eric Miao 2010-06-20  145  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2] mfd: tc6393xb: Make disable callback return void
  2022-06-19 18:20 ` kernel test robot
@ 2022-06-19 19:35   ` Uwe Kleine-König
  0 siblings, 0 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2022-06-19 19:35 UTC (permalink / raw)
  To: kernel test robot
  Cc: Lee Jones, Daniel Mack, Haojian Zhuang, Robert Jarzmik, kernel,
	kbuild-all, linux-kernel, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 4351 bytes --]

Hello,

On Mon, Jun 20, 2022 at 02:20:57AM +0800, kernel test robot wrote:
> Hi "Uwe,
> 
> I love your patch! Yet something to improve:
> 
> [auto build test ERROR on f2906aa863381afb0015a9eb7fefad885d4e5a56]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Uwe-Kleine-K-nig/mfd-tc6393xb-Make-disable-callback-return-void/20220619-162855
> base:   f2906aa863381afb0015a9eb7fefad885d4e5a56
> config: arm-pxa_defconfig (https://download.01.org/0day-ci/archive/20220620/202206200102.cUbYiyCL-lkp@intel.com/config)
> compiler: arm-linux-gnueabi-gcc (GCC) 11.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/intel-lab-lkp/linux/commit/e2b80b7c107cdbbff99189431a614f791435ebfd
>         git remote add linux-review https://github.com/intel-lab-lkp/linux
>         git fetch --no-tags linux-review Uwe-Kleine-K-nig/mfd-tc6393xb-Make-disable-callback-return-void/20220619-162855
>         git checkout e2b80b7c107cdbbff99189431a614f791435ebfd
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash
> 
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>    arch/arm/mach-pxa/eseries.c:47:13: warning: no previous prototype for 'eseries_fixup' [-Wmissing-prototypes]
>       47 | void __init eseries_fixup(struct tag *tags, char **cmdline)
>          |             ^~~~~~~~~~~~~
>    arch/arm/mach-pxa/eseries.c:76:5: warning: no previous prototype for 'eseries_tmio_enable' [-Wmissing-prototypes]
>       76 | int eseries_tmio_enable(struct platform_device *dev)
>          |     ^~~~~~~~~~~~~~~~~~~
>    arch/arm/mach-pxa/eseries.c:89:6: warning: no previous prototype for 'eseries_tmio_disable' [-Wmissing-prototypes]
>       89 | void eseries_tmio_disable(struct platform_device *dev)
>          |      ^~~~~~~~~~~~~~~~~~~~
>    arch/arm/mach-pxa/eseries.c:95:5: warning: no previous prototype for 'eseries_tmio_suspend' [-Wmissing-prototypes]
>       95 | int eseries_tmio_suspend(struct platform_device *dev)
>          |     ^~~~~~~~~~~~~~~~~~~~
>    arch/arm/mach-pxa/eseries.c:101:5: warning: no previous prototype for 'eseries_tmio_resume' [-Wmissing-prototypes]
>      101 | int eseries_tmio_resume(struct platform_device *dev)
>          |     ^~~~~~~~~~~~~~~~~~~
>    arch/arm/mach-pxa/eseries.c:108:6: warning: no previous prototype for 'eseries_get_tmio_gpios' [-Wmissing-prototypes]
>      108 | void eseries_get_tmio_gpios(void)
>          |      ^~~~~~~~~~~~~~~~~~~~~~
> >> arch/arm/mach-pxa/eseries.c:141:21: error: initialization of 'int (*)(struct platform_device *)' from incompatible pointer type 'void (*)(struct platform_device *)' [-Werror=incompatible-pointer-types]
>      141 |         .disable  = &eseries_tmio_disable,
>          |                     ^
>    arch/arm/mach-pxa/eseries.c:141:21: note: (near initialization for 'e330_tc6387xb_info.disable')
>    cc1: some warnings being treated as errors
> 
> 
> vim +141 arch/arm/mach-pxa/eseries.c
> 
> e478fe4cd50b86 Eric Miao 2010-06-20  138  
> e478fe4cd50b86 Eric Miao 2010-06-20  139  static struct tc6387xb_platform_data e330_tc6387xb_info = {
> e478fe4cd50b86 Eric Miao 2010-06-20  140  	.enable   = &eseries_tmio_enable,
> e478fe4cd50b86 Eric Miao 2010-06-20 @141  	.disable  = &eseries_tmio_disable,
> e478fe4cd50b86 Eric Miao 2010-06-20  142  	.suspend  = &eseries_tmio_suspend,
> e478fe4cd50b86 Eric Miao 2010-06-20  143  	.resume   = &eseries_tmio_resume,
> e478fe4cd50b86 Eric Miao 2010-06-20  144  };
> e478fe4cd50b86 Eric Miao 2010-06-20  145  

Oh, indeed. I forgot that this patch depends on

	https://lore.kernel.org/all/20220530192430.2108217-4-u.kleine-koenig@pengutronix.de

that Lee already claimed to have applied. This patch removes line 141
and the problem is gone.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2] mfd: tc6393xb: Make disable callback return void
  2022-06-19  8:26 [PATCH v2] mfd: tc6393xb: Make disable callback return void Uwe Kleine-König
  2022-06-19 18:20 ` kernel test robot
@ 2022-06-27 13:03 ` Lee Jones
  1 sibling, 0 replies; 4+ messages in thread
From: Lee Jones @ 2022-06-27 13:03 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Daniel Mack, Haojian Zhuang, Robert Jarzmik, linux-arm-kernel,
	linux-kernel, kernel

On Sun, 19 Jun 2022, Uwe Kleine-König wrote:

> All implementations return 0, so simplify accordingly.
> 
> This is a preparation for making platform remove callbacks return void.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> Hello,
> 
> compared to (implicit) v1
> (https://lore.kernel.org/r/20220530192430.2108217-5-u.kleine-koenig@pengutronix.de)
> this is rebased to v5.19-rc1. Up to now there is only a single patch in
> next (next-20220617) since -rc1 touching one of the files:
> 
> 	0fdebc5ec2ca ("treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_56.RULE (part 1)")
> 
> I don't expect any conflicts that need manual intervention.
> 
> Best regards
> Uwe
> 
>  arch/arm/mach-pxa/eseries.c  | 3 +--
>  arch/arm/mach-pxa/tosa.c     | 4 +---
>  drivers/mfd/tc6393xb.c       | 5 ++---
>  include/linux/mfd/tc6393xb.h | 2 +-
>  4 files changed, 5 insertions(+), 9 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2022-06-27 13:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-19  8:26 [PATCH v2] mfd: tc6393xb: Make disable callback return void Uwe Kleine-König
2022-06-19 18:20 ` kernel test robot
2022-06-19 19:35   ` Uwe Kleine-König
2022-06-27 13:03 ` Lee Jones

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