Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3519203pxb; Mon, 4 Apr 2022 19:40:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxCb6HsHEqChfghTYGwQHvj2Sj89XdJPNdJvTg1JxciaxbW/ynZV4L+iSo9sPnEqGR4oLO X-Received: by 2002:a63:e617:0:b0:382:9ad9:d829 with SMTP id g23-20020a63e617000000b003829ad9d829mr986127pgh.553.1649126404491; Mon, 04 Apr 2022 19:40:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649126404; cv=none; d=google.com; s=arc-20160816; b=jW/wS7CxfYKvYU/NAC4nYHhTI5WVVWXDX/5qlGO4NcjKztgVzCAVvFLTAd0chrVE8/ AJi/c/tgx/KEmM3+1DtWwbYisPkCupFTxccXMEM/22pXUnKs0LDQS9s2bmZwK5uRwHTH PW4019r5NNHEPND9KLKOYLZkDewep4iwYdvKkjuw0n4VkK0L16t63qNrTp49zKpr/TrX EaMSbfVnQwXYibF4G0Z8OJtilvn8Nge9QmToVHdpCaJA47K5pGmpNZO+Ujfr4jsaGmA7 fpJvFbr2BTt9zeRwlDkhd9K8MuySNo+/KGr0d+SD1USlofBy2FQDJo6JdPtKSzZBHSUv RQdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Sl30kKIJsg/O7TNbwboBldDs3zVh/ER16Z6QthennmQ=; b=TlM/SQosNHzrWo+8BoJlCb4Py8Al403hB+GaqVvHdBeDPDJUQ7Oif+kz60caCjV9BX G71ErLuGC5g59DrlcsVSdcxjfAyv8coqS47TF4Np7aw6nJ+V/w32Y1RdSRCCIEm/w0DV Cl0IdDyJvy77LHffhSks7/gYufuyRAC7p34LqAONXjJl/kImG8/D9v+u2W8nNzcGI6ua oT3j1+e7G5pX7NjYosaoShNc+qvBrkR1MH0rzmV1NYxH8UxNZtjoZ6Y9QfrT2vmGteh2 JZ77H35wFW+kVOwk2v/9XTBP6YrLetGxitu9fagMbrSlbYtJ4nW/mMhLf+HQNrbQ4pFl U2wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hwSG0NX3; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 84-20020a630757000000b003816043eee1si11669941pgh.214.2022.04.04.19.40.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 19:40:04 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hwSG0NX3; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E15F1328FE1; Mon, 4 Apr 2022 18:03:48 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352562AbiDAUnd (ORCPT + 99 others); Fri, 1 Apr 2022 16:43:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242759AbiDAUnc (ORCPT ); Fri, 1 Apr 2022 16:43:32 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5147175383 for ; Fri, 1 Apr 2022 13:41:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648845701; x=1680381701; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Utj1K8zHur0DD48Ld1ZfQvhBSbjz4rhtoEl2dU5x5CY=; b=hwSG0NX3axmV/YeTJgMdVUB33mJi7KNdz4JncsBOW5tURSYN8ogzP4OE ZzgOxyT3uHvgn1KEDUPWUqMVbi+EvAwEqBCCDzDHJPdw7U3YRGUOaTYw2 d2jZpKen97ZHsij3IV3gnAxJMh3VgnZYoY+ZMNVfxqc+vy9d45trR0tUm eBgt4B2F8zfGCelQ5uGvK5jDeMNGJz0a0VFWxvDfHdvMeLui6dkjDuUS2 ewX2EpiKWCg81EV98PuwcQhkgAF6CCSzGr6d9FuMUBCTVfqdVoFZzFwAv wyIYhB6wQp/+NYr564EA8AoVqLXemYn8PQU+Is5CZj9UUuc8ix+9tARS7 A==; X-IronPort-AV: E=McAfee;i="6200,9189,10304"; a="242371829" X-IronPort-AV: E=Sophos;i="5.90,228,1643702400"; d="scan'208";a="242371829" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2022 13:41:41 -0700 X-IronPort-AV: E=Sophos;i="5.90,228,1643702400"; d="scan'208";a="586984045" Received: from kmislam-mobl1.amr.corp.intel.com (HELO localhost) ([10.212.112.89]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2022 13:41:40 -0700 Date: Fri, 1 Apr 2022 13:41:40 -0700 From: Ira Weiny To: "Fabio M. De Francesco" Cc: Larry Finger , Phillip Potter , Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy@lists.linux.dev Subject: Re: [PATCH] staging: r8188eu: Remove goto to no-op exit label Message-ID: References: <20220401183513.26222-1-fmdefrancesco@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220401183513.26222-1-fmdefrancesco@gmail.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 01, 2022 at 08:35:13PM +0200, Fabio M. De Francesco wrote: > In function rtw_free_netdev() there are two "goto" jumps to a no-op exit > label called "RETURN". Remove the label and return in line. Thanks for the patch! However, A good commit message lists the why and what of a change. I don't see a why for this commit? FWIW (For what it's worth) I know of a couple of good reasons for this change but you should get in the habit of putting that in the commit message. Even for obvious things like this. Anyway, I think this patch can stand on it's own with an updated commit message. However, see below... > > Signed-off-by: Fabio M. De Francesco > --- > drivers/staging/r8188eu/os_dep/osdep_service.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/drivers/staging/r8188eu/os_dep/osdep_service.c b/drivers/staging/r8188eu/os_dep/osdep_service.c > index 7a6fcc96081a..d680bfba7f5d 100644 > --- a/drivers/staging/r8188eu/os_dep/osdep_service.c > +++ b/drivers/staging/r8188eu/os_dep/osdep_service.c > @@ -117,18 +117,15 @@ void rtw_free_netdev(struct net_device *netdev) > struct rtw_netdev_priv_indicator *pnpi; > > if (!netdev) > - goto RETURN; > + return; > > pnpi = netdev_priv(netdev); > > if (!pnpi->priv) > - goto RETURN; > + return; This does not look right. If netdev is not NULL why does this function skip free_netdev()? Fabio could you follow up with Larry and/or Phillip and see why the code does this? To me it looks like a potential bug. Thanks! Ira > > vfree(pnpi->priv); > free_netdev(netdev); > - > -RETURN: > - return; > } > > int rtw_change_ifname(struct adapter *padapter, const char *ifname) > -- > 2.34.1 >