Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5929468ybi; Wed, 31 Jul 2019 05:39:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqz0BXLwYrkGPOzwso3T2u+vRTQ+6znIm0nw4O6VXxmW9EHAUVS/y9f6tA52GtkUK8WSMJTW X-Received: by 2002:a17:902:2ac8:: with SMTP id j66mr114925794plb.273.1564576749622; Wed, 31 Jul 2019 05:39:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564576749; cv=none; d=google.com; s=arc-20160816; b=rF5jlKAwAnVee6sDt8ZwnDJh0mpkgOwLX331hba/rW6poXH46sgcCCZC4haH/b7vH5 rejflFAB8Iup5xg9h2aTXNAHAhUcx8te8rO4+3OOLe6htcTl9G4nwZHSDt1KCo7Pgkha zttathfJQWpxJVwVI3Z3NWGANJ/mr+6JG6CjD7URZ+2e03NWFd0OyeTF3psoZJhntpnM EK4XC+3hHfqiqGIyPGOtUw2U+KMR2PdpW8ke+b48ahqL3SokxUj+mxRxCI61zkVue0B2 kO6Ne3QxbADEqQVCsdBKrp+c+jdwj7YmwDzYRSVFtqNtOunPEE0YGnWloYUTtv8T5abE K5Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=YjySvFcpZUZq01MALRV/0zm8dxHDb9Vc+R5AAsLgh4I=; b=HhS/GenPhfhSO5mBK6j/1ZzvopOb9jqJvRAHo7gfTqHBDrJoiCvcQ77r5IAaImSQ+X m0qgsSyuO6FlQQsUN087Om8UdBI5RryNMxe0u+e2UP393V3Mghq+jD/sooN40NltGFjU Sf6NHffvM9Du4o6GyL3B+CLByLOR7dhJlwTg/jw4VkfcWYAy5ZAA4Z5VGY6GBMuQzevL 2bOVEJKHPsO1kQEAkAR6Ye8G75fh6ZzHNTv6ICmKr8h5YPmZAwgjGO6wGMsCymAm+Cw2 rsFG7C7DOE7cJDTIuqaKtjgbmwzIwhveYgOK4sM45IsFI2YQvFjNPvZIJpLD1D712UZF LxhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a10si32982107pff.277.2019.07.31.05.38.54; Wed, 31 Jul 2019 05:39:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387524AbfGaLUO (ORCPT + 99 others); Wed, 31 Jul 2019 07:20:14 -0400 Received: from charlotte.tuxdriver.com ([70.61.120.58]:38667 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725793AbfGaLUN (ORCPT ); Wed, 31 Jul 2019 07:20:13 -0400 Received: from cpe-2606-a000-111b-6140-0-0-0-162e.dyn6.twc.com ([2606:a000:111b:6140::162e] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1hsmeG-0001W9-GP; Wed, 31 Jul 2019 07:20:05 -0400 Date: Wed, 31 Jul 2019 07:19:32 -0400 From: Neil Horman To: Joe Perches Cc: Vlad Yasevich , Marcelo Ricardo Leitner , "David S. Miller" , linux-sctp@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: sctp: Rename fallthrough label to unhandled Message-ID: <20190731111932.GA9823@hmswarspite.think-freely.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.0 (2019-05-25) X-Spam-Score: -2.9 (--) X-Spam-Status: No Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 30, 2019 at 10:04:37PM -0700, Joe Perches wrote: > fallthrough may become a pseudo reserved keyword so this only use of > fallthrough is better renamed to allow it. > > Signed-off-by: Joe Perches Are you referring to the __attribute__((fallthrough)) statement that gcc supports? If so the compiler should by all rights be able to differentiate between a null statement attribute and a explicit goto and label without the need for renaming here. Or are you referring to something else? Neil > --- > net/sctp/sm_make_chunk.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c > index 36bd8a6e82df..3fdcaa2fbf12 100644 > --- a/net/sctp/sm_make_chunk.c > +++ b/net/sctp/sm_make_chunk.c > @@ -2152,7 +2152,7 @@ static enum sctp_ierror sctp_verify_param(struct net *net, > case SCTP_PARAM_SET_PRIMARY: > if (net->sctp.addip_enable) > break; > - goto fallthrough; > + goto unhandled; > > case SCTP_PARAM_HOST_NAME_ADDRESS: > /* Tell the peer, we won't support this param. */ > @@ -2163,11 +2163,11 @@ static enum sctp_ierror sctp_verify_param(struct net *net, > case SCTP_PARAM_FWD_TSN_SUPPORT: > if (ep->prsctp_enable) > break; > - goto fallthrough; > + goto unhandled; > > case SCTP_PARAM_RANDOM: > if (!ep->auth_enable) > - goto fallthrough; > + goto unhandled; > > /* SCTP-AUTH: Secion 6.1 > * If the random number is not 32 byte long the association > @@ -2184,7 +2184,7 @@ static enum sctp_ierror sctp_verify_param(struct net *net, > > case SCTP_PARAM_CHUNKS: > if (!ep->auth_enable) > - goto fallthrough; > + goto unhandled; > > /* SCTP-AUTH: Section 3.2 > * The CHUNKS parameter MUST be included once in the INIT or > @@ -2200,7 +2200,7 @@ static enum sctp_ierror sctp_verify_param(struct net *net, > > case SCTP_PARAM_HMAC_ALGO: > if (!ep->auth_enable) > - goto fallthrough; > + goto unhandled; > > hmacs = (struct sctp_hmac_algo_param *)param.p; > n_elt = (ntohs(param.p->length) - > @@ -2223,7 +2223,7 @@ static enum sctp_ierror sctp_verify_param(struct net *net, > retval = SCTP_IERROR_ABORT; > } > break; > -fallthrough: > +unhandled: > default: > pr_debug("%s: unrecognized param:%d for chunk:%d\n", > __func__, ntohs(param.p->type), cid); > -- > 2.15.0 > >