From patchwork Fri Jun 19 14:30:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 191234 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp650714ilo; Fri, 19 Jun 2020 08:54:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKClILt7gIHcHKrmO9wJ7yTq5fwqjD7kjYS91Ev+5oQ7uymGMDAnDs+tnmIUzxFOcHFXeg X-Received: by 2002:a05:6402:c09:: with SMTP id co9mr3903570edb.238.1592582065700; Fri, 19 Jun 2020 08:54:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592582065; cv=none; d=google.com; s=arc-20160816; b=IKfolflpr3WLssqftj8NL3xIGXZ1ik8MWRztMN2KCbm2JKuw1NKSMHjBzJUQRZR20a I7sGUM6RPAt/eZmHnOOrjZ7Fzw0y9CCXHbrnZfIP0fCMl1+dX5A7wCUkrKKZxlIIcXhm X/zx091zk/Vsb6GgqVKp5bofNUx2ogIlcd5vZGJBPL6XsXqhYZS7rx/dyU2GJ4NRnuA1 TrhvFQw02HCn1vw7nrU4L8ZVfLRfcZcnnLAure/FqxVTsDxiFggoE/3MhMmgwxSkHWP4 wfaAgC1QYAtJp6tvy6NTx400PEPjywG+WsatZqpebaJ69WWdK442Aer0SDW9O/OwZoGo GTlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CE9maytuS54R1dSkfZvBzGIOkPnZ169CnRLYrV9vclM=; b=xLnlu1wmujmIy9QrBMt/K+6rKmvm9Lqf75X+Plm6ALaiZcJiNIIeNeivmDe2uRaZRs WsySBpuANhtKeE3j2MjFrqEvmX5fLfRDg8we3xE+DGFI2Z7dNxyhjfZhu6W3J3H2g9z2 nFrNpNtkLg1BXL8sdMt4TCtuuf7LkRzpDsyfztyTWzo5Grtoqn/SToTQ+AX/DuGuxAk/ JW50Km1CKwdD8e9Zr0rOpOwaQddMhjSSxMOPasRFk8kSdxbuPUMee7SraglFB152XSVl /Gh/+QmWBihaqfVkTOkBdVStcnOBN7br5CQVrj7q8uMLl4fSpVanz+ZOKBgqtZjoK5oW M04A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="nKe2TS/1"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a14si4379905edn.360.2020.06.19.08.54.25; Fri, 19 Jun 2020 08:54:25 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=default header.b="nKe2TS/1"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388839AbgFSPyA (ORCPT + 15 others); Fri, 19 Jun 2020 11:54:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:53346 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388811AbgFSPWA (ORCPT ); Fri, 19 Jun 2020 11:22:00 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 27D0D21927; Fri, 19 Jun 2020 15:21:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592580119; bh=9Xe4Sx5w74/rmD8c1252EWSqEacJPDGX8bb4wGGi3ZQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nKe2TS/1r45fjiyASEUfCNBXMtcDxGpLvxQBflgzXyx/H5CEJxESWm9AiLuXAT6GG iXnnvSM2mJwPEETwE7szEDaXLN+qToCtFBb4VFDyMWHpe8jk7VaHnAc5h1rHL5z9Rw IdXHlqddSldpZztq0ZWjnOx0bR28jnXvmqgeSbAE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Tomi Valkeinen , Sam Ravnborg , Sasha Levin Subject: [PATCH 5.7 130/376] drm/bridge: fix stack usage warning on old gcc Date: Fri, 19 Jun 2020 16:30:48 +0200 Message-Id: <20200619141716.488320804@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200619141710.350494719@linuxfoundation.org> References: <20200619141710.350494719@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann [ Upstream commit 78b0d99a68ecdc84728c99f4fef71942e9ecf35a ] Some older versions of gcc badly optimize code that passes an inline function argument into another function by reference, causing huge stack usage: drivers/gpu/drm/bridge/tc358768.c: In function 'tc358768_bridge_pre_enable': drivers/gpu/drm/bridge/tc358768.c:840:1: error: the frame size of 2256 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] Use a temporary variable as a workaround and add a comment pointing to the gcc bug. Fixes: ff1ca6397b1d ("drm/bridge: Add tc358768 driver") Signed-off-by: Arnd Bergmann Reviewed-by: Tomi Valkeinen Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200428215408.4111675-1-arnd@arndb.de Signed-off-by: Sasha Levin --- drivers/gpu/drm/bridge/tc358768.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.25.1 diff --git a/drivers/gpu/drm/bridge/tc358768.c b/drivers/gpu/drm/bridge/tc358768.c index 1b39e8d37834..6650fe4cfc20 100644 --- a/drivers/gpu/drm/bridge/tc358768.c +++ b/drivers/gpu/drm/bridge/tc358768.c @@ -178,6 +178,8 @@ static int tc358768_clear_error(struct tc358768_priv *priv) static void tc358768_write(struct tc358768_priv *priv, u32 reg, u32 val) { + /* work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715 */ + int tmpval = val; size_t count = 2; if (priv->error) @@ -187,7 +189,7 @@ static void tc358768_write(struct tc358768_priv *priv, u32 reg, u32 val) if (reg < 0x100 || reg >= 0x600) count = 1; - priv->error = regmap_bulk_write(priv->regmap, reg, &val, count); + priv->error = regmap_bulk_write(priv->regmap, reg, &tmpval, count); } static void tc358768_read(struct tc358768_priv *priv, u32 reg, u32 *val)