Message ID | 20240823065259.3327201-3-lihongbo22@huawei.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net/ncsi: Use str_up_down to simplify the code | expand |
diff --git a/net/ncsi/ncsi-aen.c b/net/ncsi/ncsi-aen.c index 62fb1031763d..25814f06d7da 100644 --- a/net/ncsi/ncsi-aen.c +++ b/net/ncsi/ncsi-aen.c @@ -75,7 +75,7 @@ static int ncsi_aen_handler_lsc(struct ncsi_dev_priv *ndp, has_link = !!(data & 0x1); netdev_dbg(ndp->ndev.dev, "NCSI: LSC AEN - channel %u state %s\n", - nc->id, data & 0x1 ? "up" : "down"); + nc->id, str_up_down(data & 0x1)); chained = !list_empty(&nc->link); state = nc->state;
As str_up_down is the common helper to reback "up/down" string, we can replace the target with it to simplify the code and fix the coccinelle warning. Signed-off-by: Hongbo Li <lihongbo22@huawei.com> --- net/ncsi/ncsi-aen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)