Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4700684imu; Tue, 15 Jan 2019 04:38:49 -0800 (PST) X-Google-Smtp-Source: ALg8bN7nrRzv5wMBDHvMz7mMCVqJ7U54TWvbUV/fl31h8VkP5qsqERm6mVRlrTR2Avmgo8HGJL3P X-Received: by 2002:a63:5c22:: with SMTP id q34mr3655516pgb.417.1547555929164; Tue, 15 Jan 2019 04:38:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547555929; cv=none; d=google.com; s=arc-20160816; b=F08sVwBuafqGbWwnMnXKMcPvKZtA9ApZfyRtzL8yKfkLn/EONY1oe3npB7EQJqmR55 lbuI3tJoaOb0L/F7w40a/7maSIWTaQwIOmTmTHaiBaDFFN9JISiH8ghn2xwzrC3Hzt8T Ak7Y6UauimiUR3yYmOnjV20M00bFRMfqa7hWXxJZVuey/hjIvb8op6AGQu8I0C70ESav QdcDh9aFkfV/EwltXqE1WnNnFeMNVv2KBzzmyWgBOCgHJH3+RLQ3PRwYH90HT6kDcdOD nWeWA44TYACJR1sv4LU2AA8s50POgSL4u6qo+yx2go7F0X8fDZrEyJmgn+3NY78zZUc8 ZnjA== 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:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=fVuxywLN+hWEFqBjPujx3b2tZlMigafVMeZjipOROPY=; b=UYtIIBMW7KwquORPu/kkhKp637vBR58HaihmmK6GMQCs9O1axbmNGBpPrSCGoMkRFJ 4C8lfdCYuGdVVwPdgqcts6gfod7y2WL48X6KKCKTQVjgecqXirZW+cdloeDs+kAc8MuX 5dWSw2Awkj2FKgKfTr297509riVCly35QV0s1lIj0R0AMRcOuE+5zqK1B5D2spU1S/V5 EmELZQ2/AsQtc/rN3sn86SIi4i14Xe8QjYoeZLtq7h8z+rroZccNThxKCalE612b5b1a Y11yRp1IzSpwJ8q+yjQAUbszLhZiRkpRo1iDIs5grcUdIbUwXmBO7D3WO1H1LeXAZW5U PdsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=BAm485aP; 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 o22si3127247pgb.584.2019.01.15.04.38.32; Tue, 15 Jan 2019 04:38:49 -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; dkim=fail header.i=@ffwll.ch header.s=google header.b=BAm485aP; 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 S1728025AbfAOLuV (ORCPT + 99 others); Tue, 15 Jan 2019 06:50:21 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:42751 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726077AbfAOLuV (ORCPT ); Tue, 15 Jan 2019 06:50:21 -0500 Received: by mail-ed1-f65.google.com with SMTP id y20so2284468edw.9 for ; Tue, 15 Jan 2019 03:50:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=fVuxywLN+hWEFqBjPujx3b2tZlMigafVMeZjipOROPY=; b=BAm485aPBpi6LOUpU2/JyszSSBj6GbV5gZz2fWeV7xJId5HlUAqL5tstmZYEIMtCdy wMfnj5Isrp/UHPVqXkYfkzE7PA746FvOkgEGqqtrmft5+XHGgxrP7shLMRlAPZSPk/xb kgsevCthfCO1+TxvW8OnRGCHYKLyQ9AvNnujE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=fVuxywLN+hWEFqBjPujx3b2tZlMigafVMeZjipOROPY=; b=pS/0L6IcDYQT2jXA5HN2I+O97hd+yQJjoDgaMXDZIr2kEEVxWhttDKJrQK0Zg9sgNr TqPP3ZcA/mxsVqS/GkGPBGfyX+TzZ0JNgSmgh+euWhjzKn6chtvdZ0Um+mmzJilbZzDb DbB6OjUw65kDd0jXpqoRgWB4V1GzcsqMqORuCEtJXRQR3srQZ1JtmVOHuSvT4IGhRYiK 4JwChDtxyku2Zu4c2+OessLTRnpHswSorKpk5JpG/1mVKrknYw7qQv34Xd0ipWYFq8xL IxgkSTfQxmjv5/CINhcIUz0uzAAyR0mYpEChv2svS+eLp8gJ8VU0RMlDIG3yoBPwLPLe Jo7w== X-Gm-Message-State: AJcUukdPfU8w844S2DRkjNOHR+6UKtdDX8jBnAOr5FRtMW+D0GAivCJe anaumpACSF4XuF2ci76y4uorYg== X-Received: by 2002:a50:8ad9:: with SMTP id k25mr3118584edk.189.1547553019301; Tue, 15 Jan 2019 03:50:19 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:569e:0:3106:d637:d723:e855]) by smtp.gmail.com with ESMTPSA id k20sm4834955eda.71.2019.01.15.03.50.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 Jan 2019 03:50:18 -0800 (PST) Date: Tue, 15 Jan 2019 12:50:16 +0100 From: Daniel Vetter To: "Gustavo A. R. Silva" Cc: Mathieu Malaterre , Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm/dp: annotate implicit fall throughs Message-ID: <20190115115016.GK10517@phenom.ffwll.local> Mail-Followup-To: "Gustavo A. R. Silva" , Mathieu Malaterre , Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20190114202748.15584-1-malat@debian.org> <1d2a0c58-2419-9c43-b0d6-a8c1b387c240@embeddedor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1d2a0c58-2419-9c43-b0d6-a8c1b387c240@embeddedor.com> X-Operating-System: Linux phenom 4.19.0-1-amd64 User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 14, 2019 at 03:13:29PM -0600, Gustavo A. R. Silva wrote: > > > On 1/14/19 2:27 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: > > > > include/linux/compiler.h:77:22: warning: this statement may fall through [-Wimplicit-fallthrough=] > > include/asm-generic/bug.h:134:2: note: in expansion of macro 'unlikely' > > drivers/gpu/drm/drm_dp_helper.c:155:3: note: in expansion of macro 'WARN' > > include/linux/compiler.h:77:22: warning: this statement may fall through [-Wimplicit-fallthrough=] > > include/asm-generic/bug.h:134:2: note: in expansion of macro 'unlikely' > > drivers/gpu/drm/drm_dp_helper.c:173:3: note: in expansion of macro 'WARN' > > drivers/gpu/drm/drm_dp_helper.c:547:3: warning: this statement may fall through [-Wimplicit-fallthrough=] > > > > Signed-off-by: Mathieu Malaterre > Acked-by: Gustavo A. R. Silva Thanks for your patch, applied. -Daniel > > > --- > > drivers/gpu/drm/drm_dp_helper.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c > > index 516e82d0ed50..26835d174939 100644 > > --- a/drivers/gpu/drm/drm_dp_helper.c > > +++ b/drivers/gpu/drm/drm_dp_helper.c > > @@ -154,6 +154,7 @@ u8 drm_dp_link_rate_to_bw_code(int link_rate) > > default: > > WARN(1, "unknown DP link rate %d, using %x\n", link_rate, > > DP_LINK_BW_1_62); > > + /* fall through */ > > case 162000: > > return DP_LINK_BW_1_62; > > case 270000: > > @@ -171,6 +172,7 @@ int drm_dp_bw_code_to_link_rate(u8 link_bw) > > switch (link_bw) { > > default: > > WARN(1, "unknown DP link BW code %x, using 162000\n", link_bw); > > + /* fall through */ > > case DP_LINK_BW_1_62: > > return 162000; > > case DP_LINK_BW_2_7: > > @@ -552,6 +554,7 @@ int drm_dp_downstream_max_bpc(const u8 dpcd[DP_RECEIVER_CAP_SIZE], > > case DP_DS_16BPC: > > return 16; > > } > > + /* fall through */ > > default: > > return 0; > > } > > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch