From: Greg Kroah-Hartman <gregkh@suse.de>
To: linux-kernel@vger.kernel.org
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 62/62] sysfs: fix for thinko with sysfs_bin_attr_init()
Date: Tue, 2 Mar 2010 15:29:01 -0800 [thread overview]
Message-ID: <1267572541-410-62-git-send-email-gregkh@suse.de> (raw)
In-Reply-To: <20100302230933.GA32287@kroah.com>
From: Stephen Rothwell <sfr@canb.auug.org.au>
After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:
drivers/pci/pci-sysfs.c: In function 'pci_create_legacy_files':
drivers/pci/pci-sysfs.c:645: error: lvalue required as unary '&' operand
drivers/pci/pci-sysfs.c:658: error: lvalue required as unary '&' operand
Caused by commit "sysfs: Use sysfs_attr_init and sysfs_bin_attr_init on
dynamic attributes" interacting with commit "sysfs: Use one lockdep
class per sysfs attribute") both from the driver-core tree.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/pci/pci-sysfs.c | 4 ++--
include/linux/sysfs.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index 9fa183c..de29645 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -642,7 +642,7 @@ void pci_create_legacy_files(struct pci_bus *b)
if (!b->legacy_io)
goto kzalloc_err;
- sysfs_bin_attr_init(&b->legacy_io);
+ sysfs_bin_attr_init(b->legacy_io);
b->legacy_io->attr.name = "legacy_io";
b->legacy_io->size = 0xffff;
b->legacy_io->attr.mode = S_IRUSR | S_IWUSR;
@@ -655,7 +655,7 @@ void pci_create_legacy_files(struct pci_bus *b)
goto legacy_io_err;
/* Allocated above after the legacy_io struct */
- sysfs_bin_attr_init(&b->legacy_mem);
+ sysfs_bin_attr_init(b->legacy_mem);
b->legacy_mem = b->legacy_io + 1;
b->legacy_mem->attr.name = "legacy_mem";
b->legacy_mem->size = 1024*1024;
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index d77cde6..f0496b3 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -110,7 +110,7 @@ struct bin_attribute {
* enabled. Lockdep gives a nice error when your attribute is
* added to sysfs if you don't have this.
*/
-#define sysfs_bin_attr_init(bin_attr) sysfs_attr_init(&bin_attr->attr)
+#define sysfs_bin_attr_init(bin_attr) sysfs_attr_init(&(bin_attr)->attr)
struct sysfs_ops {
ssize_t (*show)(struct kobject *, struct attribute *,char *);
--
1.7.0.1
next prev parent reply other threads:[~2010-03-02 23:29 UTC|newest]
Thread overview: 87+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-02 23:09 [GIT PATCH] driver core patches for 2.6.33-git Greg KH
2010-03-02 23:28 ` [PATCH 01/62] kobject-example: Spelling fixes Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 02/62] kset-example: " Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 03/62] Driver core: add platform_create_bundle() helper Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 04/62] driver core: make platform_device_id table const Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 05/62] sysdev: Pass attribute in sysdev_class attributes show/store Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 06/62] sysdev: Convert node driver class attributes to be data driven Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 07/62] sysdev: Convert cpu driver sysdev class attributes Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 08/62] sysfs: Add sysfs_add/remove_files utility functions Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 09/62] sysfs: Add attribute array to sysdev classes Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 10/62] sysdev: Convert node driver Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 11/62] sysdev: Use sysdev_class attribute arrays in " Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 12/62] sysdev: Add sysdev_create/remove_files Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 13/62] sysdev: Fix type of sysdev class attribute in memory driver Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 14/62] sysdev: fix missing s390 conversion Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 15/62] driver-core: Add attribute argument to class_attribute show/store Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 16/62] driver core: Add class_attr_string for simple read-only string Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 17/62] driver core: Convert some drivers to CLASS_ATTR_STRING Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 18/62] Driver-Core: devtmpfs - reset inode permissions before unlinking Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 19/62] Driver-Core: devtmpfs - remove EXPERIMENTAL and enable it by default Greg Kroah-Hartman
2010-03-03 4:38 ` Eric W. Biederman
2010-03-03 16:46 ` Linus Torvalds
2010-03-03 20:03 ` Kay Sievers
2010-03-03 20:21 ` Eric W. Biederman
2010-03-03 22:01 ` Kay Sievers
2010-03-03 21:22 ` Greg KH
2010-03-03 21:48 ` Linus Torvalds
2010-03-03 22:04 ` Greg KH
2010-03-04 0:04 ` Linus Torvalds
2010-03-02 23:28 ` [PATCH 20/62] Driver-Core: disable /sbin/hotplug " Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 21/62] Driver-Core: require valid action string in uevent trigger Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 22/62] sysfs: Cache the last sysfs_dirent to improve readdir scalability v2 Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 23/62] driver-core: firmware_class: remove base.h header inclusion Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 24/62] kobject: Constify struct kset_uevent_ops Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 25/62] HOWTO: Updates on subsystem trees, patchwork, -next (vs. -mm) Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 26/62] sysdev: fix up the probe/release attributes Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 27/62] Driver core: Constify struct sysfs_ops in struct kobj_type Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 28/62] Driver core: make struct platform_driver.id_table const Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 29/62] platform-drivers: move probe to .devinit.text in arch/arm Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 30/62] platform-drivers: move probe to .devinit.text in drivers/scsi Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 32/62] x86: move hp-wmi's probe function to .devinit.text Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 33/62] i2c: move i2c_omap's " Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 34/62] w1: move omap_hdq's " Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 35/62] media: move omap24xxcam's " Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 36/62] auxdisplay: move cfag12864bfb's " Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 37/62] net: move am79c961's " Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 38/62] UIO: Add a driver for Hilscher netX-based fieldbus cards Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 39/62] UIO: minor Kconfig fixes Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 40/62] UIO: Remove SMX Cryptengine driver Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 41/62] Driver core: Fix first line of kernel-doc for a few functions Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 42/62] sysfs: Remove sysfs_get/put_active_two Greg Kroah-Hartman
2010-03-03 1:34 ` Tejun Heo
2010-03-02 23:28 ` [PATCH 43/62] sysfs: Only take active references on attributes Greg Kroah-Hartman
2010-03-03 1:36 ` Tejun Heo
2010-03-02 23:28 ` [PATCH 44/62] sysfs: Use one lockdep class per sysfs attribute Greg Kroah-Hartman
2010-03-03 1:41 ` Tejun Heo
2010-03-02 23:28 ` [PATCH 45/62] sysfs: Use sysfs_attr_init and sysfs_bin_attr_init on dynamic attributes Greg Kroah-Hartman
2010-03-03 1:41 ` Tejun Heo
2010-03-02 23:28 ` [PATCH 46/62] sysfs: Document sysfs_attr_init and sysfs_bin_attr_init Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 47/62] sysfs: Use sysfs_attr_init and sysfs_bin_attr_init on module dynamic attributes Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 48/62] sysfs: windfarm: init sysfs attributes Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 49/62] sysfs: Serialize updates to the vfs inode Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 50/62] sysfs: Pack sysfs_dirent more tightly Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 51/62] sysfs: Implement sysfs_rename_link Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 52/62] driver core: Use sysfs_rename_link in device_rename Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 53/62] sysfs: Pass super_block to sysfs_get_inode Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 54/62] sysfs: Kill unused sysfs_sb variable Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 56/62] msi-laptop: Support standard ec 66/62 command on MSI notebook and nebook Greg Kroah-Hartman
2010-03-02 23:42 ` Matthew Garrett
2010-03-02 23:58 ` Greg KH
2010-03-03 13:47 ` Matthew Garrett
2010-03-02 23:28 ` [PATCH 57/62] msi-laptop: Add threeg sysfs file for support query 3G state by standard 66/62 ec command Greg Kroah-Hartman
2010-03-02 23:36 ` Matthew Garrett
2010-03-02 23:47 ` Greg KH
2010-03-03 13:46 ` Matthew Garrett
2010-03-02 23:28 ` [PATCH 58/62] msi-laptop: Support some MSI 3G netbook that is need load SCM Greg Kroah-Hartman
2010-03-02 23:39 ` Matthew Garrett
2010-03-02 23:46 ` Greg KH
2010-03-02 23:28 ` [PATCH 59/62] msi-laptop: Add resume method for set the SCM load again Greg Kroah-Hartman
2010-03-02 23:28 ` [PATCH 60/62] msi-laptop: Detect 3G device exists by standard ec command Greg Kroah-Hartman
2010-03-02 23:29 ` [PATCH 61/62] msi-laptop: depends on RFKILL Greg Kroah-Hartman
2010-03-03 6:09 ` Dmitry Torokhov
2010-03-03 21:23 ` Greg KH
2010-03-02 23:29 ` Greg Kroah-Hartman [this message]
2010-03-08 14:12 ` [GIT PATCH] driver core patches for 2.6.33-git Greg KH
2010-03-08 17:28 ` Linus Torvalds
2010-03-08 17:33 ` Greg KH
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=1267572541-410-62-git-send-email-gregkh@suse.de \
--to=gregkh@suse.de \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.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
Powered by JetHome