The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: kernel test robot <yujie.liu@intel.com>
To: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Cc: <kbuild-all@lists.01.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Marc Kleine-Budde <mkl@pengutronix.de>,
	Arunachalam Santhanam <arunachalam.santhanam@in.bosch.com>
Subject: drivers/net/can/usb/etas_es58x/es58x_fd.c:174:8: warning: Uninitialized variable: rx_event_msg [uninitvar]
Date: Wed, 2 Mar 2022 17:47:08 +0800	[thread overview]
Message-ID: <5f13b914-e309-49ee-4f98-c81780c478b9@intel.com> (raw)
In-Reply-To: <202203021333.mMJpWPzx-lkp@intel.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   575115360652e9920cc56a028a286ebe9bf82694
commit: c664e2137a27680922d8aeb64fb10313416b254f can: etas_es58x: add support for the ETAS ES58X_FD CAN USB interfaces
date:   11 months ago
compiler: powerpc64-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <yujie.liu@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not be real problems)

    In file included from drivers/net/can/usb/etas_es58x/es58x_fd.c:
 >> drivers/net/can/usb/etas_es58x/es58x_fd.c:174:8: warning: Uninitialized variable: rx_event_msg [uninitvar]
     ret = es58x_check_msg_len(es58x_dev->dev, *rx_event_msg, msg_len);
           ^

vim +174 drivers/net/can/usb/etas_es58x/es58x_fd.c

c664e2137a2768 Vincent Mailhol 2021-04-10  165
c664e2137a2768 Vincent Mailhol 2021-04-10  166  static int es58x_fd_rx_event_msg(struct net_device *netdev,
c664e2137a2768 Vincent Mailhol 2021-04-10  167  				 const struct es58x_fd_urb_cmd *es58x_fd_urb_cmd)
c664e2137a2768 Vincent Mailhol 2021-04-10  168  {
c664e2137a2768 Vincent Mailhol 2021-04-10  169  	struct es58x_device *es58x_dev = es58x_priv(netdev)->es58x_dev;
c664e2137a2768 Vincent Mailhol 2021-04-10  170  	u16 msg_len = get_unaligned_le16(&es58x_fd_urb_cmd->msg_len);
c664e2137a2768 Vincent Mailhol 2021-04-10 @171  	const struct es58x_fd_rx_event_msg *rx_event_msg;
c664e2137a2768 Vincent Mailhol 2021-04-10  172  	int ret;
c664e2137a2768 Vincent Mailhol 2021-04-10  173
c664e2137a2768 Vincent Mailhol 2021-04-10 @174  	ret = es58x_check_msg_len(es58x_dev->dev, *rx_event_msg, msg_len);
c664e2137a2768 Vincent Mailhol 2021-04-10  175  	if (ret)
c664e2137a2768 Vincent Mailhol 2021-04-10  176  		return ret;
c664e2137a2768 Vincent Mailhol 2021-04-10  177
c664e2137a2768 Vincent Mailhol 2021-04-10  178  	rx_event_msg = &es58x_fd_urb_cmd->rx_event_msg;
c664e2137a2768 Vincent Mailhol 2021-04-10  179
c664e2137a2768 Vincent Mailhol 2021-04-10  180  	return es58x_rx_err_msg(netdev, rx_event_msg->error_code,
c664e2137a2768 Vincent Mailhol 2021-04-10  181  				rx_event_msg->event_code,
c664e2137a2768 Vincent Mailhol 2021-04-10  182  				get_unaligned_le64(&rx_event_msg->timestamp));
c664e2137a2768 Vincent Mailhol 2021-04-10  183  }
c664e2137a2768 Vincent Mailhol 2021-04-10  184

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

       reply	other threads:[~2022-03-02  9:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <202203021333.mMJpWPzx-lkp@intel.com>
2022-03-02  9:47 ` kernel test robot [this message]
2022-03-02 10:32   ` drivers/net/can/usb/etas_es58x/es58x_fd.c:174:8: warning: Uninitialized variable: rx_event_msg [uninitvar] Marc Kleine-Budde
2022-03-02 12:49     ` Vincent MAILHOL
2022-03-02 13:04       ` Marc Kleine-Budde
2022-03-02 14:42         ` Vincent MAILHOL
2022-03-02 14:47           ` Marc Kleine-Budde

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=5f13b914-e309-49ee-4f98-c81780c478b9@intel.com \
    --to=yujie.liu@intel.com \
    --cc=arunachalam.santhanam@in.bosch.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mailhol.vincent@wanadoo.fr \
    --cc=mkl@pengutronix.de \
    /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