[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20130917.152855.203757088566537811.davem@davemloft.net>
Date: Tue, 17 Sep 2013 15:28:55 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: or.gerlitz@...il.com
Cc: prarit@...hat.com, jackm@....mellanox.co.il,
netdev@...r.kernel.org, dledford@...hat.com, amirv@...lanox.com,
ogerlitz@...lanox.com
Subject: Re: [PATCH 2/2] Re: net, mellanox mlx4 Fix compile warnings
From: Or Gerlitz <or.gerlitz@...il.com>
Date: Tue, 17 Sep 2013 22:25:57 +0300
> On Tue, Sep 17, 2013 at 10:13 PM, Prarit Bhargava <prarit@...hat.com> wrote:
>> Fix unitialized variable warnings.
>>
>> drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function ‘mlx4_HW2SW_CQ_wrapper’:
>> drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:2551:16: error: ‘cq’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
>> atomic_dec(&cq->mtt->ref_count);
>> ^
>> drivers/net/ethernet/mellanox/mlx4/resource_tracker.c: In function ‘mlx4_HW2SW_SRQ_wrapper’:
>> drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:2734:17: error: ‘srq’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
>> atomic_dec(&srq->mtt->ref_count);
>>
>> [v2]: davem suggested making cq_res_start_move_to() return 'cq' as an error
>> pointer instead of setting 'cq' by reference. I also did the same for srq.
>
> Pravit, as I wrote you earlier on this thread, Jack from our team
> maintains this piece (SRIOV resource tracker) of the mlx4 core driver
> code, so I am adding him. Dave, as many of us here he might be OOO for
> the coming ten days for holiday vacation, so would ask you to please
> wait patiently for his ack/nak...
I already stated that I wanted this issue fixed differently.
Specifically I said that these functions should return error pointers,
instead of trying to return an integer error whilst setting the cq
pointer by reference.
This is a method which is idiomatic and common across the kernel, and
is the preferred way to handle this kind of situation.
Powered by blists - more mailing lists