From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Marc Kleine-Budde <mkl@pengutronix.de>
Cc: kbuild-all@lists.01.org, linux-can@vger.kernel.org
Subject: [mkl-can-next:v5.4/mcp25xxfd 5/99] drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c:1305 mcp25xxfd_irq() warn: ignoring unreachable code.
Date: Mon, 10 Feb 2020 10:42:27 +0300 [thread overview]
Message-ID: <20200210074227.GR24804@kadam> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git v5.4/mcp25xxfd
head: cdcc21e4acc1a753bc4fb151b938ba292ecf686b
commit: 6499ad52b2ad766769d55b8d59df0d36db848e95 [5/99] can: mcp25xxfd: initial commit
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c:1305 mcp25xxfd_irq() warn: ignoring unreachable code.
Old smatch warnings:
drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c:1667 mcp25xxfd_probe() warn: passing zero to 'PTR_ERR'
drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c:1675 mcp25xxfd_probe() warn: passing zero to 'PTR_ERR'
# https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git/commit/?id=6499ad52b2ad766769d55b8d59df0d36db848e95
git remote add mkl-can-next https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git
git remote update mkl-can-next
git checkout 6499ad52b2ad766769d55b8d59df0d36db848e95
vim +1305 drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1280
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1281 if (IS_ENABLED(CONFIG_CAN_MCP25XXFD_DEBUG) &&
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1282 intf_pending & ~(MCP25XXFD_CAN_INT_MODIF |
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1283 MCP25XXFD_CAN_INT_TEFIF |
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1284 MCP25XXFD_CAN_INT_RXIF |
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1285 MCP25XXFD_CAN_INT_SERRIF |
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1286 MCP25XXFD_CAN_INT_IVMIF)) {
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1287 netdev_err(priv->ndev, "%s: intf_pending=0x%04x\n",
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1288 __func__, intf_pending);
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1289 mcp25xxfd_dump(priv);
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1290 }
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1291
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1292 /* ACK interrupts that need to be ACKed in the
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1293 * MCP25XXFD_CAN_INT register.
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1294 */
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1295 intf_pending_clearable = intf_pending &
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1296 MCP25XXFD_CAN_INT_INTERRUPT_CLEARABLE;
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1297 if (intf_pending_clearable) {
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1298 err = regmap_update_bits(priv->map, MCP25XXFD_CAN_INT,
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1299 intf_pending_clearable, 0x0);
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1300 if (err)
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1301 goto out_fail;
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1302 }
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1303 } while (1);
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1304
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 @1305 return handled;
I guess the while (1) loop has no breaks.
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1306
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1307 out_fail:
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1308 mcp25xxfd_dump(priv);
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1309 mcp25xxfd_chip_interrupts_disable(priv);
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1310
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1311 return handled;
6499ad52b2ad76 Marc Kleine-Budde 2019-10-14 1312 }
reply other threads:[~2020-02-10 7:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200210074227.GR24804@kadam \
--to=dan.carpenter@oracle.com \
--cc=kbuild-all@lists.01.org \
--cc=kbuild@lists.01.org \
--cc=linux-can@vger.kernel.org \
--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