From patchwork Fri Oct 5 15:59:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 1558791 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 811E5DFFEE for ; Sat, 6 Oct 2012 16:55:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4F3079EEEF for ; Sat, 6 Oct 2012 09:55:54 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.active-venture.com (mail.active-venture.com [67.228.131.205]) by gabe.freedesktop.org (Postfix) with ESMTP id 93B849E86C for ; Fri, 5 Oct 2012 08:58:50 -0700 (PDT) Received: (qmail 36618 invoked by uid 399); 5 Oct 2012 15:58:48 -0000 X-Virus-Scan: Scanned by ClamAV 0.97.2 (no viruses); Fri, 05 Oct 2012 10:58:48 -0500 Received: from unknown (HELO localhost) (guenter@roeck-us.net@108.223.40.66) by mail.active-venture.com with ESMTPAM; 5 Oct 2012 15:58:48 -0000 X-Originating-IP: 108.223.40.66 X-Sender: guenter@roeck-us.net From: Guenter Roeck To: David Airlie , Ben Skeggs Subject: [PATCH] drm: nouveau: Fix build warning seen is HWMON is undefined Date: Fri, 5 Oct 2012 08:59:07 -0700 Message-Id: <1349452747-4334-1-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 1.7.9.7 MIME-Version: 1.0 X-Mailman-Approved-At: Sat, 06 Oct 2012 09:55:42 -0700 Cc: Guenter Roeck , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Fix: nouveau_pm.c: In function ‘nouveau_hwmon_init’: nouveau_pm.c:703:24: warning: unused variable ‘therm’ [-Wunused-variable] Signed-off-by: Guenter Roeck --- This was seen in the latest upstream kernel. drivers/gpu/drm/nouveau/nouveau_pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c b/drivers/gpu/drm/nouveau/nouveau_pm.c index 0bf64c9..90dc63e 100644 --- a/drivers/gpu/drm/nouveau/nouveau_pm.c +++ b/drivers/gpu/drm/nouveau/nouveau_pm.c @@ -699,10 +699,10 @@ static int nouveau_hwmon_init(struct drm_device *dev) { struct nouveau_pm *pm = nouveau_pm(dev); - struct nouveau_drm *drm = nouveau_drm(dev); - struct nouveau_therm *therm = nouveau_therm(drm->device); #if defined(CONFIG_HWMON) || (defined(MODULE) && defined(CONFIG_HWMON_MODULE)) + struct nouveau_drm *drm = nouveau_drm(dev); + struct nouveau_therm *therm = nouveau_therm(drm->device); struct device *hwmon_dev; int ret = 0;