All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] phy: mapphone-mdm6600: Fix PM disable depth imbalance in phy_mdm6600_probe
@ 2022-01-07 10:01 kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2022-01-07 10:01 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20220105123947.17946-1-linmq006@gmail.com>
References: <20220105123947.17946-1-linmq006@gmail.com>
TO: Miaoqian Lin <linmq006@gmail.com>
CC: linmq006(a)gmail.com
CC: Kishon Vijay Abraham I <kishon@ti.com>
CC: Vinod Koul <vkoul@kernel.org>
CC: Tony Lindgren <tony@atomide.com>
CC: linux-phy(a)lists.infradead.org
CC: linux-kernel(a)vger.kernel.org

Hi Miaoqian,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.16-rc8 next-20220106]
[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/Miaoqian-Lin/phy-mapphone-mdm6600-Fix-PM-disable-depth-imbalance-in-phy_mdm6600_probe/20220105-204113
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git c9e6606c7fe92b50a02ce51dda82586ebdf99b48
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: sparc64-randconfig-s032-20220107 (https://download.01.org/0day-ci/archive/20220107/202201071716.1G7oTDdI-lkp(a)intel.com/config)
compiler: sparc64-linux-gcc (GCC) 11.2.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.4-dirty
        # https://github.com/0day-ci/linux/commit/62cad5a4dd9feab731b40f99e6e0bf7a2429f1ed
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Miaoqian-Lin/phy-mapphone-mdm6600-Fix-PM-disable-depth-imbalance-in-phy_mdm6600_probe/20220105-204113
        git checkout 62cad5a4dd9feab731b40f99e6e0bf7a2429f1ed
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc64 SHELL=/bin/bash drivers/phy/motorola/

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/phy/motorola/phy-mapphone-mdm6600.c:633:1: sparse: sparse: unused label 'disable_pm'

vim +/disable_pm +633 drivers/phy/motorola/phy-mapphone-mdm6600.c

5d1ebbda0318b1 Tony Lindgren 2018-03-08  555  
5d1ebbda0318b1 Tony Lindgren 2018-03-08  556  static int phy_mdm6600_probe(struct platform_device *pdev)
5d1ebbda0318b1 Tony Lindgren 2018-03-08  557  {
5d1ebbda0318b1 Tony Lindgren 2018-03-08  558  	struct phy_mdm6600 *ddata;
5d1ebbda0318b1 Tony Lindgren 2018-03-08  559  	int error;
5d1ebbda0318b1 Tony Lindgren 2018-03-08  560  
5d1ebbda0318b1 Tony Lindgren 2018-03-08  561  	ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
5d1ebbda0318b1 Tony Lindgren 2018-03-08  562  	if (!ddata)
5d1ebbda0318b1 Tony Lindgren 2018-03-08  563  		return -ENOMEM;
5d1ebbda0318b1 Tony Lindgren 2018-03-08  564  
5d1ebbda0318b1 Tony Lindgren 2018-03-08  565  	INIT_DELAYED_WORK(&ddata->bootup_work,
5d1ebbda0318b1 Tony Lindgren 2018-03-08  566  			  phy_mdm6600_deferred_power_on);
5d1ebbda0318b1 Tony Lindgren 2018-03-08  567  	INIT_DELAYED_WORK(&ddata->status_work, phy_mdm6600_status);
f7f50b2a7b0546 Tony Lindgren 2018-05-06  568  	INIT_DELAYED_WORK(&ddata->modem_wake_work, phy_mdm6600_modem_wake);
5d1ebbda0318b1 Tony Lindgren 2018-03-08  569  	init_completion(&ddata->ack);
5d1ebbda0318b1 Tony Lindgren 2018-03-08  570  
5d1ebbda0318b1 Tony Lindgren 2018-03-08  571  	ddata->dev = &pdev->dev;
5d1ebbda0318b1 Tony Lindgren 2018-03-08  572  	platform_set_drvdata(pdev, ddata);
5d1ebbda0318b1 Tony Lindgren 2018-03-08  573  
2ad2af0816221a Tony Lindgren 2018-12-02  574  	/* Active state selected in phy_mdm6600_power_on() */
2ad2af0816221a Tony Lindgren 2018-12-02  575  	error = pinctrl_pm_select_sleep_state(ddata->dev);
2ad2af0816221a Tony Lindgren 2018-12-02  576  	if (error)
2ad2af0816221a Tony Lindgren 2018-12-02  577  		dev_warn(ddata->dev, "%s: error with sleep_state: %i\n",
2ad2af0816221a Tony Lindgren 2018-12-02  578  			 __func__, error);
2ad2af0816221a Tony Lindgren 2018-12-02  579  
5d1ebbda0318b1 Tony Lindgren 2018-03-08  580  	error = phy_mdm6600_init_lines(ddata);
5d1ebbda0318b1 Tony Lindgren 2018-03-08  581  	if (error)
5d1ebbda0318b1 Tony Lindgren 2018-03-08  582  		return error;
5d1ebbda0318b1 Tony Lindgren 2018-03-08  583  
5d1ebbda0318b1 Tony Lindgren 2018-03-08  584  	phy_mdm6600_init_irq(ddata);
5d1ebbda0318b1 Tony Lindgren 2018-03-08  585  	schedule_delayed_work(&ddata->bootup_work, 0);
5d1ebbda0318b1 Tony Lindgren 2018-03-08  586  
5d1ebbda0318b1 Tony Lindgren 2018-03-08  587  	/*
5d1ebbda0318b1 Tony Lindgren 2018-03-08  588  	 * See phy_mdm6600_device_power_on(). We should be able
5d1ebbda0318b1 Tony Lindgren 2018-03-08  589  	 * to remove this eventually when ohci-platform can deal
5d1ebbda0318b1 Tony Lindgren 2018-03-08  590  	 * with -EPROBE_DEFER.
5d1ebbda0318b1 Tony Lindgren 2018-03-08  591  	 */
5d1ebbda0318b1 Tony Lindgren 2018-03-08  592  	msleep(PHY_MDM6600_PHY_DELAY_MS + 500);
5d1ebbda0318b1 Tony Lindgren 2018-03-08  593  
f7f50b2a7b0546 Tony Lindgren 2018-05-06  594  	/*
f7f50b2a7b0546 Tony Lindgren 2018-05-06  595  	 * Enable PM runtime only after PHY has been powered up properly.
f7f50b2a7b0546 Tony Lindgren 2018-05-06  596  	 * It is currently only needed after USB suspends mdm6600 and n_gsm
f7f50b2a7b0546 Tony Lindgren 2018-05-06  597  	 * needs to access the device. We don't want to do this earlier as
f7f50b2a7b0546 Tony Lindgren 2018-05-06  598  	 * gpio mode0 pin doubles as mdm6600 wake-up gpio.
f7f50b2a7b0546 Tony Lindgren 2018-05-06  599  	 */
f7f50b2a7b0546 Tony Lindgren 2018-05-06  600  	pm_runtime_use_autosuspend(ddata->dev);
f7f50b2a7b0546 Tony Lindgren 2018-05-06  601  	pm_runtime_set_autosuspend_delay(ddata->dev,
f7f50b2a7b0546 Tony Lindgren 2018-05-06  602  					 MDM6600_MODEM_IDLE_DELAY_MS);
f7f50b2a7b0546 Tony Lindgren 2018-05-06  603  	pm_runtime_enable(ddata->dev);
f7f50b2a7b0546 Tony Lindgren 2018-05-06  604  	error = pm_runtime_get_sync(ddata->dev);
f7f50b2a7b0546 Tony Lindgren 2018-05-06  605  	if (error < 0) {
f7f50b2a7b0546 Tony Lindgren 2018-05-06  606  		dev_warn(ddata->dev, "failed to wake modem: %i\n", error);
f7f50b2a7b0546 Tony Lindgren 2018-05-06  607  		pm_runtime_put_noidle(ddata->dev);
2ad2af0816221a Tony Lindgren 2018-12-02  608  		goto cleanup;
2ad2af0816221a Tony Lindgren 2018-12-02  609  	}
2ad2af0816221a Tony Lindgren 2018-12-02  610  
2ad2af0816221a Tony Lindgren 2018-12-02  611  	ddata->generic_phy = devm_phy_create(ddata->dev, NULL, &gpio_usb_ops);
2ad2af0816221a Tony Lindgren 2018-12-02  612  	if (IS_ERR(ddata->generic_phy)) {
2ad2af0816221a Tony Lindgren 2018-12-02  613  		error = PTR_ERR(ddata->generic_phy);
2ad2af0816221a Tony Lindgren 2018-12-02  614  		goto idle;
f7f50b2a7b0546 Tony Lindgren 2018-05-06  615  	}
2ad2af0816221a Tony Lindgren 2018-12-02  616  
2ad2af0816221a Tony Lindgren 2018-12-02  617  	phy_set_drvdata(ddata->generic_phy, ddata);
2ad2af0816221a Tony Lindgren 2018-12-02  618  
2ad2af0816221a Tony Lindgren 2018-12-02  619  	ddata->phy_provider =
2ad2af0816221a Tony Lindgren 2018-12-02  620  		devm_of_phy_provider_register(ddata->dev,
2ad2af0816221a Tony Lindgren 2018-12-02  621  					      of_phy_simple_xlate);
2ad2af0816221a Tony Lindgren 2018-12-02  622  	if (IS_ERR(ddata->phy_provider))
2ad2af0816221a Tony Lindgren 2018-12-02  623  		error = PTR_ERR(ddata->phy_provider);
2ad2af0816221a Tony Lindgren 2018-12-02  624  
2ad2af0816221a Tony Lindgren 2018-12-02  625  idle:
f7f50b2a7b0546 Tony Lindgren 2018-05-06  626  	pm_runtime_mark_last_busy(ddata->dev);
f7f50b2a7b0546 Tony Lindgren 2018-05-06  627  	pm_runtime_put_autosuspend(ddata->dev);
f7f50b2a7b0546 Tony Lindgren 2018-05-06  628  
5d1ebbda0318b1 Tony Lindgren 2018-03-08  629  cleanup:
2ad2af0816221a Tony Lindgren 2018-12-02  630  	if (error < 0)
5d1ebbda0318b1 Tony Lindgren 2018-03-08  631  		phy_mdm6600_device_power_off(ddata);
2ad2af0816221a Tony Lindgren 2018-12-02  632  
62cad5a4dd9fea Miaoqian Lin  2022-01-05 @633  disable_pm:
62cad5a4dd9fea Miaoqian Lin  2022-01-05  634  	pm_runtime_disable(ddata->dev);
62cad5a4dd9fea Miaoqian Lin  2022-01-05  635  
5d1ebbda0318b1 Tony Lindgren 2018-03-08  636  	return error;
5d1ebbda0318b1 Tony Lindgren 2018-03-08  637  }
5d1ebbda0318b1 Tony Lindgren 2018-03-08  638  

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

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

* Re: [PATCH] phy: mapphone-mdm6600: Fix PM disable depth imbalance in phy_mdm6600_probe
  2022-01-05 12:39 ` Miaoqian Lin
  (?)
@ 2022-01-05 18:41   ` kernel test robot
  -1 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2022-01-05 18:41 UTC (permalink / raw)
  To: Miaoqian Lin
  Cc: llvm, kbuild-all, linmq006, Kishon Vijay Abraham I, Vinod Koul,
	Tony Lindgren, linux-phy, linux-kernel

Hi Miaoqian,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.16-rc8 next-20220105]
[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/Miaoqian-Lin/phy-mapphone-mdm6600-Fix-PM-disable-depth-imbalance-in-phy_mdm6600_probe/20220105-204113
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git c9e6606c7fe92b50a02ce51dda82586ebdf99b48
config: hexagon-randconfig-r035-20220105 (https://download.01.org/0day-ci/archive/20220106/202201060211.yT7coTKI-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d5b6e30ed3acad794dd0aec400e617daffc6cc3d)
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/62cad5a4dd9feab731b40f99e6e0bf7a2429f1ed
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Miaoqian-Lin/phy-mapphone-mdm6600-Fix-PM-disable-depth-imbalance-in-phy_mdm6600_probe/20220105-204113
        git checkout 62cad5a4dd9feab731b40f99e6e0bf7a2429f1ed
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/phy/motorola/

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/phy/motorola/phy-mapphone-mdm6600.c:633:1: warning: unused label 'disable_pm' [-Wunused-label]
   disable_pm:
   ^~~~~~~~~~~
   1 warning generated.


vim +/disable_pm +633 drivers/phy/motorola/phy-mapphone-mdm6600.c

   555	
   556	static int phy_mdm6600_probe(struct platform_device *pdev)
   557	{
   558		struct phy_mdm6600 *ddata;
   559		int error;
   560	
   561		ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
   562		if (!ddata)
   563			return -ENOMEM;
   564	
   565		INIT_DELAYED_WORK(&ddata->bootup_work,
   566				  phy_mdm6600_deferred_power_on);
   567		INIT_DELAYED_WORK(&ddata->status_work, phy_mdm6600_status);
   568		INIT_DELAYED_WORK(&ddata->modem_wake_work, phy_mdm6600_modem_wake);
   569		init_completion(&ddata->ack);
   570	
   571		ddata->dev = &pdev->dev;
   572		platform_set_drvdata(pdev, ddata);
   573	
   574		/* Active state selected in phy_mdm6600_power_on() */
   575		error = pinctrl_pm_select_sleep_state(ddata->dev);
   576		if (error)
   577			dev_warn(ddata->dev, "%s: error with sleep_state: %i\n",
   578				 __func__, error);
   579	
   580		error = phy_mdm6600_init_lines(ddata);
   581		if (error)
   582			return error;
   583	
   584		phy_mdm6600_init_irq(ddata);
   585		schedule_delayed_work(&ddata->bootup_work, 0);
   586	
   587		/*
   588		 * See phy_mdm6600_device_power_on(). We should be able
   589		 * to remove this eventually when ohci-platform can deal
   590		 * with -EPROBE_DEFER.
   591		 */
   592		msleep(PHY_MDM6600_PHY_DELAY_MS + 500);
   593	
   594		/*
   595		 * Enable PM runtime only after PHY has been powered up properly.
   596		 * It is currently only needed after USB suspends mdm6600 and n_gsm
   597		 * needs to access the device. We don't want to do this earlier as
   598		 * gpio mode0 pin doubles as mdm6600 wake-up gpio.
   599		 */
   600		pm_runtime_use_autosuspend(ddata->dev);
   601		pm_runtime_set_autosuspend_delay(ddata->dev,
   602						 MDM6600_MODEM_IDLE_DELAY_MS);
   603		pm_runtime_enable(ddata->dev);
   604		error = pm_runtime_get_sync(ddata->dev);
   605		if (error < 0) {
   606			dev_warn(ddata->dev, "failed to wake modem: %i\n", error);
   607			pm_runtime_put_noidle(ddata->dev);
   608			goto cleanup;
   609		}
   610	
   611		ddata->generic_phy = devm_phy_create(ddata->dev, NULL, &gpio_usb_ops);
   612		if (IS_ERR(ddata->generic_phy)) {
   613			error = PTR_ERR(ddata->generic_phy);
   614			goto idle;
   615		}
   616	
   617		phy_set_drvdata(ddata->generic_phy, ddata);
   618	
   619		ddata->phy_provider =
   620			devm_of_phy_provider_register(ddata->dev,
   621						      of_phy_simple_xlate);
   622		if (IS_ERR(ddata->phy_provider))
   623			error = PTR_ERR(ddata->phy_provider);
   624	
   625	idle:
   626		pm_runtime_mark_last_busy(ddata->dev);
   627		pm_runtime_put_autosuspend(ddata->dev);
   628	
   629	cleanup:
   630		if (error < 0)
   631			phy_mdm6600_device_power_off(ddata);
   632	
 > 633	disable_pm:
   634		pm_runtime_disable(ddata->dev);
   635	
   636		return error;
   637	}
   638	

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

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

* Re: [PATCH] phy: mapphone-mdm6600: Fix PM disable depth imbalance in phy_mdm6600_probe
@ 2022-01-05 18:41   ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2022-01-05 18:41 UTC (permalink / raw)
  To: Miaoqian Lin
  Cc: llvm, kbuild-all, linmq006, Kishon Vijay Abraham I, Vinod Koul,
	Tony Lindgren, linux-phy, linux-kernel

Hi Miaoqian,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.16-rc8 next-20220105]
[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/Miaoqian-Lin/phy-mapphone-mdm6600-Fix-PM-disable-depth-imbalance-in-phy_mdm6600_probe/20220105-204113
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git c9e6606c7fe92b50a02ce51dda82586ebdf99b48
config: hexagon-randconfig-r035-20220105 (https://download.01.org/0day-ci/archive/20220106/202201060211.yT7coTKI-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d5b6e30ed3acad794dd0aec400e617daffc6cc3d)
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/62cad5a4dd9feab731b40f99e6e0bf7a2429f1ed
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Miaoqian-Lin/phy-mapphone-mdm6600-Fix-PM-disable-depth-imbalance-in-phy_mdm6600_probe/20220105-204113
        git checkout 62cad5a4dd9feab731b40f99e6e0bf7a2429f1ed
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/phy/motorola/

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/phy/motorola/phy-mapphone-mdm6600.c:633:1: warning: unused label 'disable_pm' [-Wunused-label]
   disable_pm:
   ^~~~~~~~~~~
   1 warning generated.


vim +/disable_pm +633 drivers/phy/motorola/phy-mapphone-mdm6600.c

   555	
   556	static int phy_mdm6600_probe(struct platform_device *pdev)
   557	{
   558		struct phy_mdm6600 *ddata;
   559		int error;
   560	
   561		ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
   562		if (!ddata)
   563			return -ENOMEM;
   564	
   565		INIT_DELAYED_WORK(&ddata->bootup_work,
   566				  phy_mdm6600_deferred_power_on);
   567		INIT_DELAYED_WORK(&ddata->status_work, phy_mdm6600_status);
   568		INIT_DELAYED_WORK(&ddata->modem_wake_work, phy_mdm6600_modem_wake);
   569		init_completion(&ddata->ack);
   570	
   571		ddata->dev = &pdev->dev;
   572		platform_set_drvdata(pdev, ddata);
   573	
   574		/* Active state selected in phy_mdm6600_power_on() */
   575		error = pinctrl_pm_select_sleep_state(ddata->dev);
   576		if (error)
   577			dev_warn(ddata->dev, "%s: error with sleep_state: %i\n",
   578				 __func__, error);
   579	
   580		error = phy_mdm6600_init_lines(ddata);
   581		if (error)
   582			return error;
   583	
   584		phy_mdm6600_init_irq(ddata);
   585		schedule_delayed_work(&ddata->bootup_work, 0);
   586	
   587		/*
   588		 * See phy_mdm6600_device_power_on(). We should be able
   589		 * to remove this eventually when ohci-platform can deal
   590		 * with -EPROBE_DEFER.
   591		 */
   592		msleep(PHY_MDM6600_PHY_DELAY_MS + 500);
   593	
   594		/*
   595		 * Enable PM runtime only after PHY has been powered up properly.
   596		 * It is currently only needed after USB suspends mdm6600 and n_gsm
   597		 * needs to access the device. We don't want to do this earlier as
   598		 * gpio mode0 pin doubles as mdm6600 wake-up gpio.
   599		 */
   600		pm_runtime_use_autosuspend(ddata->dev);
   601		pm_runtime_set_autosuspend_delay(ddata->dev,
   602						 MDM6600_MODEM_IDLE_DELAY_MS);
   603		pm_runtime_enable(ddata->dev);
   604		error = pm_runtime_get_sync(ddata->dev);
   605		if (error < 0) {
   606			dev_warn(ddata->dev, "failed to wake modem: %i\n", error);
   607			pm_runtime_put_noidle(ddata->dev);
   608			goto cleanup;
   609		}
   610	
   611		ddata->generic_phy = devm_phy_create(ddata->dev, NULL, &gpio_usb_ops);
   612		if (IS_ERR(ddata->generic_phy)) {
   613			error = PTR_ERR(ddata->generic_phy);
   614			goto idle;
   615		}
   616	
   617		phy_set_drvdata(ddata->generic_phy, ddata);
   618	
   619		ddata->phy_provider =
   620			devm_of_phy_provider_register(ddata->dev,
   621						      of_phy_simple_xlate);
   622		if (IS_ERR(ddata->phy_provider))
   623			error = PTR_ERR(ddata->phy_provider);
   624	
   625	idle:
   626		pm_runtime_mark_last_busy(ddata->dev);
   627		pm_runtime_put_autosuspend(ddata->dev);
   628	
   629	cleanup:
   630		if (error < 0)
   631			phy_mdm6600_device_power_off(ddata);
   632	
 > 633	disable_pm:
   634		pm_runtime_disable(ddata->dev);
   635	
   636		return error;
   637	}
   638	

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

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH] phy: mapphone-mdm6600: Fix PM disable depth imbalance in phy_mdm6600_probe
@ 2022-01-05 18:41   ` kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2022-01-05 18:41 UTC (permalink / raw)
  To: kbuild-all

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

Hi Miaoqian,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.16-rc8 next-20220105]
[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/Miaoqian-Lin/phy-mapphone-mdm6600-Fix-PM-disable-depth-imbalance-in-phy_mdm6600_probe/20220105-204113
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git c9e6606c7fe92b50a02ce51dda82586ebdf99b48
config: hexagon-randconfig-r035-20220105 (https://download.01.org/0day-ci/archive/20220106/202201060211.yT7coTKI-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d5b6e30ed3acad794dd0aec400e617daffc6cc3d)
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/62cad5a4dd9feab731b40f99e6e0bf7a2429f1ed
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Miaoqian-Lin/phy-mapphone-mdm6600-Fix-PM-disable-depth-imbalance-in-phy_mdm6600_probe/20220105-204113
        git checkout 62cad5a4dd9feab731b40f99e6e0bf7a2429f1ed
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/phy/motorola/

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/phy/motorola/phy-mapphone-mdm6600.c:633:1: warning: unused label 'disable_pm' [-Wunused-label]
   disable_pm:
   ^~~~~~~~~~~
   1 warning generated.


vim +/disable_pm +633 drivers/phy/motorola/phy-mapphone-mdm6600.c

   555	
   556	static int phy_mdm6600_probe(struct platform_device *pdev)
   557	{
   558		struct phy_mdm6600 *ddata;
   559		int error;
   560	
   561		ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
   562		if (!ddata)
   563			return -ENOMEM;
   564	
   565		INIT_DELAYED_WORK(&ddata->bootup_work,
   566				  phy_mdm6600_deferred_power_on);
   567		INIT_DELAYED_WORK(&ddata->status_work, phy_mdm6600_status);
   568		INIT_DELAYED_WORK(&ddata->modem_wake_work, phy_mdm6600_modem_wake);
   569		init_completion(&ddata->ack);
   570	
   571		ddata->dev = &pdev->dev;
   572		platform_set_drvdata(pdev, ddata);
   573	
   574		/* Active state selected in phy_mdm6600_power_on() */
   575		error = pinctrl_pm_select_sleep_state(ddata->dev);
   576		if (error)
   577			dev_warn(ddata->dev, "%s: error with sleep_state: %i\n",
   578				 __func__, error);
   579	
   580		error = phy_mdm6600_init_lines(ddata);
   581		if (error)
   582			return error;
   583	
   584		phy_mdm6600_init_irq(ddata);
   585		schedule_delayed_work(&ddata->bootup_work, 0);
   586	
   587		/*
   588		 * See phy_mdm6600_device_power_on(). We should be able
   589		 * to remove this eventually when ohci-platform can deal
   590		 * with -EPROBE_DEFER.
   591		 */
   592		msleep(PHY_MDM6600_PHY_DELAY_MS + 500);
   593	
   594		/*
   595		 * Enable PM runtime only after PHY has been powered up properly.
   596		 * It is currently only needed after USB suspends mdm6600 and n_gsm
   597		 * needs to access the device. We don't want to do this earlier as
   598		 * gpio mode0 pin doubles as mdm6600 wake-up gpio.
   599		 */
   600		pm_runtime_use_autosuspend(ddata->dev);
   601		pm_runtime_set_autosuspend_delay(ddata->dev,
   602						 MDM6600_MODEM_IDLE_DELAY_MS);
   603		pm_runtime_enable(ddata->dev);
   604		error = pm_runtime_get_sync(ddata->dev);
   605		if (error < 0) {
   606			dev_warn(ddata->dev, "failed to wake modem: %i\n", error);
   607			pm_runtime_put_noidle(ddata->dev);
   608			goto cleanup;
   609		}
   610	
   611		ddata->generic_phy = devm_phy_create(ddata->dev, NULL, &gpio_usb_ops);
   612		if (IS_ERR(ddata->generic_phy)) {
   613			error = PTR_ERR(ddata->generic_phy);
   614			goto idle;
   615		}
   616	
   617		phy_set_drvdata(ddata->generic_phy, ddata);
   618	
   619		ddata->phy_provider =
   620			devm_of_phy_provider_register(ddata->dev,
   621						      of_phy_simple_xlate);
   622		if (IS_ERR(ddata->phy_provider))
   623			error = PTR_ERR(ddata->phy_provider);
   624	
   625	idle:
   626		pm_runtime_mark_last_busy(ddata->dev);
   627		pm_runtime_put_autosuspend(ddata->dev);
   628	
   629	cleanup:
   630		if (error < 0)
   631			phy_mdm6600_device_power_off(ddata);
   632	
 > 633	disable_pm:
   634		pm_runtime_disable(ddata->dev);
   635	
   636		return error;
   637	}
   638	

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

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

* [PATCH] phy: mapphone-mdm6600: Fix PM disable depth imbalance in phy_mdm6600_probe
@ 2022-01-05 12:39 ` Miaoqian Lin
  0 siblings, 0 replies; 6+ messages in thread
From: Miaoqian Lin @ 2022-01-05 12:39 UTC (permalink / raw)
  Cc: linmq006, Kishon Vijay Abraham I, Vinod Koul, Tony Lindgren,
	linux-phy, linux-kernel

The pm_runtime_enable will increase power disable depth.
If the probe fails, we should use pm_runtime_disable() to balance
pm_runtime_enable().

Fixes: f7f50b2 ("phy: mapphone-mdm6600: Add runtime PM support for n_gsm on USB suspend")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
 drivers/phy/motorola/phy-mapphone-mdm6600.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/phy/motorola/phy-mapphone-mdm6600.c b/drivers/phy/motorola/phy-mapphone-mdm6600.c
index 5172971f4c36..14666750946c 100644
--- a/drivers/phy/motorola/phy-mapphone-mdm6600.c
+++ b/drivers/phy/motorola/phy-mapphone-mdm6600.c
@@ -630,6 +630,9 @@ static int phy_mdm6600_probe(struct platform_device *pdev)
 	if (error < 0)
 		phy_mdm6600_device_power_off(ddata);
 
+disable_pm:
+	pm_runtime_disable(ddata->dev);
+
 	return error;
 }
 
-- 
2.17.1


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

* [PATCH] phy: mapphone-mdm6600: Fix PM disable depth imbalance in phy_mdm6600_probe
@ 2022-01-05 12:39 ` Miaoqian Lin
  0 siblings, 0 replies; 6+ messages in thread
From: Miaoqian Lin @ 2022-01-05 12:39 UTC (permalink / raw)
  Cc: linmq006, Kishon Vijay Abraham I, Vinod Koul, Tony Lindgren,
	linux-phy, linux-kernel

The pm_runtime_enable will increase power disable depth.
If the probe fails, we should use pm_runtime_disable() to balance
pm_runtime_enable().

Fixes: f7f50b2 ("phy: mapphone-mdm6600: Add runtime PM support for n_gsm on USB suspend")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
 drivers/phy/motorola/phy-mapphone-mdm6600.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/phy/motorola/phy-mapphone-mdm6600.c b/drivers/phy/motorola/phy-mapphone-mdm6600.c
index 5172971f4c36..14666750946c 100644
--- a/drivers/phy/motorola/phy-mapphone-mdm6600.c
+++ b/drivers/phy/motorola/phy-mapphone-mdm6600.c
@@ -630,6 +630,9 @@ static int phy_mdm6600_probe(struct platform_device *pdev)
 	if (error < 0)
 		phy_mdm6600_device_power_off(ddata);
 
+disable_pm:
+	pm_runtime_disable(ddata->dev);
+
 	return error;
 }
 
-- 
2.17.1


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

end of thread, other threads:[~2022-01-07 10:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-07 10:01 [PATCH] phy: mapphone-mdm6600: Fix PM disable depth imbalance in phy_mdm6600_probe kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2022-01-05 12:39 Miaoqian Lin
2022-01-05 12:39 ` Miaoqian Lin
2022-01-05 18:41 ` kernel test robot
2022-01-05 18:41   ` kernel test robot
2022-01-05 18:41   ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.