Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3179644imw; Mon, 11 Jul 2022 03:41:03 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tvTvP9EFlL2VHe3xpQ6Wap9mahAFH53xPqyljMg53VkjOPV4afdyydHA+XXTmw9WTc0Z/x X-Received: by 2002:a05:6a00:1c5c:b0:505:7469:134a with SMTP id s28-20020a056a001c5c00b005057469134amr17877773pfw.16.1657536062754; Mon, 11 Jul 2022 03:41:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657536062; cv=none; d=google.com; s=arc-20160816; b=XyVTXi+rIA9Hjl0muvV4qd5ovOzhBDMlql46pTtcUJks6NxvJDielcR2qfsFfch70N aV9tkNEEcE4B4k7TPeVivPhQPt7YLIlHaw0SZY4l6E8k1x4OpyH6iPAYJHC1StDHrTUy qdBfiqw80BUIUoiIeSvq3efAn3B7wDScuYDjoQ0+S+Byav/cAp6Ws2rY9CRqGrkIw3Nt /2Qgykc4eCwpsLUX22bLkOCouT+VdFfMZpFfq3Kf4BVv2M2jVzsUKj3xnscirPXhADz7 aTeVd+xc1wRdcect+PgWFrxLHysmUf6tPkSlGBjvzizwE0Bmj2CuyicnNLsVrxxiCWiR fzfA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YqKEeZF5NwYYhbGGxI/O+uxjIg797B1ALqnRjDQZruI=; b=EJrGEi3p3XcZJ9SPmCCyMEalrjnCk6ugwTsyJM3GXCA6hfTy0oyA2eyYWG8imjJBTi +bgHWAUmVJmrYqXS7o/Xs9KXeU6NNCe9SjLslepXgzx0NXFTVdY6YdyPvCc/MYVruJ0Y Rk1CW2lCTdO3BE5isNOZmTVlqAEuO3fTiHnW0uT3Sic4g/310GR5xVO2KlmSwVHDkZ6n o6lz0IWmzwJLvpWrIHZJen7UO8alxpercoez+sr52uqF6VhDjzNF8h9AVYKMxNoMWvoZ 8t614xituOhf7KkmCQJOEoGS1hXfA2eoUxZjLUhM34O2SrhZIBy3luIxxDMNwG1jLKfy QMZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qUVCBgql; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 12-20020a630b0c000000b00414727bfd53si8846661pgl.594.2022.07.11.03.40.50; Mon, 11 Jul 2022 03:41:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qUVCBgql; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230148AbiGKJQZ (ORCPT + 99 others); Mon, 11 Jul 2022 05:16:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231397AbiGKJOu (ORCPT ); Mon, 11 Jul 2022 05:14:50 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 830DF3CBEE; Mon, 11 Jul 2022 02:10:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1C8B7611F1; Mon, 11 Jul 2022 09:10:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D735C341CE; Mon, 11 Jul 2022 09:10:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657530641; bh=AiqScboVoKrl9NbfUrwOqZcc0KyBFSunSKXP2EyflOA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qUVCBgqlo4XR0v4SXgM4Rw35J95q8PVXGVTZzrIYsPHj5mJTBK09saY8HHres9/wS EgqTYIPIuqS2cqAHhttJczO+fOS93rM6Phadu27uNG2RpxdUr9Cq2lJBNOSL6G1AoG 9MFLH+voZ9pFQQFjVRdnNWqrXm8nFzeWPI7PtrQg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Guiling Deng , Helge Deller Subject: [PATCH 5.4 09/38] fbdev: fbmem: Fix logo center image dx issue Date: Mon, 11 Jul 2022 11:06:51 +0200 Message-Id: <20220711090539.003201795@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220711090538.722676354@linuxfoundation.org> References: <20220711090538.722676354@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Guiling Deng commit 955f04766d4e6eb94bf3baa539e096808c74ebfb upstream. Image.dx gets wrong value because of missing '()'. If xres == logo->width and n == 1, image.dx = -16. Signed-off-by: Guiling Deng Fixes: 3d8b1933eb1c ("fbdev: fbmem: add config option to center the bootup logo") Cc: stable@vger.kernel.org # v5.0+ Signed-off-by: Helge Deller Signed-off-by: Greg Kroah-Hartman --- drivers/video/fbdev/core/fbmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/video/fbdev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c @@ -512,7 +512,7 @@ static int fb_show_logo_line(struct fb_i while (n && (n * (logo->width + 8) - 8 > xres)) --n; - image.dx = (xres - n * (logo->width + 8) - 8) / 2; + image.dx = (xres - (n * (logo->width + 8) - 8)) / 2; image.dy = y ?: (yres - logo->height) / 2; } else { image.dx = 0;