From: kernel test robot <error27@gmail.com>
To: oe-kbuild@lists.linux.dev,
Udipto Goswami <quic_ugoswami@quicinc.com>,
Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>,
oe-kbuild-all@lists.linux.dev,
Pratham Pratap <quic_ppratap@quicinc.com>,
Jack Pham <quic_jackp@quicinc.com>,
linux-usb@vger.kernel.org, Oliver Neukum <oneukum@suse.com>,
Johan Hovold <johan+linaro@kernel.org>,
Udipto Goswami <quic_ugoswami@quicinc.com>
Subject: Re: [PATCH v5] usb: dwc3: debugfs: Prevent any register access when devices
Date: Wed, 19 Apr 2023 09:14:32 +0300 [thread overview]
Message-ID: <ZD+GyFCRUc6SdUl+@kadam> (raw)
In-Reply-To: <20230418121835.17550-1-quic_ugoswami@quicinc.com>
Hi Udipto,
kernel test robot noticed the following build warnings:
[auto build test WARNING on usb/usb-testing]
[also build test WARNING on usb/usb-next usb/usb-linus driver-core/driver-core-testing driver-core/driver-core-next driver-core/driver-core-linus westeri-thunderbolt/next linus/master v6.3-rc7 next-20230418]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Udipto-Goswami/usb-dwc3-debugfs-Prevent-any-register-access-when-devices/20230418-202039
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
patch link: https://lore.kernel.org/r/20230418121835.17550-1-quic_ugoswami%40quicinc.com
patch subject: [PATCH v5] usb: dwc3: debugfs: Prevent any register access when devices
config: x86_64-randconfig-m001 (https://download.01.org/0day-ci/archive/20230419/202304191354.gk7ee6Gf-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Link: https://lore.kernel.org/r/202304191354.gk7ee6Gf-lkp@intel.com/
smatch warnings:
drivers/usb/dwc3/debugfs.c:338 dwc3_lsp_show() warn: pm_runtime_get_sync() also returns 1 on success
drivers/usb/dwc3/debugfs.c:409 dwc3_mode_show() warn: pm_runtime_get_sync() also returns 1 on success
drivers/usb/dwc3/debugfs.c:485 dwc3_testmode_show() warn: pm_runtime_get_sync() also returns 1 on success
drivers/usb/dwc3/debugfs.c:555 dwc3_testmode_write() warn: pm_runtime_get_sync() also returns 1 on success
drivers/usb/dwc3/debugfs.c:586 dwc3_link_state_show() warn: pm_runtime_get_sync() also returns 1 on success
drivers/usb/dwc3/debugfs.c:649 dwc3_link_state_write() warn: pm_runtime_get_sync() also returns 1 on success
drivers/usb/dwc3/debugfs.c:702 dwc3_tx_fifo_size_show() warn: pm_runtime_get_sync() also returns 1 on success
drivers/usb/dwc3/debugfs.c:732 dwc3_rx_fifo_size_show() warn: pm_runtime_get_sync() also returns 1 on success
drivers/usb/dwc3/debugfs.c:761 dwc3_tx_request_queue_show() warn: pm_runtime_get_sync() also returns 1 on success
drivers/usb/dwc3/debugfs.c:784 dwc3_rx_request_queue_show() warn: pm_runtime_get_sync() also returns 1 on success
drivers/usb/dwc3/debugfs.c:807 dwc3_rx_info_queue_show() warn: pm_runtime_get_sync() also returns 1 on success
drivers/usb/dwc3/debugfs.c:830 dwc3_descriptor_fetch_queue_show() warn: pm_runtime_get_sync() also returns 1 on success
drivers/usb/dwc3/debugfs.c:853 dwc3_event_queue_show() warn: pm_runtime_get_sync() also returns 1 on success
drivers/usb/dwc3/debugfs.c:911 dwc3_trb_ring_show() warn: pm_runtime_get_sync() also returns 1 on success
drivers/usb/dwc3/debugfs.c:960 dwc3_ep_info_register_show() warn: pm_runtime_get_sync() also returns 1 on success
vim +338 drivers/usb/dwc3/debugfs.c
62ba09d6bb6330 Thinh Nguyen 2018-11-07 329 static int dwc3_lsp_show(struct seq_file *s, void *unused)
62ba09d6bb6330 Thinh Nguyen 2018-11-07 330 {
62ba09d6bb6330 Thinh Nguyen 2018-11-07 331 struct dwc3 *dwc = s->private;
62ba09d6bb6330 Thinh Nguyen 2018-11-07 332 unsigned int current_mode;
62ba09d6bb6330 Thinh Nguyen 2018-11-07 333 unsigned long flags;
62ba09d6bb6330 Thinh Nguyen 2018-11-07 334 u32 reg;
86f75fd9ae2609 Udipto Goswami 2023-04-18 335 int ret;
86f75fd9ae2609 Udipto Goswami 2023-04-18 336
86f75fd9ae2609 Udipto Goswami 2023-04-18 337 ret = pm_runtime_get_sync(dwc->dev);
86f75fd9ae2609 Udipto Goswami 2023-04-18 @338 if (!ret || ret < 0) {
86f75fd9ae2609 Udipto Goswami 2023-04-18 339 pm_runtime_put(dwc->dev);
86f75fd9ae2609 Udipto Goswami 2023-04-18 340 return 0;
I don't know what's going on here, but Smatch doesn't like it. :P
86f75fd9ae2609 Udipto Goswami 2023-04-18 341 }
62ba09d6bb6330 Thinh Nguyen 2018-11-07 342
62ba09d6bb6330 Thinh Nguyen 2018-11-07 343 spin_lock_irqsave(&dwc->lock, flags);
62ba09d6bb6330 Thinh Nguyen 2018-11-07 344 reg = dwc3_readl(dwc->regs, DWC3_GSTS);
62ba09d6bb6330 Thinh Nguyen 2018-11-07 345 current_mode = DWC3_GSTS_CURMOD(reg);
62ba09d6bb6330 Thinh Nguyen 2018-11-07 346
62ba09d6bb6330 Thinh Nguyen 2018-11-07 347 switch (current_mode) {
62ba09d6bb6330 Thinh Nguyen 2018-11-07 348 case DWC3_GSTS_CURMOD_HOST:
62ba09d6bb6330 Thinh Nguyen 2018-11-07 349 dwc3_host_lsp(s);
62ba09d6bb6330 Thinh Nguyen 2018-11-07 350 break;
62ba09d6bb6330 Thinh Nguyen 2018-11-07 351 case DWC3_GSTS_CURMOD_DEVICE:
62ba09d6bb6330 Thinh Nguyen 2018-11-07 352 dwc3_gadget_lsp(s);
62ba09d6bb6330 Thinh Nguyen 2018-11-07 353 break;
62ba09d6bb6330 Thinh Nguyen 2018-11-07 354 default:
62ba09d6bb6330 Thinh Nguyen 2018-11-07 355 seq_puts(s, "Mode is unknown, no LSP register printed\n");
62ba09d6bb6330 Thinh Nguyen 2018-11-07 356 break;
62ba09d6bb6330 Thinh Nguyen 2018-11-07 357 }
62ba09d6bb6330 Thinh Nguyen 2018-11-07 358 spin_unlock_irqrestore(&dwc->lock, flags);
86f75fd9ae2609 Udipto Goswami 2023-04-18 359 pm_runtime_put(dwc->dev);
62ba09d6bb6330 Thinh Nguyen 2018-11-07 360
62ba09d6bb6330 Thinh Nguyen 2018-11-07 361 return 0;
62ba09d6bb6330 Thinh Nguyen 2018-11-07 362 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
prev parent reply other threads:[~2023-04-19 6:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-18 12:18 [PATCH v5] usb: dwc3: debugfs: Prevent any register access when devices Udipto Goswami
2023-04-18 12:25 ` Greg Kroah-Hartman
2023-04-18 13:01 ` Johan Hovold
2023-04-18 13:26 ` Greg Kroah-Hartman
2023-04-19 3:43 ` Udipto Goswami
2023-04-19 3:44 ` Udipto Goswami
2023-04-19 6:14 ` kernel test robot [this message]
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=ZD+GyFCRUc6SdUl+@kadam \
--to=error27@gmail.com \
--cc=Thinh.Nguyen@synopsys.com \
--cc=gregkh@linuxfoundation.org \
--cc=johan+linaro@kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=oneukum@suse.com \
--cc=quic_jackp@quicinc.com \
--cc=quic_ppratap@quicinc.com \
--cc=quic_ugoswami@quicinc.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox