public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mlx5: qp: variable may be used uninitialized
@ 2013-07-16 13:35 Andi Shyti
  2013-07-17 16:06 ` Eli Cohen
  0 siblings, 1 reply; 2+ messages in thread
From: Andi Shyti @ 2013-07-16 13:35 UTC (permalink / raw)
  To: eli, roland, sean.hefty, hal.rosenstock; +Cc: linux-rdma, linux-kernel, andi

in the sq_overhead() function, if qp_typ is equal to IB_QPT_RC,
size will be used uninitialized.

Signed-off-by: Andi Shyti <andi@etezian.org>
---
 drivers/infiniband/hw/mlx5/qp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index 16ac54c..045f8cd 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -199,7 +199,7 @@ static int set_rq_size(struct mlx5_ib_dev *dev, struct ib_qp_cap *cap,
 
 static int sq_overhead(enum ib_qp_type qp_type)
 {
-	int size;
+	int size = 0;
 
 	switch (qp_type) {
 	case IB_QPT_XRC_INI:
-- 
1.8.3.2

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

* Re: [PATCH] mlx5: qp: variable may be used uninitialized
  2013-07-16 13:35 [PATCH] mlx5: qp: variable may be used uninitialized Andi Shyti
@ 2013-07-17 16:06 ` Eli Cohen
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Cohen @ 2013-07-17 16:06 UTC (permalink / raw)
  To: Andi Shyti
  Cc: eli, roland, sean.hefty, hal.rosenstock, linux-rdma, linux-kernel

Acked-by: Eli Cohen <eli@mellanox.com>

On Tue, Jul 16, 2013 at 03:35:01PM +0200, Andi Shyti wrote:
> in the sq_overhead() function, if qp_typ is equal to IB_QPT_RC,
> size will be used uninitialized.
> 
> Signed-off-by: Andi Shyti <andi@etezian.org>
> ---
>  drivers/infiniband/hw/mlx5/qp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
> index 16ac54c..045f8cd 100644
> --- a/drivers/infiniband/hw/mlx5/qp.c
> +++ b/drivers/infiniband/hw/mlx5/qp.c
> @@ -199,7 +199,7 @@ static int set_rq_size(struct mlx5_ib_dev *dev, struct ib_qp_cap *cap,
>  
>  static int sq_overhead(enum ib_qp_type qp_type)
>  {
> -	int size;
> +	int size = 0;
>  
>  	switch (qp_type) {
>  	case IB_QPT_XRC_INI:
> -- 
> 1.8.3.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2013-07-17 16:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-16 13:35 [PATCH] mlx5: qp: variable may be used uninitialized Andi Shyti
2013-07-17 16:06 ` Eli Cohen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox