Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp936169pxj; Fri, 4 Jun 2021 01:46:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0M3qJRgD20tSZCOjFGZaYy5F0P5XAOlHdSjR4us4DXUAN1S2I5EOfcFElufRuKeym5f9s X-Received: by 2002:a05:6402:1158:: with SMTP id g24mr3582490edw.134.1622796410878; Fri, 04 Jun 2021 01:46:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622796410; cv=none; d=google.com; s=arc-20160816; b=CotTGwnqzak5cBGHK+xfgW+PfWDFP9VELoaSjqsoxkVBKHdQRWFGK1QX7n+yEDy0UU D2nCUxs1oQj/B8Tm5Vd7zE+s/wlpepSWDXbYqtl4m2QnSecFeBlBnH77+JhDuX4/Bi7v j4UtTvsPfZiqmwYz2or/cKb+V4Qt+iOezz46XWwezJIGWaRGRAcRxtLURK2G9voa/dXF SMfGP98h9S8/EIfYpVXzdmjtHN3hkCECrtcc274EfBHeICD1C4XgCDSKdoWkddkMHrNZ tL7DQ6zKvt2PF3p4V+WlXCoJGm+TfcsEpm7IMY3aBuNViSjM3o25lBgucIwvfat9XKqi /8Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=8qje2jMT9k/yWcqfBZuQl0YlsfGCuFmFF0ZAae2cfIA=; b=hK/nHIcdXU+wBWY7EsKDlgjGHJXR4IFLKoLTxNeWkY/BvMxJFkrjYlNTPzwE2aXoZQ sR7DvKkDhElJzk8I9y5K+iS3sEIJlZL/zRLQAcnfr9X6cu2HCSzqqdCXyGXsNdgzdv3I NFCnOwTjJ70NV6SxkBm7erFh42tZgl2ere71QLL3vdP7lQTMl01J1juE4+27611JBWYe yxxDW5Q8BjWu+NG7g970FKl8K8WukJuw9Mbe/K7rx9pCdYTvVY1+AyOwdI470CTQaEr0 TrU6xzTs/rUy5tpjJJ7UmGOwkBiHPKr71H3XM4+n1iVca9Ni0VFH0SMZh6LPg3AgqHxc w14Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KOXWEob0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m9si4063942ejn.195.2021.06.04.01.46.27; Fri, 04 Jun 2021 01:46:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KOXWEob0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229962AbhFDIrR (ORCPT + 99 others); Fri, 4 Jun 2021 04:47:17 -0400 Received: from mail-lj1-f170.google.com ([209.85.208.170]:41801 "EHLO mail-lj1-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229930AbhFDIrQ (ORCPT ); Fri, 4 Jun 2021 04:47:16 -0400 Received: by mail-lj1-f170.google.com with SMTP id p20so10552635ljj.8; Fri, 04 Jun 2021 01:45:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=8qje2jMT9k/yWcqfBZuQl0YlsfGCuFmFF0ZAae2cfIA=; b=KOXWEob0hERH0Y0+StGplaqUt60wSGg+aqansgO/OyDXDzsC0XFHoEXfxKfj7uzmpc 7u4l5kDjjfVj0NIoW/TM64rCid5hMr4EzA4QMQ+hjlgwXaamzzl+iQnB284hethUcyJz KxHKDrI7yJxJjd9VklowlZMky6JUjwimfB8kxKt/kuHPZ8uZfTj9JxReDkrLxWAxqWld y0M7rZqfg/ftFfPkoRFHOSa/LdTFyYzBxPhCeTIuBE+rkqQDoyDs/weXTkeyVh92u9s0 1TqqvckhMoFwe3/2H0vWUjJSZpoANH8NhpGs+lPizHTVjfQXpNPTckbuXNdZFv3J26Ft sRsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=8qje2jMT9k/yWcqfBZuQl0YlsfGCuFmFF0ZAae2cfIA=; b=A8x9njMFDWTuTn1nqFqCfCCrYWQ3Fe9xQWmEKUTP2OZTl5lyjUnrscUQJNNsESAx36 sHURH3BHK31JQVDvZBdGuFh93JpVxwNdc7m4SuKsDPgvV077pWVFZ1EKpZIPznLRf0k+ yeW7QqWYkvb32d+UQczW9S4LdbZp6LRhtebYpl2HFsOWyvRDxlcQ2m6jeb9/Sp21wpKm xESOm9BLurqtciOulymDAK7iYQUifJCbgvUpw1PY19Oi4T++5xK5VFwrBZXFP7dYCFg+ gvLOJRdsAcVApZcGxq5g2Dv/H9xmdDQTy8TYPSFQXuVG9NtCi6x3nkqpgEF8My9PEFV4 DpmQ== X-Gm-Message-State: AOAM5339WB50Rh46+eLDdUvGiNzk5KbuoZSGZDxAUuRup1TVG94tjPYi mIabWzsNaexImgQlqqu2ZkyD1Eyy8uvsow== X-Received: by 2002:a2e:9f4c:: with SMTP id v12mr2596710ljk.176.1622796260789; Fri, 04 Jun 2021 01:44:20 -0700 (PDT) Received: from [10.0.0.40] (91-155-111-71.elisa-laajakaista.fi. [91.155.111.71]) by smtp.gmail.com with ESMTPSA id 26sm550657lfr.184.2021.06.04.01.44.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Jun 2021 01:44:20 -0700 (PDT) Subject: Re: [PATCH v2][next] ASoC: ti: davinci-mcasp: Fix fall-through warning for Clang To: Joe Perches , "Gustavo A. R. Silva" , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org References: <20210604072714.GA244640@embeddedor> From: =?UTF-8?Q?P=c3=a9ter_Ujfalusi?= Message-ID: <4c217782-21e5-b408-0fb9-f0a2c5b31591@gmail.com> Date: Fri, 4 Jun 2021 11:44:19 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/06/2021 10:53, Joe Perches wrote: > On Fri, 2021-06-04 at 02:27 -0500, Gustavo A. R. Silva wrote: >> In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning >> by explicitly adding a fallthrough; statement. >> >> Link: https://github.com/KSPP/linux/issues/115 >> Signed-off-by: Gustavo A. R. Silva >> --- >> Changes in v2: >>  - Use fallthrough; instead of break; >>  - Update changelog text. >>  Link: https://lore.kernel.org/linux-hardening/25941c37-6e38-88ae-3afe-4f5af44380d3@gmail.com/ > [] >> diff --git a/sound/soc/ti/davinci-mcasp.c b/sound/soc/ti/davinci-mcasp.c > [] >> @@ -2317,6 +2317,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev) >>   break; >>   default: >>   dev_err(&pdev->dev, "No DMA controller found (%d)\n", ret); >> + fallthrough; >>   case -EPROBE_DEFER: >>   goto err; >>   } > > While this is OK, perhaps the below would be clearer and a more common style > as it doesn't intermix default: with logging output and a case label. True, this looks even better. Acked-by: Peter Ujfalusi > --- > sound/soc/ti/davinci-mcasp.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/sound/soc/ti/davinci-mcasp.c b/sound/soc/ti/davinci-mcasp.c > index b94220306d1a8..1059a696ff90e 100644 > --- a/sound/soc/ti/davinci-mcasp.c > +++ b/sound/soc/ti/davinci-mcasp.c > @@ -2305,6 +2305,9 @@ static int davinci_mcasp_probe(struct platform_device *pdev) > goto err; > > ret = davinci_mcasp_get_dma_type(mcasp); > + if (ret == -EPROBE_DEFER) > + goto err; > + > switch (ret) { > case PCM_EDMA: > ret = edma_pcm_platform_register(&pdev->dev); > @@ -2317,7 +2320,6 @@ static int davinci_mcasp_probe(struct platform_device *pdev) > break; > default: > dev_err(&pdev->dev, "No DMA controller found (%d)\n", ret); > - case -EPROBE_DEFER: > goto err; > } > > -- Péter