Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3166778imw; Mon, 11 Jul 2022 03:21:23 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uZjSnkZeBk42vrPxKsYXx2/7WXpwpgJkjdgJQKJX2pKzke/UW4l2oQD+ZFDyeNnQ6Z5TK2 X-Received: by 2002:a05:6402:1914:b0:43a:d548:8adc with SMTP id e20-20020a056402191400b0043ad5488adcmr5840717edz.214.1657534882976; Mon, 11 Jul 2022 03:21:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657534882; cv=none; d=google.com; s=arc-20160816; b=dAeXNZB0uKkb4YtnkYWCLCEWFeTNzroKirZWTrA8c20eh11EFONgT5mmFzXRdcWs+Y pqf3aBsV8yAK87BHVNfdSOYLgA0Oqxz0/12h2ahO/tO014tPUx8d/xkwZmk0XKl0BISI apFkz9CT151cbJquYISbU4vBjCp+qiErj9OvtBBi86VDEkTkHQoNOsdDAcURxol3PBgt zbiInRRtmjQ5g+KT8F7iBuahCz/R2sXpC5Vdm9ze7NEUYGykhR5dDwJy+rJgn/vvY/KV V1W690E/m42PeRlUgm2qJUnptKUVlLgTIp7G0UlrfB6L+Q0xXQrghOSZVcOJ4jAjDfhB pzIA== 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=Nf9tzi1o+q6xP7iOetaphIFngn0VHR+0XTJ6Vk6iokI=; b=ChGXPZq4/LFOvSbmOnFv3DjOv7G8vr9vDQ3aWHgMSAfiSPVCAnoYym2k+CPTpMyPfo P7dm7TZkXiJmb86+pDR/DeCP9/lvUOMM0Id8ACncXcYaN5GaPrq5YLcWlLaHe3cUnG6f lnGZZFeIzNRVO2yab/4RF36Knb4j1szBQsE7+wviCzPpW3M5GBB4Qye8jYbDLI0ULiNy uMbBB+SZctMk3IEtZxa8Y/1jBROpanGqurDuAlnyoFQ0NLKx95PxoYrAdf772n/FJU6D U5L33bd+F6juDTRG5INkg0BOPtkOdYQ/4hntFuDpkBUl+I/ZaPs8ybT76277baY9pf72 wClQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KyExAqNU; 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 m22-20020aa7c2d6000000b004396bf4d279si9238147edp.593.2022.07.11.03.20.58; Mon, 11 Jul 2022 03:21:22 -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=KyExAqNU; 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 S231474AbiGKJT0 (ORCPT + 99 others); Mon, 11 Jul 2022 05:19:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231759AbiGKJSi (ORCPT ); Mon, 11 Jul 2022 05:18:38 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2BDE4D4D7; Mon, 11 Jul 2022 02:11:54 -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 ams.source.kernel.org (Postfix) with ESMTPS id 969E3B80E79; Mon, 11 Jul 2022 09:11:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5807C34115; Mon, 11 Jul 2022 09:11:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657530712; bh=LTvfCJiPIP5D7fDUsggvikSCbkMOiuS1IHVDXNZ+uSY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KyExAqNUZBw6W+k/sbqZJgsQ7BIBhl8hcz4phyrKqLKN2Zb1Db18nHZlWD/z156LD HEOL2NUY1/uXWmELmU0oCxA6JleK+mQZA2vcVXOaOhEDu6RkaMM05yHiUWZ92pn9BG yITg0pLLDYhTpk7wojf+zdjNYYytdFDAzqFliF5Y= 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.10 13/55] fbdev: fbmem: Fix logo center image dx issue Date: Mon, 11 Jul 2022 11:07:01 +0200 Message-Id: <20220711090542.153048858@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220711090541.764895984@linuxfoundation.org> References: <20220711090541.764895984@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 @@ -513,7 +513,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;