From patchwork Sun Jul 30 20:34:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Engestrom X-Patchwork-Id: 9870677 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 131146038F for ; Sun, 30 Jul 2017 20:38:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F01E92856D for ; Sun, 30 Jul 2017 20:38:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E53A42857F; Sun, 30 Jul 2017 20:38:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 515D22856D for ; Sun, 30 Jul 2017 20:38:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9143B6E2C8; Sun, 30 Jul 2017 20:37:56 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by gabe.freedesktop.org (Postfix) with ESMTPS id D16B86E2C8 for ; Sun, 30 Jul 2017 20:37:54 +0000 (UTC) Received: by mail-wr0-f195.google.com with SMTP id g32so12921840wrd.5 for ; Sun, 30 Jul 2017 13:37:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=+Rm0fXWrD/EdCie4hPqtyWXVWmTYz2SfErkVm2hfzPo=; b=p+AmAU2GwsycDubgeQXyRPBNdeZZ43dev5aD444iYuHdwnMmuYHjJVqk2JPekWqFaD sgbMm9+2LCbZM0GZTvdSXlKw+VMb6NEZQcj8ItQVAnNPma88NYjqdngJH0mzzcz52HAK NYRZRdjkUIGnUgUMLOTZUBUqDKs7e2xHFHFN/ua0I3jP333/Hp+L+uoHT0ApX0jlKt/3 VuH/mIebGceEr8BIIy5nqrKPc6iYKPPnt0hcpmbhBqkwruYWO/1jPkSRdcs4ueewsUr0 d1VGlTXfMXIJ498ZHgOA1w8AUII29yJ50OOHeUZrsuVhDS4PV8J6lYY/fFRJ7Eec8djm b7og== X-Gm-Message-State: AIVw110UCCFbhrVLxMITQcgk+OdYf0nwn6OxIYTrsr6kBrQ9j5x7qWc9 QpZ9vcIdCKuWmUZwXTs= X-Received: by 10.223.181.10 with SMTP id a10mr12251525wrd.239.1501447072959; Sun, 30 Jul 2017 13:37:52 -0700 (PDT) Received: from localhost.localdomain (host109-145-147-240.range109-145.btcentralplus.com. [109.145.147.240]) by smtp.gmail.com with ESMTPSA id o30sm17046788wrb.76.2017.07.30.13.37.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 30 Jul 2017 13:37:52 -0700 (PDT) From: Eric Engestrom To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm] radeon: add fallthrough annotation Date: Sun, 30 Jul 2017 21:34:16 +0100 Message-Id: <20170730203416.4232-1-eric@engestrom.ch> X-Mailer: git-send-email 2.13.3 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP GCC 7 started warning when a switch case has neither a `break` nor a "fallthrough" comment. Let's be explicit that we meant to fall through here. Signed-off-by: Eric Engestrom Reviewed-by: Michel Dänzer --- radeon/radeon_surface.c | 1 + 1 file changed, 1 insertion(+) diff --git a/radeon/radeon_surface.c b/radeon/radeon_surface.c index 965be24c..04df77d6 100644 --- a/radeon/radeon_surface.c +++ b/radeon/radeon_surface.c @@ -2503,6 +2503,7 @@ static int radeon_surface_sanity(struct radeon_surface_manager *surf_man, if (surf->npix_y > 1) { return -EINVAL; } + /* fallthrough */ case RADEON_SURF_TYPE_2D: if (surf->npix_z > 1) { return -EINVAL;