All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Artur Petrosyan <Arthur.Petrosyan@synopsys.com>,
	Felipe Balbi <balbi@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	John Youn <John.Youn@synopsys.com>,
	Artur Petrosyan <Arthur.Petrosyan@synopsys.com>
Subject: Re: [PATCH 13/15] usb: dwc2: Add exit hibernation mode before removing drive
Date: Thu, 15 Apr 2021 17:50:23 +0800	[thread overview]
Message-ID: <202104151755.Vr7X4Oqe-lkp@intel.com> (raw)
In-Reply-To: <d01d23e2473407af37c42acb6ca4815ae5fd256e.1618464534.git.Arthur.Petrosyan@synopsys.com>

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

Hi Artur,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on usb/usb-testing]
[also build test WARNING on next-20210414]
[cannot apply to peter.chen-usb/for-usb-next linus/master balbi-usb/testing/next v5.12-rc7]
[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/Artur-Petrosyan/usb-dwc2-Update-exit-hibernation-when-port-reset-is-asserted/20210415-144021
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: x86_64-randconfig-a014-20210415 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 6a18cc23efad410db48a3ccfc233d215de7d4cb9)
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 x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/8e4dbc0200040af9c752aca4090cd41572e6fb86
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Artur-Petrosyan/usb-dwc2-Update-exit-hibernation-when-port-reset-is-asserted/20210415-144021
        git checkout 8e4dbc0200040af9c752aca4090cd41572e6fb86
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64 

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/usb/dwc2/platform.c:324:7: warning: variable 'gr' is uninitialized when used here [-Wuninitialized]
                   if (gr->gotgctl & GOTGCTL_CURMODE_HOST) {
                       ^~
   drivers/usb/dwc2/platform.c:319:30: note: initialize the variable 'gr' to silence this warning
           struct dwc2_gregs_backup *gr;
                                       ^
                                        = NULL
   1 warning generated.


vim +/gr +324 drivers/usb/dwc2/platform.c

   304	
   305	/**
   306	 * dwc2_driver_remove() - Called when the DWC_otg core is unregistered with the
   307	 * DWC_otg driver
   308	 *
   309	 * @dev: Platform device
   310	 *
   311	 * This routine is called, for example, when the rmmod command is executed. The
   312	 * device may or may not be electrically present. If it is present, the driver
   313	 * stops device processing. Any resources used on behalf of this device are
   314	 * freed.
   315	 */
   316	static int dwc2_driver_remove(struct platform_device *dev)
   317	{
   318		struct dwc2_hsotg *hsotg = platform_get_drvdata(dev);
   319		struct dwc2_gregs_backup *gr;
   320		int ret = 0;
   321	
   322		/* Exit Hibernation when driver is removed. */
   323		if (hsotg->hibernated) {
 > 324			if (gr->gotgctl & GOTGCTL_CURMODE_HOST) {
   325				ret = dwc2_exit_hibernation(hsotg, 0, 0, 1);
   326				if (ret)
   327					dev_err(hsotg->dev,
   328						"exit hibernation failed.\n");
   329			} else {
   330				ret = dwc2_exit_hibernation(hsotg, 0, 0, 0);
   331				if (ret)
   332					dev_err(hsotg->dev,
   333						"exit hibernation failed.\n");
   334			}
   335		}
   336	
   337		/* Exit Partial Power Down when driver is removed. */
   338		if (hsotg->in_ppd) {
   339			ret = dwc2_exit_partial_power_down(hsotg, 0, true);
   340			if (ret)
   341				dev_err(hsotg->dev,
   342					"exit partial_power_down failed\n");
   343		}
   344	
   345		/* Exit clock gating when driver is removed. */
   346		if (hsotg->params.power_down == DWC2_POWER_DOWN_PARAM_NONE &&
   347		    hsotg->bus_suspended) {
   348			if (dwc2_is_device_mode(hsotg))
   349				dwc2_gadget_exit_clock_gating(hsotg, 0);
   350			else
   351				dwc2_host_exit_clock_gating(hsotg, 0);
   352		}
   353	
   354		dwc2_debugfs_exit(hsotg);
   355		if (hsotg->hcd_enabled)
   356			dwc2_hcd_remove(hsotg);
   357		if (hsotg->gadget_enabled)
   358			dwc2_hsotg_remove(hsotg);
   359	
   360		dwc2_drd_exit(hsotg);
   361	
   362		if (hsotg->params.activate_stm_id_vb_detection)
   363			regulator_disable(hsotg->usb33d);
   364	
   365		if (hsotg->ll_hw_enabled)
   366			dwc2_lowlevel_hw_disable(hsotg);
   367	
   368		reset_control_assert(hsotg->reset);
   369		reset_control_assert(hsotg->reset_ecc);
   370	
   371		return ret;
   372	}
   373	

---
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: 39577 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 13/15] usb: dwc2: Add exit hibernation mode before removing drive
Date: Thu, 15 Apr 2021 17:50:23 +0800	[thread overview]
Message-ID: <202104151755.Vr7X4Oqe-lkp@intel.com> (raw)
In-Reply-To: <d01d23e2473407af37c42acb6ca4815ae5fd256e.1618464534.git.Arthur.Petrosyan@synopsys.com>

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

Hi Artur,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on usb/usb-testing]
[also build test WARNING on next-20210414]
[cannot apply to peter.chen-usb/for-usb-next linus/master balbi-usb/testing/next v5.12-rc7]
[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/Artur-Petrosyan/usb-dwc2-Update-exit-hibernation-when-port-reset-is-asserted/20210415-144021
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: x86_64-randconfig-a014-20210415 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 6a18cc23efad410db48a3ccfc233d215de7d4cb9)
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 x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/8e4dbc0200040af9c752aca4090cd41572e6fb86
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Artur-Petrosyan/usb-dwc2-Update-exit-hibernation-when-port-reset-is-asserted/20210415-144021
        git checkout 8e4dbc0200040af9c752aca4090cd41572e6fb86
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64 

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/usb/dwc2/platform.c:324:7: warning: variable 'gr' is uninitialized when used here [-Wuninitialized]
                   if (gr->gotgctl & GOTGCTL_CURMODE_HOST) {
                       ^~
   drivers/usb/dwc2/platform.c:319:30: note: initialize the variable 'gr' to silence this warning
           struct dwc2_gregs_backup *gr;
                                       ^
                                        = NULL
   1 warning generated.


vim +/gr +324 drivers/usb/dwc2/platform.c

   304	
   305	/**
   306	 * dwc2_driver_remove() - Called when the DWC_otg core is unregistered with the
   307	 * DWC_otg driver
   308	 *
   309	 * @dev: Platform device
   310	 *
   311	 * This routine is called, for example, when the rmmod command is executed. The
   312	 * device may or may not be electrically present. If it is present, the driver
   313	 * stops device processing. Any resources used on behalf of this device are
   314	 * freed.
   315	 */
   316	static int dwc2_driver_remove(struct platform_device *dev)
   317	{
   318		struct dwc2_hsotg *hsotg = platform_get_drvdata(dev);
   319		struct dwc2_gregs_backup *gr;
   320		int ret = 0;
   321	
   322		/* Exit Hibernation when driver is removed. */
   323		if (hsotg->hibernated) {
 > 324			if (gr->gotgctl & GOTGCTL_CURMODE_HOST) {
   325				ret = dwc2_exit_hibernation(hsotg, 0, 0, 1);
   326				if (ret)
   327					dev_err(hsotg->dev,
   328						"exit hibernation failed.\n");
   329			} else {
   330				ret = dwc2_exit_hibernation(hsotg, 0, 0, 0);
   331				if (ret)
   332					dev_err(hsotg->dev,
   333						"exit hibernation failed.\n");
   334			}
   335		}
   336	
   337		/* Exit Partial Power Down when driver is removed. */
   338		if (hsotg->in_ppd) {
   339			ret = dwc2_exit_partial_power_down(hsotg, 0, true);
   340			if (ret)
   341				dev_err(hsotg->dev,
   342					"exit partial_power_down failed\n");
   343		}
   344	
   345		/* Exit clock gating when driver is removed. */
   346		if (hsotg->params.power_down == DWC2_POWER_DOWN_PARAM_NONE &&
   347		    hsotg->bus_suspended) {
   348			if (dwc2_is_device_mode(hsotg))
   349				dwc2_gadget_exit_clock_gating(hsotg, 0);
   350			else
   351				dwc2_host_exit_clock_gating(hsotg, 0);
   352		}
   353	
   354		dwc2_debugfs_exit(hsotg);
   355		if (hsotg->hcd_enabled)
   356			dwc2_hcd_remove(hsotg);
   357		if (hsotg->gadget_enabled)
   358			dwc2_hsotg_remove(hsotg);
   359	
   360		dwc2_drd_exit(hsotg);
   361	
   362		if (hsotg->params.activate_stm_id_vb_detection)
   363			regulator_disable(hsotg->usb33d);
   364	
   365		if (hsotg->ll_hw_enabled)
   366			dwc2_lowlevel_hw_disable(hsotg);
   367	
   368		reset_control_assert(hsotg->reset);
   369		reset_control_assert(hsotg->reset_ecc);
   370	
   371		return ret;
   372	}
   373	

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

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

  parent reply	other threads:[~2021-04-15  9:51 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1618464534.git.Arthur.Petrosyan@synopsys.com>
2021-04-15  5:39 ` [PATCH 01/15] usb: dwc2: Update exit hibernation when port reset is asserted Artur Petrosyan
2021-04-15  5:39 ` [PATCH 02/15] usb: dwc2: Reset DEVADDR after exiting gadget hibernation Artur Petrosyan
2021-04-15  5:39 ` [PATCH 03/15] usb: dwc2: Fix host mode hibernation exit with remote wakeup flow Artur Petrosyan
2021-04-15  5:39 ` [PATCH 04/15] usb: dwc2: Fix hibernation between host and device modes Artur Petrosyan
2021-04-15  5:40 ` [PATCH 05/15] usb: dwc2: Allow exiting hibernation from gpwrdn rst detect Artur Petrosyan
2021-04-15  5:40 ` [PATCH 06/15] usb: dwc2: Clear fifo_map when resetting core Artur Petrosyan
2021-04-15  5:40 ` [PATCH 07/15] usb: dwc2: Clear GINTSTS_RESTOREDONE bit after restore is generated Artur Petrosyan
2021-04-15  5:40 ` [PATCH 08/15] usb: dwc2: Move enter hibernation to dwc2_port_suspend() function Artur Petrosyan
2021-04-15  5:40 ` [PATCH 09/15] usb: dwc2: Move exit hibernation to dwc2_port_resume() function Artur Petrosyan
2021-04-15  5:40 ` [PATCH 10/15] usb: dwc2: Allow exit hibernation in urb enqueue Artur Petrosyan
2021-04-15  9:12   ` Sergei Shtylyov
2021-04-16  5:43     ` Artur Petrosyan
2021-04-16  7:05       ` Artur Petrosyan
2021-04-15  5:40 ` [PATCH 11/15] usb: dwc2: Add hibernation entering flow by system suspend Artur Petrosyan
2021-04-15  5:40 ` [PATCH 12/15] usb: dwc2: Add hibernation exiting flow by system resume Artur Petrosyan
2021-04-15  5:41 ` [PATCH 13/15] usb: dwc2: Add exit hibernation mode before removing drive Artur Petrosyan
2021-04-15  9:24   ` Sergei Shtylyov
2021-04-16  5:46     ` Artur Petrosyan
2021-04-15  9:50   ` kernel test robot [this message]
2021-04-15  9:50     ` kernel test robot
2021-04-15 13:40   ` [kbuild] " Dan Carpenter
2021-04-15 13:40     ` Dan Carpenter
2021-04-15 13:40     ` Dan Carpenter
2021-04-15  5:41 ` [PATCH 14/15] usb: dwc2: Update dwc2_handle_usb_suspend_intr function Artur Petrosyan
2021-04-15  5:41 ` [PATCH 15/15] usb: dwc2: Get rid of useless error checks in suspend interrupt Artur Petrosyan
2021-04-16 12:46 ` [PATCH v2 00/15] usb: dwc2: Fix Hibernation issues Artur Petrosyan
2021-04-16 12:46 ` [PATCH v2 01/15] usb: dwc2: Update exit hibernation when port reset is asserted Artur Petrosyan
2021-04-19  7:30   ` Minas Harutyunyan
2021-04-16 12:46 ` [PATCH v2 02/15] usb: dwc2: Reset DEVADDR after exiting gadget hibernation Artur Petrosyan
2021-04-16 12:47 ` [PATCH v2 03/15] usb: dwc2: Fix host mode hibernation exit with remote wakeup flow Artur Petrosyan
2021-04-19  7:30   ` Minas Harutyunyan
2021-04-16 12:47 ` [PATCH v2 04/15] usb: dwc2: Fix hibernation between host and device modes Artur Petrosyan
2021-04-16 12:47 ` [PATCH v2 05/15] usb: dwc2: Allow exiting hibernation from gpwrdn rst detect Artur Petrosyan
2021-04-16 12:47 ` [PATCH v2 06/15] usb: dwc2: Clear fifo_map when resetting core Artur Petrosyan
2021-04-16 12:47 ` [PATCH v2 07/15] usb: dwc2: Clear GINTSTS_RESTOREDONE bit after restore is generated Artur Petrosyan
2021-04-16 12:47 ` [PATCH v2 08/15] usb: dwc2: Move enter hibernation to dwc2_port_suspend() function Artur Petrosyan
2021-04-19  7:31   ` Minas Harutyunyan
2021-04-16 12:47 ` [PATCH v2 09/15] usb: dwc2: Move exit hibernation to dwc2_port_resume() function Artur Petrosyan
2021-04-19  7:31   ` Minas Harutyunyan
2021-04-16 12:48 ` [PATCH v2 10/15] usb: dwc2: Allow exit hibernation in urb enqueue Artur Petrosyan
2021-04-19  7:31   ` Minas Harutyunyan
2021-04-16 12:48 ` [PATCH v2 11/15] usb: dwc2: Add hibernation entering flow by system suspend Artur Petrosyan
2021-04-19  7:31   ` Minas Harutyunyan
2021-04-16 12:48 ` [PATCH v2 12/15] usb: dwc2: Add hibernation exiting flow by system resume Artur Petrosyan
2021-04-19  7:31   ` Minas Harutyunyan
2021-04-16 12:48 ` [PATCH v2 13/15] usb: dwc2: Add exit hibernation mode before removing drive Artur Petrosyan
2021-04-19  7:32   ` Minas Harutyunyan
2021-04-16 12:48 ` [PATCH v2 14/15] usb: dwc2: Update dwc2_handle_usb_suspend_intr function Artur Petrosyan
2021-04-16 12:48 ` [PATCH v2 15/15] usb: dwc2: Get rid of useless error checks in suspend interrupt Artur Petrosyan
2021-04-19  7:32   ` Minas Harutyunyan
2021-04-15 12:34 [PATCH 13/15] usb: dwc2: Add exit hibernation mode before removing drive kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202104151755.Vr7X4Oqe-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Arthur.Petrosyan@synopsys.com \
    --cc=John.Youn@synopsys.com \
    --cc=Minas.Harutyunyan@synopsys.com \
    --cc=balbi@kernel.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.