public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Pop <sultryweather@gmail.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org, David Airlie <airlied@linux.ie>
Subject: Re: linux-next: Tree for Nov 21 (nouveau)
Date: Fri, 22 Nov 2013 13:37:48 +0200	[thread overview]
Message-ID: <20131122113748.GB20300@shodan> (raw)
In-Reply-To: <528E2BC3.4040007@infradead.org>

[-- Attachment #1: Type: text/plain, Size: 315 bytes --]

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.


[-- Attachment #2: 0001-nouveau-Fixed-the-hwmon-undeclared-build-error.patch --]
[-- Type: text/x-diff, Size: 1550 bytes --]

From: Adrian Pop <sultryweather@gmail.com>
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 <sultryweather@gmail.com>
---
 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


  reply	other threads:[~2013-11-22 11:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-21  3:04 linux-next: Tree for Nov 21 Stephen Rothwell
2013-11-21 15:50 ` linux-next: Tree for Nov 21 (nouveau) Randy Dunlap
2013-11-22 11:37   ` Adrian Pop [this message]
2013-11-22 19:22     ` Randy Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131122113748.GB20300@shodan \
    --to=sultryweather@gmail.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox