Re: [PATCH net] net: hns3: clean up a return in hclge_tm_bp_setup()

2020-10-26 Thread Jakub Kicinski
On Fri, 23 Oct 2020 14:22:12 +0300 Dan Carpenter wrote: > Smatch complains that "ret" might be uninitialized if we don't enter > the loop. We do always enter the loop so it's a false positive, but > it's cleaner to just return a literal zero and that silences the > warning as well. > >

Re: [PATCH net] net: hns3: clean up a return in hclge_tm_bp_setup()

2020-10-26 Thread Dan Carpenter
On Mon, Oct 26, 2020 at 11:18:16AM +0800, Yunsheng Lin wrote: > On 2020/10/23 19:22, Dan Carpenter wrote: > > Smatch complains that "ret" might be uninitialized if we don't enter > > the loop. We do always enter the loop so it's a false positive, but > > it's cleaner to just return a literal zero

Re: [PATCH net] net: hns3: clean up a return in hclge_tm_bp_setup()

2020-10-25 Thread Yunsheng Lin
On 2020/10/23 19:22, Dan Carpenter wrote: > Smatch complains that "ret" might be uninitialized if we don't enter > the loop. We do always enter the loop so it's a false positive, but > it's cleaner to just return a literal zero and that silences the > warning as well. Thanks for the clean up.

[PATCH net] net: hns3: clean up a return in hclge_tm_bp_setup()

2020-10-23 Thread Dan Carpenter
Smatch complains that "ret" might be uninitialized if we don't enter the loop. We do always enter the loop so it's a false positive, but it's cleaner to just return a literal zero and that silences the warning as well. Signed-off-by: Dan Carpenter ---