Skip to content

Commit

Permalink
net: usb: asix: ax88772: fix boolconv.cocci warnings
Browse files Browse the repository at this point in the history
drivers/net/usb/asix_devices.c:757:60-65: WARNING: conversion to bool not needed here

 Remove unneeded conversion to bool

Semantic patch information:
 Relational and logical operators evaluate to bool,
 explicit conversion is overly verbose and unneeded.

Generated by: scripts/coccinelle/misc/boolconv.cocci

Fixes: 7a141e6 ("net: usb: asix: ax88772: move embedded PHY detection as early as possible")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://lore.kernel.org/r/20210825183538.13070-1-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
kernel test robot authored and Jakub Kicinski committed Aug 25, 2021
1 parent cd9b50a commit ec92e52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/usb/asix_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf)
return ret;

priv->phy_addr = ret;
priv->embd_phy = ((priv->phy_addr & 0x1f) == 0x10 ? true : false);
priv->embd_phy = ((priv->phy_addr & 0x1f) == 0x10);

asix_read_cmd(dev, AX_CMD_STATMNGSTS_REG, 0, 0, 1, &chipcode, 0);
chipcode &= AX_CHIPCODE_MASK;
Expand Down

0 comments on commit ec92e52

Please sign in to comment.