All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Zhang Rui <rui.zhang@intel.com>, casteyde.christian@free.fr
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Len Brown <len.brown@intel.com>, Matthew Garrett <mjg@redhat.com>,
	Frans Pop <elendil@planet.nl>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] thermal: make lockdep happy
Date: Wed, 31 Mar 2010 17:09:17 +0000	[thread overview]
Message-ID: <20100331170916.GA13784@bicker> (raw)

Hi Christian,

Can you test this patch?

I wrote this to address bugzilla bug:
	https://bugzilla.kernel.org/show_bug.cgi?id\x15504
	BUG: key ffff88004c3811e0 not in .data! occured in lockdep.c

We now have to call sysfs_attr_init() for dynamically allocated sysfs 
attributes or lockdep complains.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index 5066de5..d4fec47 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -725,6 +725,7 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz,
 		goto release_idr;
 
 	sprintf(dev->attr_name, "cdev%d_trip_point", dev->id);
+	sysfs_attr_init(&dev->attr.attr);
 	dev->attr.attr.name = dev->attr_name;
 	dev->attr.attr.mode = 0444;
 	dev->attr.show = thermal_cooling_device_trip_point_show;

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <error27@gmail.com>
To: Zhang Rui <rui.zhang@intel.com>, casteyde.christian@free.fr
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Len Brown <len.brown@intel.com>, Matthew Garrett <mjg@redhat.com>,
	Frans Pop <elendil@planet.nl>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] thermal: make lockdep happy
Date: Wed, 31 Mar 2010 20:09:17 +0300	[thread overview]
Message-ID: <20100331170916.GA13784@bicker> (raw)

Hi Christian,

Can you test this patch?

I wrote this to address bugzilla bug:
	https://bugzilla.kernel.org/show_bug.cgi?id=15504
	BUG: key ffff88004c3811e0 not in .data! occured in lockdep.c

We now have to call sysfs_attr_init() for dynamically allocated sysfs 
attributes or lockdep complains.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index 5066de5..d4fec47 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -725,6 +725,7 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz,
 		goto release_idr;
 
 	sprintf(dev->attr_name, "cdev%d_trip_point", dev->id);
+	sysfs_attr_init(&dev->attr.attr);
 	dev->attr.attr.name = dev->attr_name;
 	dev->attr.attr.mode = 0444;
 	dev->attr.show = thermal_cooling_device_trip_point_show;

             reply	other threads:[~2010-03-31 17:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-31 17:09 Dan Carpenter [this message]
2010-03-31 17:09 ` [patch] thermal: make lockdep happy Dan Carpenter
2010-03-31 20:17 ` Christian Casteyde
2010-03-31 20:17   ` Christian Casteyde
2010-04-01  1:44 ` Zhang Rui
2010-04-01  1:44   ` Zhang Rui

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=20100331170916.GA13784@bicker \
    --to=error27@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=casteyde.christian@free.fr \
    --cc=elendil@planet.nl \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg@redhat.com \
    --cc=rui.zhang@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.