From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rustad, Mark D Date: Wed, 29 Jul 2015 20:55:20 +0000 Subject: [Intel-wired-lan] [PATCH] ixgbe: fix simple_return.cocci warnings In-Reply-To: <20150729071125.GA23999@lkp-nex05> References: <201507291522.YuNdtPvl%fengguang.wu@intel.com> <20150729071125.GA23999@lkp-nex05> Message-ID: <6CC3D61D-0D4E-495F-8644-A0E1C14E3432@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: intel-wired-lan@osuosl.org List-ID: > On Jul 29, 2015, at 12:11 AM, Wu, Fengguang wrote: > > drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c:153:1-7: WARNING: end returns can be simpified > > Simplify a trivial if-return sequence. Possibly combine with a > preceding function call. > Generated by: scripts/coccinelle/misc/simple_return.cocci > > CC: Mark Rustad > Signed-off-by: Fengguang Wu > --- > > ixgbe_x550.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c > +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c > @@ -150,12 +150,8 @@ static s32 ixgbe_get_cs4227_status(struc > if (status) > return status; > > - status = ixgbe_check_cs4227_reg(hw, IXGBE_CS4227_HOST_SPARE24_LSB + > + return ixgbe_check_cs4227_reg(hw, IXGBE_CS4227_HOST_SPARE24_LSB + > (1 << 12)); > - if (status) > - return status; > - > - return 0; > } > > /** Please don't apply this as-is. It will introduce an indentation error that checkpatch will complain about. I can either respin the series to incorporate this, or this patch can be changed to adjust the indentation. Whichever you prefer. -- Mark Rustad, Networking Division, Intel Corporation -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 841 bytes Desc: Message signed with OpenPGP using GPGMail URL: