From patchwork Wed Oct 2 05:17:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Austin Kim X-Patchwork-Id: 11170529 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4A31916B1 for ; Wed, 2 Oct 2019 07:19:40 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 32C0F22469 for ; Wed, 2 Oct 2019 07:19:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 32C0F22469 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7CCA06E902; Wed, 2 Oct 2019 07:18:53 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by gabe.freedesktop.org (Postfix) with ESMTPS id C5ABA6E5CA; Wed, 2 Oct 2019 05:18:05 +0000 (UTC) Received: by mail-pg1-x543.google.com with SMTP id e1so5717999pgj.6; Tue, 01 Oct 2019 22:18:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:user-agent; bh=swe25t+lxOEruvSVv2ts6lHoxHEk7rNBAWMV8cWmjOc=; b=dM7i4PCPN+4QYPYn6cTmIm9+GPPo7pqKMQDwsTLrA70w8kRmntxEYt+vV39icF6u2j 6AbxGWhSouvbbk8gWze6ltUYe8KTMTpaVl2N///iV8WNwlrNGyfPBKuVbjpYiN+tGViO y4gUyAoAM9/C5fK5a3xOUZEvBotGck7rTv/DFGxagKBtTvySrx9skm+KD5Cc0SZrqvga lCcb1Qgyuzss5XOe0z1Ub+wLw6yTV0euo571tB9zMOIOxfYUcj8ZxgkPfYiq0t8UEWep OtNtfvUA5fLnrKz7LbgQyPZdjUwmnZmv89YxdPualzCNyBuEe0SHK80SwvApVTSo43Qr edrg== X-Gm-Message-State: APjAAAVlHzNtDLgi9SNSUiuI/DSkztrNUav+//PIbq2x9uU6U7rHnJ68 lbNDES+0VHDpkCElHA0ya8c= X-Google-Smtp-Source: APXvYqwpKJcblMq0mpI/hveU2vbjEWJo6IKKvou0p5GSYWDur1xu05LUEKTdioxnw+g3ePGUQ4C4aA== X-Received: by 2002:aa7:81cb:: with SMTP id c11mr2438922pfn.251.1569993485244; Tue, 01 Oct 2019 22:18:05 -0700 (PDT) Received: from LGEARND20B15 ([27.122.242.75]) by smtp.gmail.com with ESMTPSA id z13sm18228362pfg.172.2019.10.01.22.18.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Oct 2019 22:18:04 -0700 (PDT) Date: Wed, 2 Oct 2019 14:17:59 +0900 From: Austin Kim To: alexander.deucher@amd.com, evan.quan@amd.com, christian.koenig@amd.com, David1.Zhou@amd.com, airlied@linux.ie, daniel@ffwll.ch Subject: [PATCH] drm/amdgpu: Drop unused variable and statement Message-ID: <20191002051759.GA161133@LGEARND20B15> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Mailman-Approved-At: Wed, 02 Oct 2019 07:18:31 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:user-agent; bh=swe25t+lxOEruvSVv2ts6lHoxHEk7rNBAWMV8cWmjOc=; b=HBqzpDZYcZjgpRunc6y7IF170eXNXKl5Ah2zEIFOrmB+v84x5h9heqxCGMrLY14bPA p9LLfOakNoGxZKVJdj/F+/ZAtyw/IwcdRW5HT8dslzClmxCXnuDQhXjEILUiw9Z6x+ea ucuoSHQ/xGLko3fbtGk9BWC6e103EHwk14EPFI+57U8jFYqa/8D8INeK6FW39VAm0D9G D3osVnpOVbveO4DQmS7dpi4oo1v3PtYls+unfAKKYwqP+yj2P7v9QXpThYoTVhi/WFdW na2seGZoK0FH0+i5rPn4EKewzrUgJ9e9b31mau6rSixIaPFVzAkMB2MiUQtsS/gqB6PO /kvQ== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: austindh.kim@gmail.com, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Even though 'smu8_smu' is declared, it is not used after below statement. smu8_smu = hwmgr->smu_backend; So 'unused variable' could be safely removed to stop warning message as below: drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/smu8_smumgr.c:180:22: warning: variable ‘smu8_smu’ set but not used [-Wunused-but-set-variable] struct smu8_smumgr *smu8_smu; ^ Signed-off-by: Austin Kim --- drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c index 4728aa2..7dca04a 100644 --- a/drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c +++ b/drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c @@ -177,12 +177,10 @@ static int smu8_load_mec_firmware(struct pp_hwmgr *hwmgr) uint32_t tmp; int ret = 0; struct cgs_firmware_info info = {0}; - struct smu8_smumgr *smu8_smu; if (hwmgr == NULL || hwmgr->device == NULL) return -EINVAL; - smu8_smu = hwmgr->smu_backend; ret = cgs_get_firmware_info(hwmgr->device, CGS_UCODE_ID_CP_MEC, &info);