From patchwork Fri Mar 17 08:16:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 665880 Delivered-To: patches@linaro.org Received: by 2002:a5d:5602:0:0:0:0:0 with SMTP id l2csp2013832wrv; Tue, 21 Mar 2023 23:22:56 -0700 (PDT) X-Google-Smtp-Source: AK7set/b0TPXEjMeETQk7zZPIaiEfoQAQ5+Le+AmJnR1IvHnDTnwuo6g/bj7FQFSNI6HgHjlTRr5 X-Received: by 2002:a05:622a:594:b0:3bf:cf9d:ccbd with SMTP id c20-20020a05622a059400b003bfcf9dccbdmr4591293qtb.2.1679466176164; Tue, 21 Mar 2023 23:22:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679466176; cv=none; d=google.com; s=arc-20160816; b=D6nmYh4C+zudhPyaWuwhhLfIQUUQ3xnGjg3nfPk6O+Fx+0yAr31+U2FSJsWnjH3Qpj Utz89US8oX33DFhoy55TNAwAg8WMDoL8p5qZrYneqizgSZD3YY0WeIYcsMM8/iT8BqhI fFffIk53g2+Mkuo15ah7hvTKO1czMlG+58XoTBnMRhMrjdTq6gP42NSCKLSioe1Uv5pb AULZcnNcmxgatKCJkFQdy1QYRqGzn7RLl1iHwLT/TqdDLyOPSM3Jr80y2OLCXphJDGEO LNM/s/BPrNVamUb1lIxeo0SeR6iyuNpzuo+NzwZJ3QjwqlUKZP16fBtw7GSAQIfqZOd+ D6NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:list-unsubscribe:list-subscribe:list-post :list-owner:list-help:list-archive:archived-at:list-id:subject :precedence:cc:message-id-hash:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=iFQTsjxb7lftpcYdSojKole+q8Ktkbl0u9biDVxRV/I=; b=kdKQxyZjeG9yFK6/IZC6DEFA9GG73jbtxzOZYPPOdCQpuyTjNglLtJ0A4l5LZeasIL hGcDiEgF2NuyKrtwpQTLfosKW3ZqXvrMEfg1FOrkCG4aR4SyjDLWg8nwVYIozX/YO2Wc I/dBTbFhmySDZR871yWHilsuUPFq+QhLDztyaLy0Y6groIgNs+twYL1mWMgY6s3yjER/ b3ePFXhkefjh/NQechK+64Dq3oaealFX0+hCz53Sq+thQxxYwkKPDcDK6893DjevkCNV hcITpbKM6Y5tTK4ezZ7EbCmKFXA2CykviMWUHxg2YKuafAq/aZyQ2PC0sjIMtaADpi6X SIHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=V8QPGrUr; spf=pass (google.com: domain of linaro-mm-sig-bounces+patches=linaro.org@lists.linaro.org designates 3.208.193.21 as permitted sender) smtp.mailfrom="linaro-mm-sig-bounces+patches=linaro.org@lists.linaro.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lists.linaro.org (lists.linaro.org. [3.208.193.21]) by mx.google.com with ESMTPS id p6-20020a05622a13c600b003bbd8bdb931si1789556qtk.789.2023.03.21.23.22.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Mar 2023 23:22:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linaro-mm-sig-bounces+patches=linaro.org@lists.linaro.org designates 3.208.193.21 as permitted sender) client-ip=3.208.193.21; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=V8QPGrUr; spf=pass (google.com: domain of linaro-mm-sig-bounces+patches=linaro.org@lists.linaro.org designates 3.208.193.21 as permitted sender) smtp.mailfrom="linaro-mm-sig-bounces+patches=linaro.org@lists.linaro.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from lists.linaro.org (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id CDD54447A0 for ; Wed, 22 Mar 2023 06:22:55 +0000 (UTC) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lists.linaro.org (Postfix) with ESMTPS id 16D7B3E8AA for ; Fri, 17 Mar 2023 08:23:02 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=pass header.d=kernel.org header.s=k20201202 header.b=V8QPGrUr; spf=pass (lists.linaro.org: domain of lee@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=lee@kernel.org; dmarc=pass (policy=none) header.from=kernel.org 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 3CBE1B824FB; Fri, 17 Mar 2023 08:23:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 63E07C4339C; Fri, 17 Mar 2023 08:22:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679041380; bh=nglgtsvCUff3hoxAz81mxZbGLyBNAyLesQortl5pRh8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V8QPGrUr1rKK/pkPnxyrGQHlhqrAhQAz9B8YoyGAyPlwfZjOEa/wZTrJiOl3B1f1V dRxVSsRurlfTpiX7NHysvBEo50rrhwV7ryieiJGGqt3l0mxDh3dkKl91U+uhHHlmDL 0tz+cX1m9mSmXzZmkZQkmFPlZkFgsko4Mi+8B8w1UKwQWvuLXGAbXEeX6FQLNqL48l 0FokY7w66TNZ/OEGX8XGJbVq9+UaUP9LnL/f1pCIthEt1N3HMwuu4l5CKiqHj3OZnk 4GXEw1Z+hA0hi4+teyF1NiENjb6p+qso5uJhJG3VUvfklp9SUzJNG0Tt0fjPFtUDc8 wi2RowAwAVwrw== From: Lee Jones To: lee@kernel.org, dri-devel@lists.freedesktop.org Date: Fri, 17 Mar 2023 08:16:58 +0000 Message-Id: <20230317081718.2650744-18-lee@kernel.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230317081718.2650744-1-lee@kernel.org> References: <20230317081718.2650744-1-lee@kernel.org> MIME-Version: 1.0 X-Rspamd-Action: no action X-Rspamd-Server: lists.linaro.org X-Rspamd-Queue-Id: 16D7B3E8AA X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.00 / 15.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; DMARC_POLICY_ALLOW(-0.50)[kernel.org,none]; R_DKIM_ALLOW(-0.20)[kernel.org:s=k20201202]; R_SPF_ALLOW(-0.20)[+a:ams.source.kernel.org:c]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM(-0.00)[-0.999]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_TWELVE(0.00)[14]; ASN(0.00)[asn:54825, ipnet:145.40.68.0/24, country:US]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FREEMAIL_CC(0.00)[vger.kernel.org,amd.com,gmail.com,ffwll.ch,linaro.org,lists.freedesktop.org,lists.linaro.org]; URIBL_BLOCKED(0.00)[linaro.org:email,amd.com:email,ams.source.kernel.org:rdns,ams.source.kernel.org:helo,lists.freedesktop.org:email,ffwll.ch:email]; RCVD_VIA_SMTP_AUTH(0.00)[]; DKIM_TRACE(0.00)[kernel.org:+]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[] X-MailFrom: lee@kernel.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation Message-ID-Hash: TBUJLF7K57KN4J5DIG6A6V7S7H7BACMU X-Message-ID-Hash: TBUJLF7K57KN4J5DIG6A6V7S7H7BACMU X-Mailman-Approved-At: Wed, 22 Mar 2023 06:21:08 +0000 CC: linux-kernel@vger.kernel.org, Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , Daniel Vetter , Sumit Semwal , Jack Xiao , Hawking Zhang , amd-gfx@lists.freedesktop.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org X-Mailman-Version: 3.3.5 Precedence: list Subject: [Linaro-mm-sig] [PATCH 17/37] drm/amd/amdgpu/amdgpu_mes: Ensure amdgpu_bo_create_kernel()'s return value is checked List-Id: "Unified memory management interest group." Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c: In function ‘amdgpu_mes_ctx_alloc_meta_data’: drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c:1099:13: warning: variable ‘r’ set but not used [-Wunused-but-set-variable] Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: Jack Xiao Cc: Hawking Zhang Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c index 82e27bd4f0383..30cd72ca1eefd 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c @@ -1104,6 +1104,11 @@ int amdgpu_mes_ctx_alloc_meta_data(struct amdgpu_device *adev, &ctx_data->meta_data_obj, &ctx_data->meta_data_mc_addr, &ctx_data->meta_data_ptr); + if (r) { + dev_warn(adev->dev, "(%d) create CTX bo failed\n", r); + return r; + } + if (!ctx_data->meta_data_obj) return -ENOMEM;