Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1949689ybv; Fri, 14 Feb 2020 08:44:15 -0800 (PST) X-Google-Smtp-Source: APXvYqyLTE8tPXIcoSEJhZYVeD7vNz3WmrKVnUqYN7xBGLzyEL5Ss4qZRFuPNexzUDMSsyGB9sw0 X-Received: by 2002:a05:6808:b18:: with SMTP id s24mr2410548oij.31.1581698655055; Fri, 14 Feb 2020 08:44:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581698655; cv=none; d=google.com; s=arc-20160816; b=P9G9WhbVWQcb00ZIjqoh4m+dbVsIGozt6IV+iekTMIN/FcZFv0xQdvC1pGC68fD1XV b5DAuyNHq3Q1Ys7yld69ud9AILsqxDV++pJSOaM4nIRxw1vD4sM5hsxHeBrK7dGL13De W3u8fzQVJzXVRupdlTUXzkctto6O4I+MElFpepCf5ZwDExMAYe+Z961jOF8oNeh2471i ZKoXfBQTu7cI6uhrvYgO4sNBEp7ksSXbmgyEVYdEpo2dGL9e6sgF//WcxzW8yCnj+5K4 UFUrNAXwMJlOYd4mW9Z4Vywr3Oyu2hVXCIp7g1AItCLTOUJWoJHTHWd3JlqfH1c2XgPe CkRA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0nwYv1XDfY/UyldQ6oaZxQBayrUCUHXAqFzqOXdkjSY=; b=R4zKYeqyU3pQRBAYreGboql4PxiLS3DbGi8sbO02d9jW8oXB5VcBVpDJzV5ksLSJ9k 9EC6g4anh+uH5kDXssVAZfHg1XUQP4s8k8vve155cuRs6lWwhj/OQbcBp38Xrd9Trzge f6VQuLkmugQAjuZ/E/Bh6YchMibP1sVvuD2iyY3/d5r0JgctYbTFl6Mic/q3xCGPwblY sDzzG9WP6be1fjFOSC42DtApQ+PBl3APQcakOr5jZpbJx+5h7kGiY3eJEuQ+cMY5r4Y4 tdPjlUS/mY1dthKsvpSCwrrvPOYIdm+mnOjOS/5g/xrCbUJtWH1Ksb47o5sm+nfbiCLm Cq2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XAS52lBH; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j74si3642375otj.246.2020.02.14.08.44.03; Fri, 14 Feb 2020 08:44:15 -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=XAS52lBH; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394052AbgBNQn0 (ORCPT + 99 others); Fri, 14 Feb 2020 11:43:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:57050 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405120AbgBNQWE (ORCPT ); Fri, 14 Feb 2020 11:22:04 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9DEDB246B7; Fri, 14 Feb 2020 16:22:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581697323; bh=Xosha2si2gA+YtJP6cPHMRHvPd5rRJ+tgfnyNFwyd8I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XAS52lBHjgXmfgpAemPHvrcZ0wosZEZ1kz15sDCsVgIy7k2/N5qPgpaotrkVFtl7a d4WQ+9blWlnj+fycJb7iAzaGHrLHoJz35Eu0+gW8hzc39VZB09EzXtxPeClJiOpCFQ wKz/b9cLBaE4gg5USE3svXAp6vhwRuuOjZC2sUnU= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: yu kuai , Alex Deucher , Sasha Levin , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 4.9 032/141] drm/amdgpu: remove 4 set but not used variable in amdgpu_atombios_get_connector_info_from_object_table Date: Fri, 14 Feb 2020 11:19:32 -0500 Message-Id: <20200214162122.19794-32-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200214162122.19794-1-sashal@kernel.org> References: <20200214162122.19794-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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 26afdffab5a06..ac8885562919d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c @@ -336,17 +336,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) == @@ -371,14 +363,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