Message ID | 20170413063929.GA151102@ivytown2.lkp.intel.com |
---|---|
State | Rejected |
Headers | show |
> -----Original Message----- > From: lkp > Sent: Wednesday, April 12, 2017 11:40 PM > To: Nguyen, Anthony L <anthony.l.nguyen@intel.com> > Cc: kbuild-all@01.org; intel-wired-lan@lists.osuosl.org > Subject: [PATCH] ixgbevf: fix boolreturn.cocci warnings > > drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:1683:8-9: WARNING: return > of 0/1 in function 'ixgbevf_init_rss_key' with return type bool > > Return statements in functions returning bool should use true/false instead of > 1/0. > Generated by: scripts/coccinelle/misc/boolreturn.cocci > > CC: Tony Nguyen <anthony.l.nguyen@intel.com> > Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> > --- > > ixgbevf_main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c > +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c > @@ -1680,7 +1680,7 @@ static inline bool ixgbevf_init_rss_key( > adapter->rss_key = rss_key; > } > > - return 0; > + return false; > } > > static void ixgbevf_setup_vfmrqc(struct ixgbevf_adapter *adapter) NACK The function can return -ENOMEM, so changing the return type to int vs. returning false here. A v2 of the original patch has already been submitted.
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c @@ -1680,7 +1680,7 @@ static inline bool ixgbevf_init_rss_key( adapter->rss_key = rss_key; } - return 0; + return false; } static void ixgbevf_setup_vfmrqc(struct ixgbevf_adapter *adapter)
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:1683:8-9: WARNING: return of 0/1 in function 'ixgbevf_init_rss_key' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: scripts/coccinelle/misc/boolreturn.cocci CC: Tony Nguyen <anthony.l.nguyen@intel.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> --- ixgbevf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)