Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp112584ybg; Mon, 8 Jun 2020 17:58:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7Gwdm7LgT5ewXscBvTHCVbFabnscSiGzMXBf0TnG9w042El+JseBRR8nH6x1uy9sC2J7A X-Received: by 2002:a17:906:560b:: with SMTP id f11mr24032018ejq.11.1591664285143; Mon, 08 Jun 2020 17:58:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591664285; cv=none; d=google.com; s=arc-20160816; b=izkbr1BVawVF9Y6OI0+me7Jbcxc1l3LUO7f55uk3eSFXB2N7PQYT+tyau8rfAh6kBU YVZfWOCB8FgKcJ/Uny8D6RaP9Ubywgj46UnErlD4opyF4CtkJoYObdRc7xzYAf2753Rq 8ZNR1ZfflZJH/GP0DJtwYE+hgh8uUGuceWSDJyQllEBdVlCS1c1c8KrQqxMeXT8Yw9zb ZyQI7LlmzpyGg2N70PesJXiPxenEFA2ENgWYU9TkIs6IrErOQSzMk5pQ8Yk54zgFEeQ/ MbJjAMNPTYNX1e+0cZte1vSD8ZoQGGQTwNG4hrqtPiOwBM2MSun2StTQfYBT0liMo1Me 8dCQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CE9maytuS54R1dSkfZvBzGIOkPnZ169CnRLYrV9vclM=; b=A85/q920Xs0s2mhjcKJQIJ+x2wc93rVmuHaf2tIq43JidwWmRBckPV1fuUKuxo0nKZ LJdn4IAwGRyMS/Cg/bCXbqHBHEpo9hwTTp6PAlztacodVFfyzUgu0NtmED8TLSvz6H1e Bu80RlVb1A6t5oOLJDh5712gROlXOdipJ21qveZO29HTndGmXQH209TWV0SRrpwZICH4 qf/BNvD4wRy1KytjTfmGPOZpeNCBVESOSZdLfr8Fiix45HEPKKeXYqjpMb4+StdsrDky fmVQ8x/I2v//dYCYxJufmJjObmXGB8HyJYBARy7MK8n1rbsV8pcLfODOX50FqsV7RoSq gz+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tgfPkNMg; 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 oe24si9340705ejb.598.2020.06.08.17.57.42; Mon, 08 Jun 2020 17:58:05 -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=default header.b=tgfPkNMg; 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 S1728376AbgFIAz5 (ORCPT + 99 others); Mon, 8 Jun 2020 20:55:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:54878 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728367AbgFHXJM (ORCPT ); Mon, 8 Jun 2020 19:09:12 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0B33A20CC7; Mon, 8 Jun 2020 23:09:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591657751; bh=9Xe4Sx5w74/rmD8c1252EWSqEacJPDGX8bb4wGGi3ZQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tgfPkNMgvrVt1p6LND8sY3HJRuPjGcW/yXFyZTH4/owneW9v7dY0vz4os1ND9TMbX mwN21jKI9Bn93SzlNe0vH5z6m64pf0Ln9JCFxRm+RqDR8QIvJ5rgmPtUPOrRS34Xdg OMyfPXDTMgoKp672lSHzWtDrxTUmmd9BC43BN9Bw= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Arnd Bergmann , Tomi Valkeinen , Sam Ravnborg , Sasha Levin , dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.7 138/274] drm/bridge: fix stack usage warning on old gcc Date: Mon, 8 Jun 2020 19:03:51 -0400 Message-Id: <20200608230607.3361041-138-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200608230607.3361041-1-sashal@kernel.org> References: <20200608230607.3361041-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-) 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) -- 2.25.1