Message ID | 20201116174112.1833368-31-lee.jones@linaro.org |
---|---|
State | Accepted |
Commit | 09234b88ef5598252d1cee37e4d7b26a48b6557f |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp3506649ils; Mon, 16 Nov 2020 09:42:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJxLcrJm4zHdyraFt+7oitmRExQ0ehx7KUFjoIOrpLTeSSrB+GBcb2ynqcCGFjI4VhXHdM5d X-Received: by 2002:a62:6587:0:b029:18b:eb1b:a1a7 with SMTP id z129-20020a6265870000b029018beb1ba1a7mr14992091pfb.18.1605548536730; Mon, 16 Nov 2020 09:42:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605548536; cv=none; d=google.com; s=arc-20160816; b=ir0y564VICMMrxgc2oBe2AKd6808JJeRrnagE1qE7VH1j25ID0T4mQVSzPtVrZcyIK T5d2/GAkryRQMFiPRr4CRbWUUop5ON4ui07gwo4/zDNh3KUwHeHD2zXds7XYTFx9cyhp vauJzbWEdz9T2AEbpbLIuWluUUZ8JNjBm1zexo0bDrORqWAWP8NFPwiuza0LRowqOhWs wytQF/2kq9I0/lWHSjJzVshRaWtbkgG25oduuu+pxeBuJuJINZ+7YEf95CiYJQZDVvP8 w2/A2GOjgFyJTmFfYejoay1Dv/0mbosYA42LCEiExXG73kbC8g1LChXnMx0I32DPDDoh RntQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to; bh=l8R3mkubPvmSxWxRwQANtIkqmwHpFyJvBMuc1nj9aZA=; b=dlpVZmwcIQVgCC9mfLb/DC56gNGJrKzymqD1WlNA+9eM8nxGfoh+EjQDW9AgP3LmY8 2R3yEdQprV0B0R6/iq79hB5jEUYuRHrgF+k/W8NBc0FYcNkMyue7d2cu/SmxEar+RNVn PxB8mEkq4ss0buacP1xH/lTWpy1sovk4Og1QqH4rb8F5iFU2pjEtydTZStzRiaVfe8p9 P19HiEmbv0YjvlqfXYqqp2hhmWRwm4VRmWKfgfItpzNc+SyTJZghPd7coYLoxmQDaAf6 FQX+bmc7959lt1TQRqxCn2et8WldI29aZjmQcqJ7940ENioliGT69E3a+/gl6QGSzhHT MEYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=qQWadntt; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <dri-devel-bounces@lists.freedesktop.org> Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id q5si1175755pls.433.2020.11.16.09.42.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2020 09:42:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=qQWadntt; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 179856EA0B; Mon, 16 Nov 2020 17:42:06 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id 282436EA0E for <dri-devel@lists.freedesktop.org>; Mon, 16 Nov 2020 17:42:04 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id o15so19661008wru.6 for <dri-devel@lists.freedesktop.org>; Mon, 16 Nov 2020 09:42:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SmOPpMPfhIiNWLmfD425Vh4v6mCQcNCmoMGuMYmd5/A=; b=qQWadntt/mFLB2dHX6lrFTrO+5jYltfzBzIRsvL1z5Z6vtAiX/okLVJtYTfU6M+6ZS XzZpueyoOCEm+ppetpCQb/hIf7iXx7l2KUxEI7bn55gdSyyYDPd9gZdfOyOvNWfft1SM w+iuynB+rS795d3bkOrNtC1Xrylj2zsp80gJYvH7zZSfL6Hahtp7qBLDtGOGBcpQcEFP DJViqYgYnecWKSHdDGPxR8ed0QSh4us9Z22xp+J6fICeTcd+6MkNOp86MqffqD6smjYX 23yKflHz+b2Wn4pZ9o8v5+IFG9YZ/IJ13tKgb+qBOEJgoE4oB3VoDH9y+d0FXXQ2jRgs kSzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SmOPpMPfhIiNWLmfD425Vh4v6mCQcNCmoMGuMYmd5/A=; b=FRbgo7jH1ZQNDhBLHBABc1l51Oq+TZXY9D4TpP/qiRmBL05zBCtgB5lIgROx6h+CE5 NfyFZ9NxlSv1iHsP9jT5Lhw+yj5IMbRuv0mpl/rtknbNFFPKB04dCDidqRXYoQRdkMww XYP665E9rJ8c8VFkcewuzMuMRvGZWfYrBjGXK9l7IUStlSMxxyQvHnl36AwWp48L8wn8 CkZfn2sQNl4Q+9w4Xqd7U2ApFpIFt1qYn25UBZ0bdsuQW/RLcxvQm9G/EB8IV+8OZV3w wvJNSGfQdktO0VyX3BOsGfLeuvU8I5R0U3jVBAKQ+vym626EkeMFUp8RVmS6y8i/875G fcrA== X-Gm-Message-State: AOAM533sn4JeSreSQrqxrW0AC5cZ/E4m4j6jGq7DThf8vi7rFkMg3+qt 0XFJf/hnm/8BPLYNDzB/tZyzEcuPt42LLkcp X-Received: by 2002:a5d:510a:: with SMTP id s10mr20125292wrt.402.1605548522848; Mon, 16 Nov 2020 09:42:02 -0800 (PST) Received: from dell.default ([91.110.221.159]) by smtp.gmail.com with ESMTPSA id n10sm24667224wrx.9.2020.11.16.09.42.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2020 09:42:02 -0800 (PST) From: Lee Jones <lee.jones@linaro.org> To: lee.jones@linaro.org Subject: [PATCH 30/42] drm/selftests/test-drm_dp_mst_helper: Move 'sideband_msg_req_encode_decode' onto the heap Date: Mon, 16 Nov 2020 17:41:00 +0000 Message-Id: <20201116174112.1833368-31-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201116174112.1833368-1-lee.jones@linaro.org> References: <20201116174112.1833368-1-lee.jones@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Cc: David Airlie <airlied@linux.ie>, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> |
Series |
Rid W=1 warnings from GPU (non-Radeon)
|
expand
|
diff --git a/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c b/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c index e00bdc557f880..6b4759ed6bfd4 100644 --- a/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c +++ b/drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c @@ -122,7 +122,7 @@ sideband_msg_req_encode_decode(struct drm_dp_sideband_msg_req_body *in) { struct drm_dp_sideband_msg_req_body *out; struct drm_printer p = drm_err_printer(PREFIX_STR); - struct drm_dp_sideband_msg_tx txmsg; + struct drm_dp_sideband_msg_tx *txmsg; int i, ret; bool result = true; @@ -130,8 +130,12 @@ sideband_msg_req_encode_decode(struct drm_dp_sideband_msg_req_body *in) if (!out) return false; - drm_dp_encode_sideband_req(in, &txmsg); - ret = drm_dp_decode_sideband_req(&txmsg, out); + txmsg = kzalloc(sizeof(*txmsg), GFP_KERNEL); + if (!txmsg) + return false; + + drm_dp_encode_sideband_req(in, txmsg); + ret = drm_dp_decode_sideband_req(txmsg, out); if (ret < 0) { drm_printf(&p, "Failed to decode sideband request: %d\n", ret); @@ -166,6 +170,7 @@ sideband_msg_req_encode_decode(struct drm_dp_sideband_msg_req_body *in) out: kfree(out); + kfree(txmsg); return result; }
There is too much data being stored on the stack. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c: In function ‘sideband_msg_req_encode_decode’: drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c:168:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=] Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/gpu/drm/selftests/test-drm_dp_mst_helper.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)