devlink: Fix error message in devlink_rate_set_ops_supported()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 9 Jun 2021 09:54:31 +0000 (12:54 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Jun 2021 21:12:30 +0000 (14:12 -0700)
The WARN_ON() macro takes a condition, it doesn't take a message.  Use
WARN() instead.

Fixes: 1897db2ec310 ("devlink: Allow setting tx rate for devlink rate leaf objects")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/devlink.c

index 5260bdf..3bdb7ea 100644 (file)
@@ -1732,7 +1732,7 @@ static bool devlink_rate_set_ops_supported(const struct devlink_ops *ops,
                        return false;
                }
        } else {
-               WARN_ON("Unknown type of rate object");
+               WARN(1, "Unknown type of rate object");
                return false;
        }