From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com
Subject: Re: [PATCH v9 1/1] serial: core: Start managing serial controllers to enable runtime PM
Date: Thu, 23 Mar 2023 19:12:12 +0800 [thread overview]
Message-ID: <202303231841.Yu8ZOXjb-lkp@intel.com> (raw)
::::::
:::::: Manual check reason: "low confidence static check warning: drivers/tty/serial/serial_core.c:3284:25: warning: Parameter 'phys_dev' can be declared as pointer to const [constParameter]"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20230323071051.2184-1-tony@atomide.com>
References: <20230323071051.2184-1-tony@atomide.com>
TO: Tony Lindgren <tony@atomide.com>
TO: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
TO: Jiri Slaby <jirislaby@kernel.org>
CC: Andy Shevchenko <andriy.shevchenko@intel.com>
CC: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
CC: Johan Hovold <johan@kernel.org>
CC: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
CC: Vignesh Raghavendra <vigneshr@ti.com>
CC: linux-omap@vger.kernel.org
CC: linux-kernel@vger.kernel.org
CC: linux-serial@vger.kernel.org
Hi Tony,
I love your patch! Perhaps something to improve:
[auto build test WARNING on tty/tty-testing]
[also build test WARNING on tty/tty-next tty/tty-linus usb/usb-testing usb/usb-next usb/usb-linus linus/master v6.3-rc3 next-20230323]
[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/Tony-Lindgren/serial-core-Start-managing-serial-controllers-to-enable-runtime-PM/20230323-151208
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
patch link: https://lore.kernel.org/r/20230323071051.2184-1-tony%40atomide.com
patch subject: [PATCH v9 1/1] serial: core: Start managing serial controllers to enable runtime PM
:::::: branch date: 4 hours ago
:::::: commit date: 4 hours ago
compiler: microblaze-linux-gcc (GCC) 12.1.0
reproduce (cppcheck warning):
# apt-get install cppcheck
git checkout 3e8323d9a4876c21297e3fe4268d98078fec4065
cppcheck --quiet --enable=style,performance,portability --template=gcc FILE
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/r/202303231841.Yu8ZOXjb-lkp@intel.com/
cppcheck warnings: (new ones prefixed by >>)
drivers/tty/serial/serial_core.c:2574:17: warning: Local variable 'flags' shadows outer variable [shadowVariable]
unsigned long flags;
^
drivers/tty/serial/serial_core.c:2550:15: note: Shadowed declaration
unsigned int flags;
^
drivers/tty/serial/serial_core.c:2574:17: note: Shadow variable
unsigned long flags;
^
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> drivers/tty/serial/serial_core.c:3284:25: warning: Parameter 'phys_dev' can be declared as pointer to const [constParameter]
struct device *phys_dev,
^
vim +/phys_dev +3284 drivers/tty/serial/serial_core.c
^1da177e4c3f41 drivers/serial/serial_core.c Linus Torvalds 2005-04-16 3278
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 3279 /*
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 3280 * Find a registered serial core controller device if one exists. Returns
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 3281 * the first device matching the ctrl_id. Caller must hold port_mutex.
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 3282 */
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 3283 static struct device *serial_core_ctrl_find(struct uart_driver *drv,
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 @3284 struct device *phys_dev,
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 3285 int ctrl_id)
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 3286 {
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 3287 struct uart_state *state;
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 3288 int i;
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 3289
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 3290 if (ctrl_id < 0)
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 3291 return NULL;
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 3292
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 3293 lockdep_assert_held(&port_mutex);
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 3294
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 3295 for (i = 0; i < drv->nr; i++) {
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 3296 state = drv->state + i;
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 3297 if (!state->uart_port || !state->uart_port->port_dev)
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 3298 continue;
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 3299
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 3300 if (state->uart_port->dev == phys_dev &&
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 3301 state->uart_port->ctrl_id == ctrl_id)
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 3302 return state->uart_port->port_dev->parent;
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 3303 }
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 3304
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 3305 return NULL;
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 3306 }
3e8323d9a4876c drivers/tty/serial/serial_core.c Tony Lindgren 2023-03-23 3307
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next reply other threads:[~2023-03-23 11:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-23 11:12 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-03-23 7:10 [PATCH v9 1/1] serial: core: Start managing serial controllers to enable runtime PM Tony Lindgren
2023-03-29 9:08 ` Greg Kroah-Hartman
2023-03-30 11:32 ` Tony Lindgren
2023-03-30 12:52 ` Greg Kroah-Hartman
2023-03-30 12:59 ` Tony Lindgren
2023-03-30 13:14 ` Greg Kroah-Hartman
2023-03-29 9:19 ` Greg Kroah-Hartman
2023-03-29 10:14 ` Tony Lindgren
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=202303231841.Yu8ZOXjb-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild@lists.linux.dev \
/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.