From patchwork Fri Nov 22 11:37:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Pop X-Patchwork-Id: 3224871 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 28B0EC045B for ; Sat, 23 Nov 2013 05:51:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 38A4220789 for ; Sat, 23 Nov 2013 05:50:59 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 74BA320774 for ; Sat, 23 Nov 2013 05:50:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 14A74FAE14; Fri, 22 Nov 2013 21:50:49 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ea0-f169.google.com (mail-ea0-f169.google.com [209.85.215.169]) by gabe.freedesktop.org (Postfix) with ESMTP id 12238FADC2 for ; Fri, 22 Nov 2013 03:35:53 -0800 (PST) Received: by mail-ea0-f169.google.com with SMTP id l9so449395eaj.14 for ; Fri, 22 Nov 2013 03:35:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=l5k4Ezx7ytTaS2sO+6vj6CghWszm6DKPOIjTVv/bpHI=; b=TuFOz5OzZz6aFN0MB4waEEvxr1uuG+7T3hZ89ZXMKiH5TCsa+aUpyv8qavOgxLlkYw aZ7QZkVhNW+yYr8K6Pj/+jvDL/rdjX1BouXxDoema77e4+xlbjNiebGZWeyrIp3Sxma/ c6zsOw5fh/Xs6Arl6MN0u/zY7y5p3NKjM1DAR5d/xZqgt0fUUJJcI2BnBEn9A0BgHKgc itRfqTFsLTxXBCioufqAVdJprzUXsJyesOdK6Mbn2lGF3uB+Mp7qDJVihWy3agYk5gJ4 VSmiYY+bOlw5VQrW5oUpWlVhyvWRwYe9wf4rxXi3WHX0Jnm5lzScCGJncHAkhrEsOdVR Qb2Q== X-Received: by 10.15.76.6 with SMTP id m6mr3929869eey.37.1385120152495; Fri, 22 Nov 2013 03:35:52 -0800 (PST) Received: from shodan ([109.99.94.186]) by mx.google.com with ESMTPSA id b42sm77468932eem.9.2013.11.22.03.35.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Nov 2013 03:35:51 -0800 (PST) Date: Fri, 22 Nov 2013 13:37:48 +0200 From: Adrian Pop To: Randy Dunlap Subject: Re: linux-next: Tree for Nov 21 (nouveau) Message-ID: <20131122113748.GB20300@shodan> References: <20131121140411.092318822bbd82b7b47e0d53@canb.auug.org.au> <528E2BC3.4040007@infradead.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <528E2BC3.4040007@infradead.org> User-Agent: Mutt/1.5.22 (2013-10-16) X-Mailman-Approved-At: Fri, 22 Nov 2013 21:50:34 -0800 Cc: Stephen Rothwell , linux-next@vger.kernel.org, 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@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hello! > on x86_64: > > CONFIG_HWMON is not enabled. > > drivers/gpu/drm/nouveau/nouveau_hwmon.c: In function 'nouveau_hwmon_init': > drivers/gpu/drm/nouveau/nouveau_hwmon.c:633:2: error: 'hwmon' undeclared (first use in this function) I've attached a patch that fixes the build for me when using this config. Acked-by: Randy Dunlap From: Adrian Pop Date: Fri, 22 Nov 2013 12:52:19 +0200 Subject: [PATCH] nouveau: Fixed the 'hwmon' undeclared build error hwmon is declared inside the #if defined(CONFIG_HWMON)... but is still referenced outside of it, which results in a build error. By removing the reference, Linux builds successfully with both code paths. Two warnings from running checkpatch.pl have been fixed too. Signed-off-by: Adrian Pop --- drivers/gpu/drm/nouveau/nouveau_hwmon.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/nouveau/nouveau_hwmon.c index 38a4db5..21fc8d6 100644 --- a/drivers/gpu/drm/nouveau/nouveau_hwmon.c +++ b/drivers/gpu/drm/nouveau/nouveau_hwmon.c @@ -357,7 +357,7 @@ nouveau_hwmon_show_fan1_input(struct device *d, struct device_attribute *attr, static SENSOR_DEVICE_ATTR(fan1_input, S_IRUGO, nouveau_hwmon_show_fan1_input, NULL, 0); - static ssize_t +static ssize_t nouveau_hwmon_get_pwm1_enable(struct device *d, struct device_attribute *a, char *buf) { @@ -383,7 +383,7 @@ nouveau_hwmon_set_pwm1_enable(struct device *d, struct device_attribute *a, long value; int ret; - if (strict_strtol(buf, 10, &value) == -EINVAL) + if (kstrtol(buf, 10, &value) == -EINVAL) return -EINVAL; ret = therm->attr_set(therm, NOUVEAU_THERM_ATTR_FAN_MODE, value); @@ -630,7 +630,6 @@ error: hwmon->hwmon = NULL; return ret; #else - hwmon->hwmon = NULL; return 0; #endif } -- 1.8.4.2