Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4005911imu; Mon, 14 Jan 2019 13:06:29 -0800 (PST) X-Google-Smtp-Source: ALg8bN6qoOzhRfPgqrkM7fdsrtRcMS4I6qKZ18jO8zlCXiGwJ6cvPbRLeMoR1cAx+r5KdpKc43TK X-Received: by 2002:a65:41c2:: with SMTP id b2mr427070pgq.67.1547499989115; Mon, 14 Jan 2019 13:06:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547499989; cv=none; d=google.com; s=arc-20160816; b=aLy4Pfk95AeehKe06AwLyjtjGop+K4SaSq+ReeGcL32Z7EOXSvNLv6QPjWIMrUq2H7 O0xMOIL6FwrLasdoUDoYM7RKak8+UfO8yuDPBWDcCZOaWrP7BaAIQ918b0haoKkSK/Xp YoHZBvrjvRDRNjVrcsQMFJ9sLGKSFwnwx4wPAXw6PdFN6r/K5G83QRTmQLLlXNoF4VCc QlyRKlXI78r3MHwu9IwTm5Zoy07I9H0Pa8PJD+mgMYbNYR0x4qEEGWpf5iqfBSywjPlr Z3sbKScJ5c/oy9ks4XF+8pHA6EY4otltBWaP8KhxMgUW5xGLh55s6wEshD2UBoAUZ9CT 0yFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=LnM9pNCdkKlqWu0eix8uYvFQk8BEhHBjNYbaqNy3o8k=; b=ZfUo3F7XkxMtZvU5UDJ0T6277Zacjsu1XdpSzTAkTrM3VL72DrtgGoTQrzcX+pbZqS 8xVGiH8CEDpvrSMuNtmCancLQt52+B5wm8xHwgX7Y1hEyOCCSHeraR5i7DOeG8RvkE9e vUlpu8u/t7d0lunuwEJ5erfyCjJPYeaLJ7p3eUh7sF+ufOoi243Ueg3MGPfZq+Ei1Sap 65GXAtBeyCELpaIoES/T4Gow48DFyMF/xgxExqonuqFa+pX5jh6sTQyFCsYG/5aQ1KHM ExxfemkAiC6FHtfjFYDYTJDefzfdKCP8+9RYntFfNjoPGTWAfWFPxEb7VtfLC93xmadX SIfw== 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 u11si1189269plq.287.2019.01.14.13.06.14; Mon, 14 Jan 2019 13:06:29 -0800 (PST) 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 S1727010AbfANVFF (ORCPT + 99 others); Mon, 14 Jan 2019 16:05:05 -0500 Received: from gateway20.websitewelcome.com ([192.185.44.20]:23003 "EHLO gateway20.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726899AbfANVE7 (ORCPT ); Mon, 14 Jan 2019 16:04:59 -0500 Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway20.websitewelcome.com (Postfix) with ESMTP id 6ED4F400F2233 for ; Mon, 14 Jan 2019 15:04:58 -0600 (CST) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id j9Pmg19iE4FKpj9PmgRUDP; Mon, 14 Jan 2019 15:04:58 -0600 X-Authority-Reason: nr=8 Received: from [189.250.130.205] (port=50864 helo=[192.168.43.131]) by gator4166.hostgator.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1gj9Pl-000agy-Q1; Mon, 14 Jan 2019 15:04:58 -0600 Subject: Re: [PATCH] lib/siphash.c:: annotate implicit fall throughs To: Mathieu Malaterre , "Jason A. Donenfeld" Cc: linux-kernel@vger.kernel.org References: <20190114201911.13725-1-malat@debian.org> From: "Gustavo A. R. Silva" Message-ID: <481e4a45-29fb-7546-74c7-f23f61f9dc4c@embeddedor.com> Date: Mon, 14 Jan 2019 15:04:51 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20190114201911.13725-1-malat@debian.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 189.250.130.205 X-Source-L: No X-Exim-ID: 1gj9Pl-000agy-Q1 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([192.168.43.131]) [189.250.130.205]:50864 X-Source-Auth: gustavo@embeddedor.com X-Email-Count: 3 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/14/19 2:19 PM, Mathieu Malaterre wrote: > There is a plan to build the kernel with -Wimplicit-fallthrough and > these places in the code produced warnings (W=1). Fix them up. > > This commit remove the following warnings: > > lib/siphash.c:71:12: warning: this statement may fall through [-Wimplicit-fallthrough=] > lib/siphash.c:72:12: warning: this statement may fall through [-Wimplicit-fallthrough=] > lib/siphash.c:73:12: warning: this statement may fall through [-Wimplicit-fallthrough=] > lib/siphash.c:75:12: warning: this statement may fall through [-Wimplicit-fallthrough=] > lib/siphash.c:434:12: warning: this statement may fall through [-Wimplicit-fallthrough=] > > Signed-off-by: Mathieu Malaterre Acked-by: Gustavo A. R. Silva > --- > lib/siphash.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/lib/siphash.c b/lib/siphash.c > index 3ae58b4edad6..b95624f5aa34 100644 > --- a/lib/siphash.c > +++ b/lib/siphash.c > @@ -69,10 +69,14 @@ u64 __siphash_aligned(const void *data, size_t len, const siphash_key_t *key) > #else > switch (left) { > case 7: b |= ((u64)end[6]) << 48; > + /* fall through */ > case 6: b |= ((u64)end[5]) << 40; > + /* fall through */ > case 5: b |= ((u64)end[4]) << 32; > + /* fall through */ > case 4: b |= le32_to_cpup(data); break; > case 3: b |= ((u64)end[2]) << 16; > + /* fall through */ > case 2: b |= le16_to_cpup(data); break; > case 1: b |= end[0]; > } > @@ -432,6 +436,7 @@ u32 __hsiphash_aligned(const void *data, size_t len, const hsiphash_key_t *key) > } > switch (left) { > case 3: b |= ((u32)end[2]) << 16; > + /* fall through */ > case 2: b |= le16_to_cpup(data); break; > case 1: b |= end[0]; > } >