Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2173260pxm; Thu, 24 Feb 2022 18:27:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJzBPJll/Ti6A+vV2WvFRH0a/po0HG4jccycaMXimcmd2IKf8JVsFCbNwhj17QyTWHq5poAg X-Received: by 2002:a17:906:743:b0:6d0:7f19:d737 with SMTP id z3-20020a170906074300b006d07f19d737mr4493877ejb.11.1645756056800; Thu, 24 Feb 2022 18:27:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645756056; cv=none; d=google.com; s=arc-20160816; b=qfRUXZ64F/HlPKsPVvkAqEAD3u62bAaVSc2ULE3OzEpWsmIg9P3DcJA3zwOD7mA0R8 rpG3LXdoOSaEahub+6kRQHkzU9VHB9Oi1CKxmvGfv6IMPNSiMOXQHxVsuneYjp/HEy4I aobrG36uOt9zx74v5zMrsx92zAFl7igcvyxX34oZ5z1U1f4/7n3os6Hch6fJdXrRAAU+ IiemXnZV7/IZoqA7+ZwPPCVSf0Jw/hPjBYZkwxqArq680XBLQaSt2voBOKwVRR164F/C tabLxZv6aFwk2wNJQ3bXTyuwLw2nit+Ta3bwWiXxUDA7zg0XOZTPZ0krKnxWYTfP4JN3 fr1g== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=bWKLMT4aebSJWW8C7UiCQ3/EbG02GUUsHveIfrNn2xE=; b=Q2AVGvTgZscAodPNUoZYHiNC2BcDpaAdJY86ZxFz2WRciIqJKq80mUxV3RmtqhFOQz kh4hFYMn/ZCuTdjLl858K+MOqq+K4OVq6bFT5kdIMIXa9/z/SWPwl+IQHkq0yFPBh/5w +Ospebp85V2jugj4/O6Y2Fkwvv7nUZwN3yvPmwHW9Rn/BEX2oZy7t6q+uAJwlu7qWhFa lLhlvBAob5z1GcPf65ytyBk+2/N9ObUWbfUUnz2FQyMw1/8VRGvoS5l9DbCvUwTou3Ve O5rzTs1mDDalwxRI7r17rOyXdBW0XigOMXvxNvTg8AOjbsndv6DJB0IhftOyTLT9IfK8 KtSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="hm/yI1Cy"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x22-20020a170906b09600b006cff6489671si584857ejy.960.2022.02.24.18.27.13; Thu, 24 Feb 2022 18:27:36 -0800 (PST) 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=@gmail.com header.s=20210112 header.b="hm/yI1Cy"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235674AbiBXWnu (ORCPT + 99 others); Thu, 24 Feb 2022 17:43:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235670AbiBXWnt (ORCPT ); Thu, 24 Feb 2022 17:43:49 -0500 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FEB51A8049; Thu, 24 Feb 2022 14:43:18 -0800 (PST) Received: by mail-wr1-x42c.google.com with SMTP id j22so1771572wrb.13; Thu, 24 Feb 2022 14:43:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bWKLMT4aebSJWW8C7UiCQ3/EbG02GUUsHveIfrNn2xE=; b=hm/yI1Cy2Kc8mLeeLsOCHupF1kEHeji6XjXMjWyWbiitXdcqzotkVsqhN+bU7+hwc5 t/Jct+cxOWL03KF/nmu3K5nzMPMgen47vrPBS0NpiuJd/X0wuYF5NXJZvIQIRiPt2m2w t2heHb5g/O+V72fy/UUlcjmfXgRF1p8E3GHQEcggq0h2lJaFK8l+BwBN9SYa65n/7a0w 2C53p+XtaPhGaJgtIquK/MEhhm+6m50rt73HguwdIImHYO/TW5gJo2qec+hnLWvUZBh3 2QRVv8+FfvYeIyvjXTU9Cn8tYpHjqa6RN24Eips/xUqhHgITJM9cj76iUEBh5xuAIJv1 Izig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bWKLMT4aebSJWW8C7UiCQ3/EbG02GUUsHveIfrNn2xE=; b=EIl8b4/Qiwc16ZXPK3nO4OD6MEDU8DWImbOCGMaLelOgfabBA/fqItXAegf2RPndgD /8Tx2eHYg4Idqc+pnamzx4Es27qJjZ/JF00nRV9TBZsjb6BR4Vl5z9VcU9capcBVBcmC AWP0s7bBFrfcOOvI83RQsW0rNPlJFwLQbi5G2eRaGLc+P9NC4TYiSP32AMXLJ+M6VVrJ q/Sba+qdEK4sGmTbxTDWUae+El9YcYXpEPMLjKncSI/fhA8axjFbbl96z7DbAkwkeesn ecJ+c8vFy2uwXgUBK/Io+F6J/dEgnJJEb5BYugC0QxRP1Pt9NpC8fmBuS7ChXAbofY/E dHlw== X-Gm-Message-State: AOAM531x9IYS/OHXqx8HfHENf34opeABGlihRPI33X7r8DEYwHATBVI8 IBPdQi1vtxjt9bVevIElBiM= X-Received: by 2002:a05:6000:2c4:b0:1ea:910c:151c with SMTP id o4-20020a05600002c400b001ea910c151cmr3801018wry.92.1645742597131; Thu, 24 Feb 2022 14:43:17 -0800 (PST) Received: from localhost (cpc154979-craw9-2-0-cust193.16-3.cable.virginm.net. [80.193.200.194]) by smtp.gmail.com with ESMTPSA id a17-20020a5d5091000000b001edb61b2687sm736421wrt.63.2022.02.24.14.43.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Feb 2022 14:43:16 -0800 (PST) From: Colin Ian King To: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , Xinhui.Pan@amd.com, David Airlie , Daniel Vetter , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH][next] drm/amdgpu: Fix missing assignment to variable r Date: Thu, 24 Feb 2022 22:43:16 +0000 Message-Id: <20220224224316.149704-1-colin.i.king@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 Currently the call to function amdgpu_benchmark_move should be assigning the return value to variable r as this is checked in the next statement, however, this assignment is missing. Fix this by adding in the missing assignment. Addresses clang scan warning: drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c:168:7: warning: variable 'r' is uninitialized when used here [-Wuninitialized] Fixes: 9645c9c9fb15 ("drm/amdgpu: plumb error handling though amdgpu_benchmark()") Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c index 3136a9ad2d54..bb293a5c6fd5 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c @@ -163,7 +163,7 @@ int amdgpu_benchmark(struct amdgpu_device *adev, int test_number) "benchmark test: %d (simple test, VRAM to VRAM)\n", test_number); /* simple test, VRAM to VRAM */ - amdgpu_benchmark_move(adev, 1024*1024, AMDGPU_GEM_DOMAIN_VRAM, + r = amdgpu_benchmark_move(adev, 1024*1024, AMDGPU_GEM_DOMAIN_VRAM, AMDGPU_GEM_DOMAIN_VRAM); if (r) goto done; -- 2.34.1