IB/sysfs: Fix sparse warning on attr_id
PATCH 1/1 IB/sysfs: Fix sparse warning on attr_id
From: Ira Weiny <[email protected]>
Attributed ID was declared as an int while the value should really be big endian 16.
--- drivers/infiniband/core/sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/infiniband/core/sysfs.c +2 -2
@@ -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;
Signature · 6 lines
1.8.2 -- 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
Quoted 7 lines · On Mon, Jan 4, 2016 at 5:44 AM, <[email protected]…
From: Ira Weiny <[email protected]>
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")
remove this blank line (&& I provided you this comment multiple times in the past)
Quoted 2 lines
Reported-by Bart Van Assche <[email protected]>Signed-off-by Ira Weiny <[email protected]>
reverse the order, your S.O.B sig line should come 1st and later the rest of the reporters/ackers/testers/maintainers notes
Quoted 27 lines
--- drivers/infiniband/core/sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/infiniband/core/sysfs.c +2
-3@@ -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; --
Quoted 1 line
1.8.2
--
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
Bart Van Assche
Reviewed-byQuoted 9 lines · On 01/04/2016 04:44 AM, [email protected] wrote:
From: Ira Weiny <[email protected]>
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 <[email protected]>Signed-off-by Ira Weiny <[email protected]>
--
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
Christoph Lameter
Reviewed-byQuoted 2 lines · On Sun, 3 Jan 2016, [email protected] wrote:
Attributed ID was declared as an int while the value should really be big endian 16.
--
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
Hal Rosenstock
Reviewed-byQuoted 9 lines · On 1/3/2016 10:44 PM, [email protected] wrote:
From: Ira Weiny <[email protected]>
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 <[email protected]>Signed-off-by Ira Weiny <[email protected]>
--
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
Doug Ledford
AppliedQuoted 28 lines · On 01/03/2016 10:44 PM, [email protected] wrote:
From: Ira Weiny <[email protected]>
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 <[email protected]>Signed-off-by Ira Weiny <[email protected]>--- drivers/infiniband/core/sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/infiniband/core/sysfs.c +1
-1@@ -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,
drivers/infiniband/core/sysfs.c struct port_table_attribute port_pma_attr_ext_##_name = { \ · line 419
Quoted 8 lines
drivers/infiniband/core/sysfs.c +1
-1@@ -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;
Thanks, applied.
Signature · 2 lines
Doug Ledford <[email protected]> GPG KeyID: 0E572FDD