Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3583826pxf; Mon, 22 Mar 2021 09:45:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlTi5Xxq5NBlj0vW8PDRwRTTg7peC4eXOM1yce24ZNJmlpahhDuEwrd+GTZJoYZNhM++ka X-Received: by 2002:a17:906:565a:: with SMTP id v26mr720870ejr.516.1616431549241; Mon, 22 Mar 2021 09:45:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616431549; cv=none; d=google.com; s=arc-20160816; b=flzyYYuP+b+3Y8d5CbECiHYHSj7HQatJma4W/1Kuniuw7uopQ33X7XWqtMELBY0hAi wHPgBIJ2BdtWiZoWy1mdTj26MiyRmpuWszuuY6+fXj6TpmDiBYyGejdpwTmQ2UrZHtNQ OikMp5nqSccRoX9jNHEVoV9t9ObWjZHNi/w8OPWzvOXM2aGmGa+uhBSbxFI54b+xgK/x qBebeR+QBPp8BbkC3+f+10O2cop3YvrqsMjlTeQLADHoR49fn3J65B/cckGO81d4EnNy 58xQKVQU2QcKYQEDKZSBm3ckhV3ClzGLT5jtaB04R+a7IxyFwqG1KzJROPnWW70E8LZa rP0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=MVtFKVArvnOd0mkxzyCs9xqY8+1e+0GCfwuxS2rjD3k=; b=Oj1e5GqVyd60cqULikhUo2YkU5cBlhT5kT3uayhyapPPeRDSut+3XE1QhCFBJvfu3I Y8pc7jHNpNmH2oBBYJGSHX0Ar9AfBf0K6pXiM45DCklpEUNz6lw6exQYuOSdOaoPblPL 30q420DKdabT7+WfRU+7QjZotjP/Qk/Qq/TlP0qcJHwlNWDRd+86i0wH7fw7c7qZZF8l yb0/5CNCUu++ypDKsgjVl3zC2McX5i3QYdu14rGoISUZp19we1ZibVkTrJ6r7G8/yXBk GrS6s5oJjtemEyZTqbZx38LDVKbpVAr5ar+e3WoisIoVKa1ehnweTkjaWq/nAbnsLUjM BFhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=effL3sJz; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p20si10689258ejy.439.2021.03.22.09.45.26; Mon, 22 Mar 2021 09:45:49 -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=@kernel.org header.s=k20201202 header.b=effL3sJz; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231387AbhCVQmT (ORCPT + 99 others); Mon, 22 Mar 2021 12:42:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:34830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232058AbhCVQmH (ORCPT ); Mon, 22 Mar 2021 12:42:07 -0400 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 Cc: Arnd Bergmann , Laurent Pinchart , Jyri Sarha , Tony Lindgren , Dinghao Liu , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, -- 2.29.2