Re: [PATCH 15/29] IB/mlx4: Delete an unnecessary return statement in do_slave_init()

2017-02-19 Thread Majd Dibbiny
urn; > } > > static void mlx4_ib_handle_catas_error(struct mlx4_ib_dev *ibdev) > -- > 2.11.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Thanks, Reviewed-by: Majd Dibbiny

Re: [PATCH 21/29] IB/mlx4: Delete unnecessary braces in mlx4_ib_add()

2017-02-19 Thread Majd Dibbiny
-if (err) { > +if (err) >goto err_notif; > -} >} >} > > -- > 2.11.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Thanks, Reviewed-by: Majd Dibbiny

Re: [PATCH 23/29] IB/mlx4: Improve size determinations in create_qp_common()

2017-02-19 Thread Majd Dibbiny
> +qp = kzalloc(sizeof(*qp), gfp); >if (!qp) >return -ENOMEM; >qp->pri.vid = 0x; > -- > 2.11.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Thanks, Reviewed-by: Majd Dibbiny

Re: [PATCH 22/29] IB/mlx4: Use kmalloc_array() in alloc_proxy_bufs()

2017-02-19 Thread Majd Dibbiny
MEM; >for (i = 0; i < qp->rq.wqe_cnt; i++) { > -- > 2.11.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Thanks, Reviewed-by: Majd Dibbiny

Re: [PATCH 20/29] IB/mlx4: Delete an error message for a failed memory allocation in mlx4_ib_add()

2017-02-19 Thread Majd Dibbiny
> On Feb 18, 2017, at 11:10 PM, SF Markus Elfring > wrote: > > From: Markus Elfring > Date: Sat, 18 Feb 2017 16:15:20 +0100 > > Omit an extra message for a memory allocation failure in this function. > > Link: > http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Stri

Re: [PATCH 19/29] IB/mlx4: Delete an unnecessary variable assignment in mlx4_ib_add()

2017-02-19 Thread Majd Dibbiny
_transport_port(i, dev) >num_ports++; > > -- > 2.11.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Thanks, Reviewed-by: Majd Dibbiny

Re: [PATCH 17/29] IB/mlx4: Improve another size determination in mlx4_ib_add()

2017-02-19 Thread Majd Dibbiny
GFP_KERNEL); >if (!new_counter_index) >goto err_counter; >new_counter_index->index = counter_index; > -- > 2.11.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > th

Re: [PATCH 17/29] IB/mlx4: Improve another size determination in mlx4_ib_add()

2017-02-19 Thread Majd Dibbiny
GFP_KERNEL); >if (!new_counter_index) >goto err_counter; >new_counter_index->index = counter_index; > -- > 2.11.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > th

Re: [PATCH 11/29] IB/mlx4: Use kmalloc_array() in three functions

2017-02-19 Thread Majd Dibbiny
sizeof(long), > + GFP_KERNEL); >if (!ibdev->ib_uc_qpns_bitmap) >goto err_steer_qp_release; > > -- > 2.11.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Thanks, Reviewed-by: Majd Dibbiny

Re: [PATCH 13/29] IB/mlx4: Split a condition check in five functions

2017-02-19 Thread Majd Dibbiny
t;out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL); > -if (!in_mad || !out_mad) > -goto out; > +if (!out_mad) { > +err = -ENOMEM; > +goto free_in_mad; > +} > >init_query_mad(in_mad); >in_mad->attr_id = IB_SMP_ATTR_NODE_DESC; > @@ -2114,8 +2141,9 @@ static int init_node_data(struct mlx4_ib_dev *dev) >memcpy(&dev->ib_dev.node_guid, out_mad->data + 12, 8); > > out: > -kfree(in_mad); >kfree(out_mad); > +free_in_mad: > +kfree(in_mad); >return err; > } > > -- > 2.11.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Thanks, Reviewed-by: Majd Dibbiny

Re: [PATCH 12/29] IB/mlx4: Enclose 17 expressions for the sizeof operator by parentheses

2017-02-19 Thread Majd Dibbiny
; > >INIT_WORK(&ew->work, handle_port_mgmt_change_event); > -memcpy(&ew->ib_eqe, eqe, sizeof *eqe); > +memcpy(&ew->ib_eqe, eqe, sizeof(*eqe)); >ew->ib_dev = ibdev; >/* need to queue only for port owner, which uses GEN_EQE */ >if (mlx4_is_master(dev)) > -- > 2.11.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Thanks, Reviewed-by: Majd Dibbiny

Re: [PATCH 10/29] IB/mlx4: Enclose 15 expressions for the sizeof operator by parentheses

