Message ID | 20240823065259.3327201-2-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-manage.c b/net/ncsi/ncsi-manage.c index 5ecf611c8820..13b4d393fb2d 100644 --- a/net/ncsi/ncsi-manage.c +++ b/net/ncsi/ncsi-manage.c @@ -1281,7 +1281,7 @@ static int ncsi_choose_active_channel(struct ncsi_dev_priv *ndp) netdev_dbg(ndp->ndev.dev, "NCSI: Channel %u added to queue (link %s)\n", nc->id, - ncm->data[2] & 0x1 ? "up" : "down"); + str_up_down(ncm->data[2] & 0x1)); } spin_unlock_irqrestore(&nc->lock, cflags);
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-manage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)