diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2023-06-05 08:29:35 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-06-06 11:34:33 +0200 |
commit | 810b59f44103063ecc62153878b580f531b44faf (patch) | |
tree | 39ad21fe83f626b81b796d6718bb6131704d32fe /drivers/net | |
parent | bf17cddb30eefc6b1f5b93ffdfc7bbb573534117 (diff) | |
download | barebox-810b59f44103063ecc62153878b580f531b44faf.tar.gz barebox-810b59f44103063ecc62153878b580f531b44faf.tar.xz |
net: fec_mpc5200: fix false positive -Wmisleading-indentation
After the preprocessor runs, the code in question looks like this:
SDMA_INT_DISABLE
while ((counter--) && (!(fec->eth->ievent & FEC_IEVENT_GRA)));
{
struct mpc5xxx_sdma *sdma = (struct mpc5xxx_sdma *)MPC5XXX_SDMA;
sdma->IntMask |= (1 << tasknum);
}
Which understandably looks like a bug. Avoid this by using do { } while
(0) and moving the semicolon to a separate line.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230605062939.242063-3-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/fec_mpc5200.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/fec_mpc5200.c b/drivers/net/fec_mpc5200.c index 53b5a861ae..9c9b795f14 100644 --- a/drivers/net/fec_mpc5200.c +++ b/drivers/net/fec_mpc5200.c @@ -420,7 +420,8 @@ static void mpc5xxx_fec_halt(struct eth_device *dev) /* * wait for graceful stop to register */ - while ((counter--) && (!(fec->eth->ievent & FEC_IEVENT_GRA))) ; + while ((counter--) && (!(fec->eth->ievent & FEC_IEVENT_GRA))) + ; /* * Disable SmartDMA tasks |