RE: [PATCH] qed: fix qed_fill_link() error handling

2016-06-01 Thread Yuval Mintz
> > > I think we can just remove the IS_ENABLED() check there and define > > > the > > > IS_PF() macro conditionally to become 'true' if CONFIG_QED_SRIOV is > > > not set, like some other drivers do > > > > I think that would be unsafe with current qede - qede currently > > publishes its VFs' PCI

Re: [PATCH] qed: fix qed_fill_link() error handling

2016-06-01 Thread Arnd Bergmann
On Wednesday, June 1, 2016 10:55:02 AM CEST Yuval Mintz wrote: > > > I think both solutions are equally valid/elegant. > > > > > > Arnd? > > > > I think we can just remove the IS_ENABLED() check there and define the > > IS_PF() macro conditionally to become 'true' if CONFIG_QED_SRIOV is not set,

RE: [PATCH] qed: fix qed_fill_link() error handling

2016-06-01 Thread Yuval Mintz
> > I think both solutions are equally valid/elegant. > > > > Arnd? > > I think we can just remove the IS_ENABLED() check there and define the > IS_PF() macro conditionally to become 'true' if CONFIG_QED_SRIOV is not set, > like some other drivers do > > diff --git

Re: [PATCH] qed: fix qed_fill_link() error handling

2016-05-31 Thread Arnd Bergmann
On Tuesday, May 31, 2016 2:20:46 PM CEST David Miller wrote: > From: Yuval Mintz > Date: Mon, 30 May 2016 16:24:07 + > > >> +if (IS_ENABLED(CONFIG_QED_SRIOV) && !IS_PF(hwfn->cdev)) { > >> +qed_vf_get_link_params(hwfn, params); > >> +

Re: [PATCH] qed: fix qed_fill_link() error handling

2016-05-31 Thread David Miller
From: Yuval Mintz Date: Mon, 30 May 2016 16:24:07 + >> +if (IS_ENABLED(CONFIG_QED_SRIOV) && !IS_PF(hwfn->cdev)) { >> +qed_vf_get_link_params(hwfn, params); >> +qed_vf_get_link_state(hwfn, link); >> +qed_vf_get_link_caps(hwfn,

RE: [PATCH] qed: fix qed_fill_link() error handling

2016-05-30 Thread Yuval Mintz
> + if (IS_ENABLED(CONFIG_QED_SRIOV) && !IS_PF(hwfn->cdev)) { > + qed_vf_get_link_params(hwfn, params); > + qed_vf_get_link_state(hwfn, link); > + qed_vf_get_link_caps(hwfn, link_caps); > + > + return 0; > + } The IS_ENABLED here seems a bit

[PATCH] qed: fix qed_fill_link() error handling

2016-05-30 Thread Arnd Bergmann
gcc warns about qed_fill_link possibly accessing uninitialized data: drivers/net/ethernet/qlogic/qed/qed_main.c: In function 'qed_fill_link': drivers/net/ethernet/qlogic/qed/qed_main.c:1170:35: error: 'link_caps' may be used uninitialized in this function [-Werror=maybe-uninitialized] While