From patchwork Mon Mar 22 16:41:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 406169 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3720694jai; Mon, 22 Mar 2021 09:42:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/kvum3k5cFogyge5gNSMmMtzaSek0gKi0qNVMHsMdBtDjAlleeUC5qYffNsWqZRTWlCSX X-Received: by 2002:aa7:8d84:0:b029:1f8:3449:1bc6 with SMTP id i4-20020aa78d840000b02901f834491bc6mr664616pfr.76.1616431330240; Mon, 22 Mar 2021 09:42:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616431330; cv=none; d=google.com; s=arc-20160816; b=LSrv683V0QB0OUAkJ3cyqk8ma0F5M6vS84b0ENem40uaTf1QwkX78uKiz5TznbUwoU +h1bkzrEzJA17E1wCcJ1lZs7TQbZJVlCP6pPq38CXXf5OoklIwuk3QDGH1IjV8Wbj/Kh tbITtxMTJabZR6Woz5jG4cfnGTU2Ek4Yb15Yjz2RfVMlYlobAarzsgbt3sllxdMtx1mx B4WkFhl+GQRWb/6Bx9r/zLoQvgwCCgI/g8WSWW8BvOkg5RlRnbyWmRx3nNLkSU2O2cK3 GendzeY/LxTcUMLKxM9Ec2alXKpeV+Mo8PVKa4365KP/IESmzp2TRF+6l0EdsfKlcwMn fQ7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=hBz9pRjvKD1SifU6lN73dzlXW44ecpqQjHHzmTeSOrw=; b=zi2SvCQ8f0gLmi7yxMWuHmcUmqgBF+8WEfuQmzA22OBn94LlnLkU66SVUHflTepvz/ xWwf8MPYJ2u4brzdwVl2fNH2sLwh1LaTsRsNq5TPO2vjWe8ZSZNZVa9rDpE9ZkIctewj L91A7qHevTrvYruFSy9s6yZvOLBambygui+EMrbYUZ0FANrIrATmSg7CR7Qn4X2w6Gyh A7eQiFPhZoe4WhP2RfEIwgH5OGsKx1scN0hVNbmON13gYh+XA491rPamOeVVch2kUOAM UfG3tg9CAbEMCj81QLNV8J/My/W9IneC8zobdkpwpjUmui22/Hk1ZZ2GhBOf23Qm4MQH 3s7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=effL3sJz; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id ei12si15899772pjb.95.2021.03.22.09.42.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Mar 2021 09:42:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=effL3sJz; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4E26E6E52C; Mon, 22 Mar 2021 16:42:09 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id AFB176E52C for ; Mon, 22 Mar 2021 16:42:07 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 9AEB161983; Mon, 22 Mar 2021 16:42:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616431327; bh=9xvqTNezw3tYuoVfeeADeGM3s9v4JWgUTmRGf4uQ2NU=; h=From:To:Cc:Subject:Date:From; b=effL3sJznDj8ualeXh5XCrDafKag1c2smDyLYgtFi/TZ/nhyq+qP6dzFvy6zU0uXJ YI+BBE7mnNAxmrU9dukG9Gx6vnYPWGd+GJCr8g8UiFalENeznr9qCd0/2H+hOO/rHN ZnmXT92X720doHPJh3OF2eUW6l8NWz1YDCZLRYPLsfrIBMEGcy/YmKiuxVZv2FPadm kYshsDZEnmPM+0VOoE6BRjTAsal86mIFHv+gh7f1/6hPRfSqKpwt1Ot2KfEID/pw+1 0N5DTaoT3xy7ZfhBogPXIM0BmhyPogSTNRGhogZ3LcSKOXvOlk0jzLTZ5lJfHCcFgl rANd6JpBL/4iw== From: Arnd Bergmann To: Tomi Valkeinen , David Airlie , Daniel Vetter Subject: [PATCH] drm/omap: fix misleading indentation in pixinc() Date: Mon, 22 Mar 2021 17:41:57 +0100 Message-Id: <20210322164203.827324-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Tony Lindgren , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Jyri Sarha , Dinghao Liu , Laurent Pinchart Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann An old patch added a 'return' statement after each BUG() in this driver, which was necessary at the time, but has become redundant after the BUG() definition was updated to handle this properly. gcc-11 now warns about one such instance, where the 'return' statement was incorrectly indented: drivers/gpu/drm/omapdrm/dss/dispc.c: In function ‘pixinc’: drivers/gpu/drm/omapdrm/dss/dispc.c:2093:9: error: this ‘else’ clause does not guard... [-Werror=misleading-indentation] 2093 | else | ^~~~ drivers/gpu/drm/omapdrm/dss/dispc.c:2095:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘else’ 2095 | return 0; | ^~~~~~ Address this by removing the return again and changing the BUG() to be unconditional to make this more intuitive. Fixes: c6eee968d40d ("OMAPDSS: remove compiler warnings when CONFIG_BUG=n") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/omapdrm/dss/dispc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c index f4cbef8ccace..5619420cc2cc 100644 --- a/drivers/gpu/drm/omapdrm/dss/dispc.c +++ b/drivers/gpu/drm/omapdrm/dss/dispc.c @@ -2090,9 +2090,8 @@ static s32 pixinc(int pixels, u8 ps) return 1 + (pixels - 1) * ps; else if (pixels < 0) return 1 - (-pixels + 1) * ps; - else - BUG(); - return 0; + + BUG(); } static void calc_offset(u16 screen_width, u16 width,