Skip to contentSkip to conversation

RDMA/bnxt_re: Remove redundant fw_ver sysfs entry

PATCH In review Leon Romanovsky 2 participants 3 messages Sep 14, 2017 – Sep 15, 2017 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RDMA/bnxt_re: Remove redundant fw_ver sysfs entry

The IB/core has general sysfs knob to print FW version. This eliminates the need for the custom bnxt_re implementation, which is similar to the general.

Cc Somnath Kotur <somnath.kotur-dY08KVG/lbpWk0Htik3J/[email protected]>
---
 drivers/infiniband/hw/bnxt_re/main.c | 9 ---------
 1 file changed, 9 deletions(-)
drivers/infiniband/hw/bnxt_re/main.c +0 -9
index ceae2d92fb08..c686887bf71e 100644
@@ -525,14 +525,6 @@ static ssize_t show_rev(struct device *device, struct device_attribute *attr,
 	return scnprintf(buf, PAGE_SIZE, "0x%x\n", rdev->en_dev->pdev->vendor);
 }
 
-static ssize_t show_fw_ver(struct device *device, struct device_attribute *attr,
-			   char *buf)
-{
-	struct bnxt_re_dev *rdev = to_bnxt_re_dev(device, ibdev.dev);
-
-	return scnprintf(buf, PAGE_SIZE, "%s\n", rdev->dev_attr.fw_ver);
-}
-
 static ssize_t show_hca(struct device *device, struct device_attribute *attr,
 			char *buf)
 {
@@ -542,7 +534,6 @@ static ssize_t show_hca(struct device *device, struct device_attribute *attr,
 }
 
 static DEVICE_ATTR(hw_rev, 0444, show_rev, NULL);
-static DEVICE_ATTR(fw_rev, 0444, show_fw_ver, NULL);
 static DEVICE_ATTR(hca_type, 0444, show_hca, NULL);
 
 static struct device_attribute *bnxt_re_attributes[] = {

--
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20170914132140.9812-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org

#2 lore raw

Hi Leon,
Thanks for the patch, however this will not compile as
the corresponding entry from the bnxt_re_attributes[] was not removed. Having said that, there is already a patch in the works in my sandbox that addresses this area that i plan to push as part of features patchset right after my recent bug-fixes patch series is accepted. So we could drop this for now and wait for the patch series that will address this please ?

Thanks
Som

Quoted 38 lines · Leon Romanovsky

The IB/core has general sysfs knob to print FW version. This eliminates the need for the custom bnxt_re implementation, which is similar to the general.

Cc Somnath Kotur <somnath.kotur-dY08KVG/lbpWk0Htik3J/[email protected]>
---
 drivers/infiniband/hw/bnxt_re/main.c | 9 ---------
 1 file changed, 9 deletions(-)
drivers/infiniband/hw/bnxt_re/main.c +0 -10
index ceae2d92fb08..c686887bf71e 100644
@@ -525,14 +525,6 @@ static ssize_t show_rev(struct device *device, struct device_attribute *attr,
        return scnprintf(buf, PAGE_SIZE, "0x%x\n", rdev->en_dev->pdev->vendor);
 }
 
-static ssize_t show_fw_ver(struct device *device, struct device_attribute *attr,
-                          char *buf)
-{
-       struct bnxt_re_dev *rdev = to_bnxt_re_dev(device, ibdev.dev);
-
-       return scnprintf(buf, PAGE_SIZE, "%s\n", rdev->dev_attr.fw_ver);
-}
-
 static ssize_t show_hca(struct device *device, struct device_attribute *attr,
                        char *buf)
 {
@@ -542,7 +534,6 @@ static ssize_t show_hca(struct device *device, struct device_attribute *attr,
 }
 
 static DEVICE_ATTR(hw_rev, 0444, show_rev, NULL);
-static DEVICE_ATTR(fw_rev, 0444, show_fw_ver, NULL);
 static DEVICE_ATTR(hca_type, 0444, show_hca, NULL);
 
 static struct device_attribute *bnxt_re_attributes[] = {
--
Quoted 2 lines

2.14.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): CAOBf=mvHS+P+n-Bvcr9g9qfWaN8RbRUdPJn2YGm-QD5SS_VcKw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#4 lore raw
Quoted 8 lines · Somnath Kotur

Hi Leon,
Thanks for the patch, however this will not compile as
the corresponding entry from the bnxt_re_attributes[] was not removed. Having said that, there is already a patch in the works in my sandbox that addresses this area that i plan to push as part of features patchset right after my recent bug-fixes patch series is accepted. So we could drop this for now and wait for the patch series that will address this please ?

Thanks for catching it, your driver is dependent on CONFIG_DCB and it wasn't enabled in my default config.

Quoted 45 lines

Thanks
Som

Quoted 40 lines · Leon Romanovsky

The IB/core has general sysfs knob to print FW version. This eliminates the need for the custom bnxt_re implementation, which is similar to the general.

Cc Somnath Kotur <somnath.kotur-dY08KVG/lbpWk0Htik3J/[email protected]>
---
 drivers/infiniband/hw/bnxt_re/main.c | 9 ---------
 1 file changed, 9 deletions(-)
drivers/infiniband/hw/bnxt_re/main.c +0 -10
index ceae2d92fb08..c686887bf71e 100644
@@ -525,14 +525,6 @@ static ssize_t show_rev(struct device *device, struct device_attribute *attr,
        return scnprintf(buf, PAGE_SIZE, "0x%x\n", rdev->en_dev->pdev->vendor);
 }
 
-static ssize_t show_fw_ver(struct device *device, struct device_attribute *attr,
-                          char *buf)
-{
-       struct bnxt_re_dev *rdev = to_bnxt_re_dev(device, ibdev.dev);
-
-       return scnprintf(buf, PAGE_SIZE, "%s\n", rdev->dev_attr.fw_ver);
-}
-
 static ssize_t show_hca(struct device *device, struct device_attribute *attr,
                        char *buf)
 {
@@ -542,7 +534,6 @@ static ssize_t show_hca(struct device *device, struct device_attribute *attr,
 }
 
 static DEVICE_ATTR(hw_rev, 0444, show_rev, NULL);
-static DEVICE_ATTR(fw_rev, 0444, show_fw_ver, NULL);
 static DEVICE_ATTR(hca_type, 0444, show_hca, NULL);
 
 static struct device_attribute *bnxt_re_attributes[] = {
--

2.14.1