All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH rdma-next 0/5] RXE checkpatch cleanup
@ 2017-06-15  8:29 Leon Romanovsky
       [not found] ` <20170615082907.5658-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Leon Romanovsky @ 2017-06-15  8:29 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

This patchset from Kamal cleanups some of the warnings
and errors that he got from applying checkpatch.pl script
on RXE files.

Kamal Heib (5):
  IB/rxe: Use "foo *bar" instead of "foo * bar"
  IB/rxe: Prefer 'unsigned int' to bare use of 'unsigned'
  IB/rxe: Use DEVICE_ATTR_RO macro to show parent field
  IB/rxe: Use __func__ to print function's name
  IB/rxe: Constify static rxe_vm_ops

 drivers/infiniband/sw/rxe/rxe.h       |  2 +-
 drivers/infiniband/sw/rxe/rxe_loc.h   |  2 +-
 drivers/infiniband/sw/rxe/rxe_mmap.c  |  2 +-
 drivers/infiniband/sw/rxe/rxe_pool.c  |  2 +-
 drivers/infiniband/sw/rxe/rxe_req.c   |  2 +-
 drivers/infiniband/sw/rxe/rxe_task.c  |  4 ++--
 drivers/infiniband/sw/rxe/rxe_verbs.c | 12 ++++++------
 7 files changed, 13 insertions(+), 13 deletions(-)

--
2.12.2

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH rdma-next 1/5] IB/rxe: Use "foo *bar" instead of "foo * bar"
       [not found] ` <20170615082907.5658-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
