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=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 17502C433FF for ; Fri, 2 Aug 2019 17:51:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E98CF217F5 for ; Fri, 2 Aug 2019 17:51:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2436524AbfHBRvF (ORCPT ); Fri, 2 Aug 2019 13:51:05 -0400 Received: from charlotte.tuxdriver.com ([70.61.120.58]:40228 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388634AbfHBRvF (ORCPT ); Fri, 2 Aug 2019 13:51:05 -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 1htbhe-0003l5-MV; Fri, 02 Aug 2019 13:50:59 -0400 Date: Fri, 2 Aug 2019 13:50:22 -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: <20190802175022.GB6957@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) 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 > --- > 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 > > Yeah, it seems reasonable to me, though I'm still not comfortable with defining fallthrough as a macrotized keyword, but thats a debate for another thread Acked-by: Neil Horman