2017-02-19 Thread Majd Dibbiny
quot;, port); > +snprintf(name, sizeof(name), "mlx4_ibt%d", port); >ctx->wq = alloc_ordered_workqueue(name, WQ_MEM_RECLAIM); >if (!ctx->wq) { >pr_err("Failed to create tunnelling WQ for port %d\n", port); > @@ -2192,7 +2192,7 @@ static int mlx4_ib_alloc_demux_ctx(struct mlx4_ib_dev > *dev, >goto err_wq; >} > > -snprintf(name, sizeof name, "mlx4_ibud%d", port); > +snprintf(name, sizeof(name), "mlx4_ibud%d", port); >ctx->ud_wq = alloc_ordered_workqueue(name, WQ_MEM_RECLAIM); >if (!ctx->ud_wq) { >pr_err("Failed to create up/down WQ for port %d\n", port); > -- > 2.11.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Thanks, Reviewed-by: Majd Dibbiny

Re: [PATCH 09/29] IB/mlx4: Move an assignment out of a check in forward_trap()

2017-02-19 Thread Majd Dibbiny
else >ret = -EINVAL; > -- > 2.11.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Thanks, Reviewed-by: Majd Dibbiny

Re: [PATCH 08/29] IB/mlx4: Delete an unnecessary check before the function call "kfree" in free_pv_object()

2017-02-19 Thread Majd Dibbiny
> On Feb 18, 2017, at 11:28 PM, SF Markus Elfring > wrote: > > From: Markus Elfring > Date: Fri, 17 Feb 2017 22:06:24 +0100 > > The script "checkpatch.pl" pointed information out like the following. > > WARNING: kfree(NULL) is safe and this check is probably not required > > Thus fix the af

Re: [PATCH 07/29] IB/mlx4: Split a condition check in handle_slaves_guid_change()

2017-02-19 Thread Majd Dibbiny
t; > void handle_port_mgmt_change_event(struct work_struct *work) > -- > 2.11.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Thanks, Reviewed-by: Majd Dibbiny

Re: [PATCH 03/29] IB/mlx4: Improve another size determination in mlx4_ib_alloc_demux_ctx()

2017-02-19 Thread Majd Dibbiny
this list: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Thanks, Reviewed-by: Majd Dibbiny

Re: [PATCH 01/29] IB/mlx4: Use kcalloc() in mlx4_ib_alloc_pv_bufs()

2017-02-19 Thread Majd Dibbiny
t; 2.11.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Thanks, Reviewed-by: Majd Dibbiny

Re: [PATCH 05/29] IB/mlx4: Fix a typo in a comment line

2017-02-19 Thread Majd Dibbiny
; >ah.ibah.device = ctx->ib_dev; > > -- > 2.11.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Thanks, Reviewed-by: Majd Dibbiny

Re: [PATCH 06/29] IB/mlx4: Delete three unnecessary return statements

2017-02-19 Thread Majd Dibbiny
unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Thanks, Reviewed-by: Majd Dibbiny

Re: [PATCH 04/29] IB/mlx4: Improve another size determination in alloc_pv_object()

2017-02-19 Thread Majd Dibbiny
st: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Thanks, Reviewed-by: Majd Dibbiny

Re: [PATCH 02/29] IB/mlx4: Improve another size determination in mlx4_ib_alloc_pv_bufs()

2017-02-19 Thread Majd Dibbiny
; 2.11.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Thanks, Reviewed-by: Majd Dibbiny

Re: [PATCH] IB/cma: Fix reversed test

2017-01-28 Thread Majd Dibbiny
We have message sniffer that checks for unwanted prints after each test.. Sent from my iPhone > On Jan 28, 2017, at 8:59 AM, Dan Carpenter wrote: > > On Fri, Jan 27, 2017 at 07:05:52PM -0500, Doug Ledford wrote: >>> Do you think this patch needs "Fixes:" and "Cc: stable" tags? >> >> It does no

Re: [PATCH] IB/cma: Fix reversed test

2017-01-28 Thread Majd Dibbiny
> On Jan 28, 2017, at 2:47 PM, Majd Dibbiny wrote: > Please ignore the previous email. It was part of an internal discussion.. > We have message sniffer that checks for unwanted prints after each test.. > > Sent from my iPhone > >> On Jan 28, 2017, at 8:59 AM, Dan Car

Re: [PATCH] IB/mlx5: Fix a parameter of find_first_bit

2016-08-27 Thread Majd Dibbiny
Acked-by: Majd Dibbiny > On Aug 26, 2016, at 8:25 AM, Christophe JAILLET > wrote: > > The 2nd parameter of 'find_first_bit' is the number of bits to search. > In this case, we are passing 'sizeof(tmp)' which is likely to be 4 or 8 > because 'tmp