@ 2017-06-15  8:29   ` Leon Romanovsky
  2017-06-15  8:29   ` [PATCH rdma-next 2/5] IB/rxe: Prefer 'unsigned int' to bare use of 'unsigned' Leon Romanovsky
                     ` (5 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Leon Romanovsky @ 2017-06-15  8:29 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Kamal Heib, Kamal Heib

From: Kamal Heib <kamalheib1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Signed-off-by: Kamal Heib <kamalh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 drivers/infiniband/sw/rxe/rxe.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/sw/rxe/rxe.h b/drivers/infiniband/sw/rxe/rxe.h
index ecdba2fce083..40ff6b23ddbc 100644
--- a/drivers/infiniband/sw/rxe/rxe.h
+++ b/drivers/infiniband/sw/rxe/rxe.h
@@ -94,7 +94,7 @@ int rxe_rcv(struct sk_buff *skb);
 
 void rxe_dev_put(struct rxe_dev *rxe);
 struct rxe_dev *net_to_rxe(struct net_device *ndev);
-struct rxe_dev *get_rxe_by_name(const char* name);
+struct rxe_dev *get_rxe_by_name(const char *name);
 
 void rxe_port_up(struct rxe_dev *rxe);
 void rxe_port_down(struct rxe_dev *rxe);
-- 
2.12.2

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH rdma-next 2/5] IB/rxe: Prefer 'unsigned int' to bare use of 'unsigned'
       [not found] ` <20170615082907.5658-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  2017-06-15  8:29   ` [PATCH rdma-next 1/5] IB/rxe: Use "foo *bar" instead of "foo * bar" Leon Romanovsky
@ 2017-06-15  8:29   ` Leon Romanovsky
  2017-06-15  8:29   ` [PATCH rdma-next 3/5] IB/rxe: Use DEVICE_ATTR_RO macro to show parent field Leon Romanovsky
                     ` (4 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Leon Romanovsky @ 2017-06-15  8:29 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Kamal Heib, Kamal Heib

From: Kamal Heib <kamalheib1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Signed-off-by: Kamal Heib <kamalh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 drivers/infiniband/sw/rxe/rxe_loc.h  | 2 +-
 drivers/infiniband/sw/rxe/rxe_pool.c | 2 +-
 drivers/infiniband/sw/rxe/rxe_req.c  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_loc.h b/drivers/infiniband/sw/rxe/rxe_loc.h
index d6299edf9a5b..6b65c0132289 100644
--- a/drivers/infiniband/sw/rxe/rxe_loc.h
+++ b/drivers/infiniband/sw/rxe/rxe_loc.h
@@ -250,7 +250,7 @@ void rxe_resp_queue_pkt(struct rxe_dev *rxe,
 void rxe_comp_queue_pkt(struct rxe_dev *rxe,
 			struct rxe_qp *qp, struct sk_buff *skb);
 
-static inline unsigned wr_opcode_mask(int opcode, struct rxe_qp *qp)
+static inline unsigned int wr_opcode_mask(int opcode, struct rxe_qp *qp)
 {
 	return rxe_wr_opcode_info[opcode].mask[qp->ibqp.qp_type];
 }
diff --git a/drivers/infiniband/sw/rxe/rxe_pool.c b/drivers/infiniband/sw/rxe/rxe_pool.c
index 75d11ee635ec..c1b5f38f31a5 100644
--- a/drivers/infiniband/sw/rxe/rxe_pool.c
+++ b/drivers/infiniband/sw/rxe/rxe_pool.c
@@ -188,7 +188,7 @@ int rxe_pool_init(
 	struct rxe_dev		*rxe,
 	struct rxe_pool		*pool,
 	enum rxe_elem_type	type,
-	unsigned		max_elem)
+	unsigned int		max_elem)
 {
 	int			err = 0;
 	size_t			size = rxe_type_info[type].size;
diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c
index 7ee465d1a1e1..db7161456f45 100644
--- a/drivers/infiniband/sw/rxe/rxe_req.c
+++ b/drivers/infiniband/sw/rxe/rxe_req.c
@@ -43,7 +43,7 @@ static int next_opcode(struct rxe_qp *qp, struct rxe_send_wqe *wqe,
 
 static inline void retry_first_write_send(struct rxe_qp *qp,
 					  struct rxe_send_wqe *wqe,
-					  unsigned mask, int npsn)
+					  unsigned int mask, int npsn)
 {
 	int i;
 
-- 
2.12.2

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH rdma-next 3/5] IB/rxe: Use DEVICE_ATTR_RO macro to show parent field
       [not found] ` <20170615082907.5658-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  2017-06-15  8:29   ` [PATCH rdma-next 1/5] IB/rxe: Use "foo *bar" instead of "foo * bar" Leon Romanovsky
  2017-06-15  8:29   ` [PATCH rdma-next 2/5] IB/rxe: Prefer 'unsigned int' to bare use of 'unsigned' Leon Romanovsky
@ 2017-06-15  8:29   ` Leon Romanovsky
  2017-06-15  8:29   ` [PATCH rdma-next 4/5] IB/rxe: Use __func__ to print function's name Leon Romanovsky
                     ` (3 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Leon Romanovsky @ 2017-06-15  8:29 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Kamal Heib, Kamal Heib

From: Kamal Heib <kamalheib1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Use DEVICE_ATTR RO() macro and rename the show function accordingly.

Signed-off-by: Kamal Heib <kamalh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 drivers/infiniband/sw/rxe/rxe_verbs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c
index 83d709e74dfb..92156025db73 100644
--- a/drivers/infiniband/sw/rxe/rxe_verbs.c
+++ b/drivers/infiniband/sw/rxe/rxe_verbs.c
@@ -1212,8 +1212,8 @@ static int rxe_detach_mcast(struct ib_qp *ibqp, union ib_gid *mgid, u16 mlid)
 	return rxe_mcast_drop_grp_elem(rxe, qp, mgid);
 }
 
-static ssize_t rxe_show_parent(struct device *device,
-			       struct device_attribute *attr, char *buf)
+static ssize_t parent_show(struct device *device,
+			   struct device_attribute *attr, char *buf)
 {
 	struct rxe_dev *rxe = container_of(device, struct rxe_dev,
 					   ib_dev.dev);
@@ -1221,7 +1221,7 @@ static ssize_t rxe_show_parent(struct device *device,
 	return snprintf(buf, 16, "%s\n", rxe_parent_name(rxe, 1));
 }
 
-static DEVICE_ATTR(parent, S_IRUGO, rxe_show_parent, NULL);
+static DEVICE_ATTR_RO(parent);
 
 static struct device_attribute *rxe_dev_attributes[] = {
 	&dev_attr_parent,
-- 
2.12.2

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH rdma-next 4/5] IB/rxe: Use __func__ to print function's name
       [not found] ` <20170615082907.5658-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
                     ` (2 preceding siblings ...)
  2017-06-15  8:29   ` [PATCH rdma-next 3/5] IB/rxe: Use DEVICE_ATTR_RO macro to show parent field Leon Romanovsky
@ 2017-06-15  8:29   ` Leon Romanovsky
       [not found]     ` <20170615082907.5658-5-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  2017-06-15  8:29   ` [PATCH rdma-next 5/5] IB/rxe: Constify static rxe_vm_ops Leon Romanovsky
                     ` (2 subsequent siblings)
  6 siblings, 1 reply; 10+ messages in thread
From: Leon Romanovsky @ 2017-06-15  8:29 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Kamal Heib, Kamal Heib

From: Kamal Heib <kamalheib1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Its better to use __func__ to print functions name instead of writing
the name in the print statement.

Signed-off-by: Kamal Heib <kamalh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 drivers/infiniband/sw/rxe/rxe_task.c  | 4 ++--
 drivers/infiniband/sw/rxe/rxe_verbs.c | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_task.c b/drivers/infiniband/sw/rxe/rxe_task.c
index d2a14a1bdc7f..ea3810b29273 100644
--- a/drivers/infiniband/sw/rxe/rxe_task.c
+++ b/drivers/infiniband/sw/rxe/rxe_task.c
@@ -78,7 +78,7 @@ void rxe_do_task(unsigned long data)
 
 	default:
 		spin_unlock_irqrestore(&task->state_lock, flags);
-		pr_warn("bad state = %d in rxe_do_task\n", task->state);
+		pr_warn("%s failed with bad state %d\n", __func__, task->state);
 		return;
 	}
 
@@ -105,7 +105,7 @@ void rxe_do_task(unsigned long data)
 			break;
 
 		default:
-			pr_warn("bad state = %d in rxe_do_task\n",
+			pr_warn("%s failed with bad state %d\n", __func__,
 				task->state);
 		}
 		spin_unlock_irqrestore(&task->state_lock, flags);
diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c
index 92156025db73..a65a330b15b6 100644
--- a/drivers/infiniband/sw/rxe/rxe_verbs.c
+++ b/drivers/infiniband/sw/rxe/rxe_verbs.c
@@ -1336,15 +1336,15 @@ int rxe_register_device(struct rxe_dev *rxe)
 
 	err = ib_register_device(dev, NULL);
 	if (err) {
-		pr_warn("rxe_register_device failed, err = %d\n", err);
+		pr_warn("%s failed with error %d\n", __func__, err);
 		goto err1;
 	}
 
 	for (i = 0; i < ARRAY_SIZE(rxe_dev_attributes); ++i) {
 		err = device_create_file(&dev->dev, rxe_dev_attributes[i]);
 		if (err) {
-			pr_warn("device_create_file failed, i = %d, err = %d\n",
-				i, err);
+			pr_warn("%s failed with error %d for attr number %d\n",
+				__func__, err, i);
 			goto err2;
 		}
 	}
-- 
2.12.2

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH rdma-next 5/5] IB/rxe: Constify static rxe_vm_ops
       [not found] ` <20170615082907.5658-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
                     ` (3 preceding siblings ...)
  2017-06-15  8:29   ` [PATCH rdma-next 4/5] IB/rxe: Use __func__ to print function's name Leon Romanovsky
@ 2017-06-15  8:29   ` Leon Romanovsky
  2017-06-15  8:53   ` [PATCH rdma-next 0/5] RXE checkpatch cleanup Yuval Shaia
  2017-07-28 17:35   ` Doug Ledford
  6 siblings, 0 replies; 10+ messages in thread
From: Leon Romanovsky @ 2017-06-15  8:29 UTC (permalink / raw)
  To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Kamal Heib, Kamal Heib

From: Kamal Heib <kamalheib1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Constify static rxe_vm_ops that is never modified.

Signed-off-by: Kamal Heib <kamalh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 drivers/infiniband/sw/rxe/rxe_mmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_mmap.c b/drivers/infiniband/sw/rxe/rxe_mmap.c
index bd812e00988e..d22431e3a908 100644
--- a/drivers/infiniband/sw/rxe/rxe_mmap.c
+++ b/drivers/infiniband/sw/rxe/rxe_mmap.c
@@ -76,7 +76,7 @@ static void rxe_vma_close(struct vm_area_struct *vma)
 	kref_put(&ip->ref, rxe_mmap_release);
 }
 
-static struct vm_operations_struct rxe_vm_ops = {
+static const struct vm_operations_struct rxe_vm_ops = {
 	.open = rxe_vma_open,
 	.close = rxe_vma_close,
 };
-- 
2.12.2

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH rdma-next 4/5] IB/rxe: Use __func__ to print function's name
       [not found]     ` <20170615082907.5658-5-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
@ 2017-06-15  8:51       ` Yuval Shaia
  2017-06-15  9:09         ` Leon Romanovsky
  0 siblings, 1 reply; 10+ messages in thread
From: Yuval Shaia @ 2017-06-15  8:51 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Kamal Heib, Kamal Heib

On Thu, Jun 15, 2017 at 11:29:06AM +0300, Leon Romanovsky wrote:
> From: Kamal Heib <kamalheib1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> 
> Its better to use __func__ to print functions name instead of writing
> the name in the print statement.
> 
> Signed-off-by: Kamal Heib <kamalh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> ---
>  drivers/infiniband/sw/rxe/rxe_task.c  | 4 ++--
>  drivers/infiniband/sw/rxe/rxe_verbs.c | 6 +++---
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/infiniband/sw/rxe/rxe_task.c b/drivers/infiniband/sw/rxe/rxe_task.c
> index d2a14a1bdc7f..ea3810b29273 100644
> --- a/drivers/infiniband/sw/rxe/rxe_task.c
> +++ b/drivers/infiniband/sw/rxe/rxe_task.c
> @@ -78,7 +78,7 @@ void rxe_do_task(unsigned long data)
>  
>  	default:
>  		spin_unlock_irqrestore(&task->state_lock, flags);
> -		pr_warn("bad state = %d in rxe_do_task\n", task->state);
> +		pr_warn("%s failed with bad state %d\n", __func__, task->state);
>  		return;
>  	}
>  
> @@ -105,7 +105,7 @@ void rxe_do_task(unsigned long data)
>  			break;
>  
>  		default:
> -			pr_warn("bad state = %d in rxe_do_task\n",
> +			pr_warn("%s failed with bad state %d\n", __func__,
>  				task->state);
>  		}
>  		spin_unlock_irqrestore(&task->state_lock, flags);
> diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c
> index 92156025db73..a65a330b15b6 100644
> --- a/drivers/infiniband/sw/rxe/rxe_verbs.c
> +++ b/drivers/infiniband/sw/rxe/rxe_verbs.c
> @@ -1336,15 +1336,15 @@ int rxe_register_device(struct rxe_dev *rxe)
>  
>  	err = ib_register_device(dev, NULL);
>  	if (err) {
> -		pr_warn("rxe_register_device failed, err = %d\n", err);
> +		pr_warn("%s failed with error %d\n", __func__, err);
>  		goto err1;
>  	}
>  
>  	for (i = 0; i < ARRAY_SIZE(rxe_dev_attributes); ++i) {
>  		err = device_create_file(&dev->dev, rxe_dev_attributes[i]);
>  		if (err) {
> -			pr_warn("device_create_file failed, i = %d, err = %d\n",
> -				i, err);
> +			pr_warn("%s failed with error %d for attr number %d\n",
> +				__func__, err, i);

Before this fix the warn shows the call which fails (device_create_file)
and now it will show the caller (rxe_register_device).
Hope it is still fine with you.

>  			goto err2;
>  		}
>  	}
> -- 
> 2.12.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH rdma-next 0/5] RXE checkpatch cleanup
       [not found] ` <20170615082907.5658-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
                     ` (4 preceding siblings ...)
  2017-06-15  8:29   ` [PATCH rdma-next 5/5] IB/rxe: Constify static rxe_vm_ops Leon Romanovsky
@ 2017-06-15  8:53   ` Yuval Shaia
  2017-07-28 17:35   ` Doug Ledford
  6 siblings, 0 replies; 10+ messages in thread
From: Yuval Shaia @ 2017-06-15  8:53 UTC (permalink / raw)
  To: Leon Romanovsky; +Cc: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA

On Thu, Jun 15, 2017 at 11:29:02AM +0300, Leon Romanovsky wrote:
> This patchset from Kamal cleanups some of the warnings
> and errors that he got from applying checkpatch.pl script
> on RXE files.
> 
> Kamal Heib (5):
>   IB/rxe: Use "foo *bar" instead of "foo * bar"
>   IB/rxe: Prefer 'unsigned int' to bare use of 'unsigned'
>   IB/rxe: Use DEVICE_ATTR_RO macro to show parent field
>   IB/rxe: Use __func__ to print function's name
>   IB/rxe: Constify static rxe_vm_ops

Besides some minor comment for #4.

Reviewed-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

> 
>  drivers/infiniband/sw/rxe/rxe.h       |  2 +-
>  drivers/infiniband/sw/rxe/rxe_loc.h   |  2 +-
>  drivers/infiniband/sw/rxe/rxe_mmap.c  |  2 +-
>  drivers/infiniband/sw/rxe/rxe_pool.c  |  2 +-
>  drivers/infiniband/sw/rxe/rxe_req.c   |  2 +-
>  drivers/infiniband/sw/rxe/rxe_task.c  |  4 ++--
>  drivers/infiniband/sw/rxe/rxe_verbs.c | 12 ++++++------
>  7 files changed, 13 insertions(+), 13 deletions(-)
> 
> --
> 2.12.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH rdma-next 4/5] IB/rxe: Use __func__ to print function's name
  2017-06-15  8:51       ` Yuval Shaia
@ 2017-06-15  9:09         ` Leon Romanovsky
  0 siblings, 0 replies; 10+ messages in thread
From: Leon Romanovsky @ 2017-06-15  9:09 UTC (permalink / raw)
  To: Yuval Shaia
  Cc: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Kamal Heib, Kamal Heib

[-- Attachment #1: Type: text/plain, Size: 3072 bytes --]

On Thu, Jun 15, 2017 at 11:51:17AM +0300, Yuval Shaia wrote:
> On Thu, Jun 15, 2017 at 11:29:06AM +0300, Leon Romanovsky wrote:
> > From: Kamal Heib <kamalheib1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >
> > Its better to use __func__ to print functions name instead of writing
> > the name in the print statement.
> >
> > Signed-off-by: Kamal Heib <kamalh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> > Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> > ---
> >  drivers/infiniband/sw/rxe/rxe_task.c  | 4 ++--
> >  drivers/infiniband/sw/rxe/rxe_verbs.c | 6 +++---
> >  2 files changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/infiniband/sw/rxe/rxe_task.c b/drivers/infiniband/sw/rxe/rxe_task.c
> > index d2a14a1bdc7f..ea3810b29273 100644
> > --- a/drivers/infiniband/sw/rxe/rxe_task.c
> > +++ b/drivers/infiniband/sw/rxe/rxe_task.c
> > @@ -78,7 +78,7 @@ void rxe_do_task(unsigned long data)
> >
> >  	default:
> >  		spin_unlock_irqrestore(&task->state_lock, flags);
> > -		pr_warn("bad state = %d in rxe_do_task\n", task->state);
> > +		pr_warn("%s failed with bad state %d\n", __func__, task->state);
> >  		return;
> >  	}
> >
> > @@ -105,7 +105,7 @@ void rxe_do_task(unsigned long data)
> >  			break;
> >
> >  		default:
> > -			pr_warn("bad state = %d in rxe_do_task\n",
> > +			pr_warn("%s failed with bad state %d\n", __func__,
> >  				task->state);
> >  		}
> >  		spin_unlock_irqrestore(&task->state_lock, flags);
> > diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c
> > index 92156025db73..a65a330b15b6 100644
> > --- a/drivers/infiniband/sw/rxe/rxe_verbs.c
> > +++ b/drivers/infiniband/sw/rxe/rxe_verbs.c
> > @@ -1336,15 +1336,15 @@ int rxe_register_device(struct rxe_dev *rxe)
> >
> >  	err = ib_register_device(dev, NULL);
> >  	if (err) {
> > -		pr_warn("rxe_register_device failed, err = %d\n", err);
> > +		pr_warn("%s failed with error %d\n", __func__, err);
> >  		goto err1;
> >  	}
> >
> >  	for (i = 0; i < ARRAY_SIZE(rxe_dev_attributes); ++i) {
> >  		err = device_create_file(&dev->dev, rxe_dev_attributes[i]);
> >  		if (err) {
> > -			pr_warn("device_create_file failed, i = %d, err = %d\n",
> > -				i, err);
> > +			pr_warn("%s failed with error %d for attr number %d\n",
> > +				__func__, err, i);
>
> Before this fix the warn shows the call which fails (device_create_file)
> and now it will show the caller (rxe_register_device).
> Hope it is still fine with you.

This warning is unique to this function, so it will be much easier to
find the root cause. Instead of unknown place for "device_create_file failed", the user
can go directly to rxe_register_device) and see the reason of the failure.

So, it is fine and it is intentionally :)

Thanks

>
> >  			goto err2;
> >  		}
> >  	}
> > --
> > 2.12.2
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH rdma-next 0/5] RXE checkpatch cleanup
       [not found] ` <20170615082907.5658-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
                     ` (5 preceding siblings ...)
  2017-06-15  8:53   ` [PATCH rdma-next 0/5] RXE checkpatch cleanup Yuval Shaia
@ 2017-07-28 17:35   ` Doug Ledford
  6 siblings, 0 replies; 10+ messages in thread
From: Doug Ledford @ 2017-07-28 17:35 UTC (permalink / raw)
  To: Leon Romanovsky; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

On Thu, 2017-06-15 at 11:29 +0300, Leon Romanovsky wrote:
> This patchset from Kamal cleanups some of the warnings
> and errors that he got from applying checkpatch.pl script
> on RXE files.
> 
> Kamal Heib (5):
>   IB/rxe: Use "foo *bar" instead of "foo * bar"
>   IB/rxe: Prefer 'unsigned int' to bare use of 'unsigned'
>   IB/rxe: Use DEVICE_ATTR_RO macro to show parent field
>   IB/rxe: Use __func__ to print function's name
>   IB/rxe: Constify static rxe_vm_ops
> 
>  drivers/infiniband/sw/rxe/rxe.h       |  2 +-
>  drivers/infiniband/sw/rxe/rxe_loc.h   |  2 +-
>  drivers/infiniband/sw/rxe/rxe_mmap.c  |  2 +-
>  drivers/infiniband/sw/rxe/rxe_pool.c  |  2 +-
>  drivers/infiniband/sw/rxe/rxe_req.c   |  2 +-
>  drivers/infiniband/sw/rxe/rxe_task.c  |  4 ++--
>  drivers/infiniband/sw/rxe/rxe_verbs.c | 12 ++++++------
>  7 files changed, 13 insertions(+), 13 deletions(-)

Series applied, thanks.

-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-07-28 17:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-15  8:29 [PATCH rdma-next 0/5] RXE checkpatch cleanup Leon Romanovsky
     [not found] ` <20170615082907.5658-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-06-15  8:29   ` [PATCH rdma-next 1/5] IB/rxe: Use "foo *bar" instead of "foo * bar" Leon Romanovsky
2017-06-15  8:29   ` [PATCH rdma-next 2/5] IB/rxe: Prefer 'unsigned int' to bare use of 'unsigned' Leon Romanovsky
2017-06-15  8:29   ` [PATCH rdma-next 3/5] IB/rxe: Use DEVICE_ATTR_RO macro to show parent field Leon Romanovsky
2017-06-15  8:29   ` [PATCH rdma-next 4/5] IB/rxe: Use __func__ to print function's name Leon Romanovsky
     [not found]     ` <20170615082907.5658-5-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-06-15  8:51       ` Yuval Shaia
2017-06-15  9:09         ` Leon Romanovsky
2017-06-15  8:29   ` [PATCH rdma-next 5/5] IB/rxe: Constify static rxe_vm_ops Leon Romanovsky
2017-06-15  8:53   ` [PATCH rdma-next 0/5] RXE checkpatch cleanup Yuval Shaia
2017-07-28 17:35   ` Doug Ledford

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.