Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1617343ybv; Fri, 21 Feb 2020 00:22:22 -0800 (PST) X-Google-Smtp-Source: APXvYqwZBhXaKarDdO9Ky0cQXjiue/2hjcP1mwdlm1Opd8hPQh6MzNC+r0hjrB1ufTDBlhbpVxuz X-Received: by 2002:aca:b4c6:: with SMTP id d189mr1043531oif.17.1582273342047; Fri, 21 Feb 2020 00:22:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582273342; cv=none; d=google.com; s=arc-20160816; b=GBQ7YNP8KBgCN4kDKFcQMm3oeuLUcqVNZ68eP/EZg8k7fZqpwtlwwzMKVHQlYeWrS9 fjI3slA+B6XmrF6x6RQn77cRZw5f9rXVD+X2ZHGqUavm/m7TLdygd1JmqS/iqmg7vm/5 vem4a3cx1/uyULO0DRlaNTRnHsItumHQjyXknd4AoGt6Dro6u89kqpy4CaPtP+W3cFTW Fuy7vcjHBvfq5awaSPabvkpwepj/MDPxZA2rOtZ8HtPLsJVi9K2vqNTn9bFn7i1Zgp/9 R8jv8Bhq19xHNezYPuJq0jPE3GHx96lxKCN8Mg7gfb/qVsmuvO6MisiPMHCiwDXIiO3w qJiw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=uk4hTK9ap9GQbxfrZAFS8/viU7XbM+FXjIMvilZZnWc=; b=eAwjv+4HkRUSERK2lbNx0u/pQZJdiAW52jN+Db/bx70krXUtjaJa5LQVYQ1ieZYfyV M3BtmzULOpUxa+hUZHfNLEEcbvCwNl66KuHGjFggYHMUGpupTRRGlw5qe1pTxGUbzgsM hERFielqW2sDijryoGPtyKjNvj8t7VVjsCCpkwkrDlEt80DdwoZqSdYTYeTN8F/nZyGc 205uvAzgDoGqdB9920PmrmuLIouWHNtX6gnVHv/VbSGXV/RkYSOSYRkcvPi5GtKB7h/E 2EgLndhl/wMnpSR90aTWPZTHLdAZX1+Y1dcFT+lmyBCSFLuyhUr0oxjeXzZCs7tRAIcN Cc0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="lOXWV/mS"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f62si470376oib.131.2020.02.21.00.22.09; Fri, 21 Feb 2020 00:22:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="lOXWV/mS"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388162AbgBUIU0 (ORCPT + 99 others); Fri, 21 Feb 2020 03:20:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:59320 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387589AbgBUIUT (ORCPT ); Fri, 21 Feb 2020 03:20:19 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 F0EBD24695; Fri, 21 Feb 2020 08:20:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582273218; bh=RqJS7QbbRmZS0WLnFBjn58eX5kSMkaGaf7vbD4wQ2l4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lOXWV/mSA3OD+iIhdRRybGDohhEwKbUuoHedvRTk3hpg+hSaCM0B1hagid1V8e3HZ d7n2IWIxbCHypz3LBwAj/L45CfubL2tawreEBcnyiS2Y2qRk3b5zZ9HwxaeoXQO40U pPSf/6mIyipDlGPVSL/4aDWVTRcqTRGbuC2hrpp4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, yu kuai , Alex Deucher , Sasha Levin Subject: [PATCH 4.19 051/191] drm/amdgpu: remove 4 set but not used variable in amdgpu_atombios_get_connector_info_from_object_table Date: Fri, 21 Feb 2020 08:40:24 +0100 Message-Id: <20200221072257.717801346@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200221072250.732482588@linuxfoundation.org> References: <20200221072250.732482588@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: yu kuai [ Upstream commit bae028e3e521e8cb8caf2cc16a455ce4c55f2332 ] Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c: In function 'amdgpu_atombios_get_connector_info_from_object_table': drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c:376:26: warning: variable 'grph_obj_num' set but not used [-Wunused-but-set-variable] drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c:376:13: warning: variable 'grph_obj_id' set but not used [-Wunused-but-set-variable] drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c:341:37: warning: variable 'con_obj_type' set but not used [-Wunused-but-set-variable] drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c:341:24: warning: variable 'con_obj_num' set but not used [-Wunused-but-set-variable] They are never used, so can be removed. Fixes: d38ceaf99ed0 ("drm/amdgpu: add core driver (v4)") Signed-off-by: yu kuai Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c index bf872f694f509..d1fbaea91f580 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c @@ -337,17 +337,9 @@ bool amdgpu_atombios_get_connector_info_from_object_table(struct amdgpu_device * path_size += le16_to_cpu(path->usSize); if (device_support & le16_to_cpu(path->usDeviceTag)) { - uint8_t con_obj_id, con_obj_num, con_obj_type; - - con_obj_id = + uint8_t con_obj_id = (le16_to_cpu(path->usConnObjectId) & OBJECT_ID_MASK) >> OBJECT_ID_SHIFT; - con_obj_num = - (le16_to_cpu(path->usConnObjectId) & ENUM_ID_MASK) - >> ENUM_ID_SHIFT; - con_obj_type = - (le16_to_cpu(path->usConnObjectId) & - OBJECT_TYPE_MASK) >> OBJECT_TYPE_SHIFT; /* Skip TV/CV support */ if ((le16_to_cpu(path->usDeviceTag) == @@ -372,14 +364,7 @@ bool amdgpu_atombios_get_connector_info_from_object_table(struct amdgpu_device * router.ddc_valid = false; router.cd_valid = false; for (j = 0; j < ((le16_to_cpu(path->usSize) - 8) / 2); j++) { - uint8_t grph_obj_id, grph_obj_num, grph_obj_type; - - grph_obj_id = - (le16_to_cpu(path->usGraphicObjIds[j]) & - OBJECT_ID_MASK) >> OBJECT_ID_SHIFT; - grph_obj_num = - (le16_to_cpu(path->usGraphicObjIds[j]) & - ENUM_ID_MASK) >> ENUM_ID_SHIFT; + uint8_t grph_obj_type= grph_obj_type = (le16_to_cpu(path->usGraphicObjIds[j]) & OBJECT_TYPE_MASK) >> OBJECT_TYPE_SHIFT; -- 2.20.1