From patchwork Fri Jan 24 09:31:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 233297 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD5C9C35242 for ; Fri, 24 Jan 2020 09:40:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 871B5208C4 for ; Fri, 24 Jan 2020 09:40:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579858827; bh=nxf7MS6nUvRpKLClMp1RVbiVjakdhnmn7khBMRqNzVc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Z1zfnvh6EF3Sn76wUkte5NWoy+q6eiX721QShwJPCPOnWqkAXZvlqA9JvcfbNZDKe PBy4mWo+J7st68uFoZgrUkB14U126dMEpVtH5SirGWzDVG55aH7797cYF7ZPe4Ys34 bLmniDwL5b3m4nGoBv3yBv/oPD6ZHgtHjBDZy3+A= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730225AbgAXJkT (ORCPT ); Fri, 24 Jan 2020 04:40:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:37646 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731041AbgAXJkR (ORCPT ); Fri, 24 Jan 2020 04:40:17 -0500 Received: from localhost (unknown [145.15.244.15]) (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 7016E2070A; Fri, 24 Jan 2020 09:40:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579858817; bh=nxf7MS6nUvRpKLClMp1RVbiVjakdhnmn7khBMRqNzVc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mnxMEzZsOM2wMn2jaivvqUKdgVIj1e5apQ0zZIC3j2bDJkcFkLlGi/DI3vUig7j2a 79LLuPUQPUlLlX0Sfo9ABzWatTM/6+gv2V20fGEvQOZiEF1gcy2XE0BxWCRXd9sRx1 ujsD1JHigxzYKngmq+rhpjWZdaG+GxnsBF8hmRYk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Alex Deucher , Sasha Levin Subject: [PATCH 5.4 064/102] drm/amdgpu/vi: silence an uninitialized variable warning Date: Fri, 24 Jan 2020 10:31:05 +0100 Message-Id: <20200124092816.044964945@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200124092806.004582306@linuxfoundation.org> References: <20200124092806.004582306@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: Dan Carpenter [ Upstream commit 4ff17a1df7d550257972a838220a8af4611c8f2c ] Smatch complains that we need to initialized "*cap" otherwise it can lead to an uninitialized variable bug in the caller. This seems like a reasonable warning and it doesn't hurt to silence it at least. drivers/gpu/drm/amd/amdgpu/vi.c:767 vi_asic_reset_method() error: uninitialized symbol 'baco_reset'. Fixes: 425db2553e43 ("drm/amdgpu: expose BACO interfaces to upper level from PP") Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c index fa8ad7db2b3a1..d306cc7119976 100644 --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c @@ -1421,6 +1421,7 @@ static int pp_get_asic_baco_capability(void *handle, bool *cap) { struct pp_hwmgr *hwmgr = handle; + *cap = false; if (!hwmgr) return -EINVAL;