diff options
author | Leon Romanovsky | 2017-06-27 15:49:53 +0200 |
---|---|---|
committer | Leon Romanovsky | 2017-08-10 12:28:10 +0200 |
commit | 9abb0d1bbd9529c574eacd8586e2bf68d17966cd (patch) | |
tree | c7622f72d10e1ce95302053e6b314754ce3c90ee /drivers/infiniband/ulp | |
parent | RDMA/netlink: Expose device and port capability masks (diff) | |
download | kernel-qcow2-linux-9abb0d1bbd9529c574eacd8586e2bf68d17966cd.tar.gz kernel-qcow2-linux-9abb0d1bbd9529c574eacd8586e2bf68d17966cd.tar.xz kernel-qcow2-linux-9abb0d1bbd9529c574eacd8586e2bf68d17966cd.zip |
RDMA: Simplify get firmware interface
There is a need to forward FW version to user space
application through RDMA netlink. In order to make it safe, there
is need to declare nla_policy and limit the size of FW string.
The new define IB_FW_VERSION_NAME_MAX will limit the size of
FW version string. That define was chosen to be equal to
ETHTOOL_FWVERS_LEN, because many drivers anyway are limited
by that value indirectly.
The introduction of this define allows us to remove the string size
from get_fw_str function signature.
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c index 7871379342f4..98e30b41e436 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c @@ -62,8 +62,7 @@ static void ipoib_get_drvinfo(struct net_device *netdev, { struct ipoib_dev_priv *priv = ipoib_priv(netdev); - ib_get_device_fw_str(priv->ca, drvinfo->fw_version, - sizeof(drvinfo->fw_version)); + ib_get_device_fw_str(priv->ca, drvinfo->fw_version); strlcpy(drvinfo->bus_info, dev_name(priv->ca->dev.parent), sizeof(drvinfo->bus_info)); |