aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIra Weiny <ira.weiny@intel.com>2016-01-03 22:44:25 -0500
committerDoug Ledford <dledford@redhat.com>2016-01-19 14:12:56 -0500
commit65487fdc0c8072b6ac32ed30fab34de4e66ace55 (patch)
tree8702c59daa6d4339b6e25633e2da9cda71164ab3
parentRDMA/be2net: Remove open and close entry points (diff)
downloadlinux-dev-65487fdc0c8072b6ac32ed30fab34de4e66ace55.tar.xz
linux-dev-65487fdc0c8072b6ac32ed30fab34de4e66ace55.zip
IB/sysfs: Fix sparse warning on attr_id
Attributed ID was declared as an int while the value should really be big endian 16. Fixes: 35c4cbb17811 ("IB/core: Create get_perf_mad function in sysfs.c") Reported-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Christoph Lameter <cl@linux.com> Reviewed-by: Hal Rosenstock <hal@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r--drivers/infiniband/core/sysfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c
index 539040fdd2e5..aed9b2d8e046 100644
--- a/drivers/infiniband/core/sysfs.c
+++ b/drivers/infiniband/core/sysfs.c
@@ -77,7 +77,7 @@ struct port_table_attribute {
struct port_attribute attr;
char name[8];
int index;
- int attr_id;
+ __be16 attr_id;
};
static ssize_t port_attr_show(struct kobject *kobj,
@@ -413,7 +413,7 @@ struct port_table_attribute port_pma_attr_ext_##_name = { \
* Get a Perfmgmt MAD block of data.
* Returns error code or the number of bytes retrieved.
*/
-static int get_perf_mad(struct ib_device *dev, int port_num, int attr,
+static int get_perf_mad(struct ib_device *dev, int port_num, __be16 attr,
void *data, int offset, size_t size)
{
struct ib_mad *in_mad;