From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC4ACC8300C for ; Thu, 30 Apr 2020 10:03:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BB3FA2137B for ; Thu, 30 Apr 2020 10:03:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726832AbgD3KDL (ORCPT ); Thu, 30 Apr 2020 06:03:11 -0400 Received: from smtprelay0089.hostedemail.com ([216.40.44.89]:57568 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726378AbgD3KDL (ORCPT ); Thu, 30 Apr 2020 06:03:11 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay02.hostedemail.com (Postfix) with ESMTP id DDE4F1263; Thu, 30 Apr 2020 10:03:09 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: grip36_8fddf9ae77656 X-Filterd-Recvd-Size: 1988 Received: from XPS-9350.home (unknown [47.151.136.130]) (Authenticated sender: joe@perches.com) by omf20.hostedemail.com (Postfix) with ESMTPA; Thu, 30 Apr 2020 10:03:08 +0000 (UTC) Message-ID: <4c91091b304fc5df2a2f292a1e0c78d80217bb94.camel@perches.com> Subject: Re: [PATCH v2 2/7] staging: qlge: Remove gotos from ql_set_mac_addr_reg From: Joe Perches To: Dan Carpenter , Rylan Dmello Cc: Manish Chopra , GR-Linux-NIC-Dev@marvell.com, Greg Kroah-Hartman , netdev@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Date: Thu, 30 Apr 2020 03:03:07 -0700 In-Reply-To: <20200430093835.GT2014@kadam> References: <20200430093835.GT2014@kadam> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.36.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2020-04-30 at 12:38 +0300, Dan Carpenter wrote: > On Wed, Apr 29, 2020 at 09:33:04PM -0400, Rylan Dmello wrote: > > As suggested by Joe Perches, this patch removes the 'exit' label > > from the ql_set_mac_addr_reg function and replaces the goto > > statements with break statements. [] > > diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c [] > > @@ -336,22 +336,20 @@ static int ql_set_mac_addr_reg(struct ql_adapter *qdev, u8 *addr, u32 type, > > > > status = ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MW, 0); > > if (status) > > - goto exit; > > + break; > > Just "return status". A direct return is immediately clear but with a > break statement then you have to look down a bit and then scroll back. To me, 6 of 1, half dozen of other as all the case breaks could be returns. So either form is fine with me. The old form was poor through.