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 8e36e9ee3c5a9228b68717b35101c58fe9a001c5 ("sysfs: Use
sysfs_attr_init and sysfs_bin_attr_init on dynamic attributes")
interacting with commit 71f496c9ec9821d2e09b00298915b99b6cbc9d92 ("sysfs:
Use one lockdep class per sysfs attribute") both from the driver-core
tree.
I applied the following patch for today.
From: Stephen Rothwell <s...@canb.auug.org.au>
Date: Mon, 1 Mar 2010 19:41:15 +1100
Subject: [PATCH] sysfs: fix for thinko with sysfs_bin_attr_init()
Signed-off-by: Stephen Rothwell <s...@canb.auug.org.au>
---
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
--
Cheers,
Stephen Rothwell s...@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Oops, thanks, applied.
--
Jens Axboe
After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:
drivers/mtd/nand/r852.c:22: error: 'enable_dma' redeclared as different kind of symbol
arch/powerpc/include/asm/dma.h:189: note: previous definition of 'enable_dma' was here
drivers/mtd/nand/r852.c: In function 'r852_engine_enable':
drivers/mtd/nand/r852.c:545: error: implicit declaration of function 'msleep'
Caused by commit 67e054e919248fa1db93de727fb9ad49eb700642 ("mtd: nand:
Add driver for Ricoh xD/SmartMedia reader") from the mtd.
I applied the following patch for today.
From: Stephen Rothwell <s...@canb.auug.org.au>
Date: Mon, 1 Mar 2010 20:21:06 +1100
Subject: [PATCH] mtd: nand: fix name space clash
and include delay.h for msleep().
Signed-off-by: Stephen Rothwell <s...@canb.auug.org.au>
---
drivers/mtd/nand/r852.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/mtd/nand/r852.c b/drivers/mtd/nand/r852.c
index 218a42d..ca21883 100644
--- a/drivers/mtd/nand/r852.c
+++ b/drivers/mtd/nand/r852.c
@@ -13,15 +13,16 @@
#include <linux/workqueue.h>
#include <linux/interrupt.h>
#include <linux/pci_ids.h>
+#include <linux/delay.h>
#include <asm/byteorder.h>
#include <linux/sched.h>
#include "sm_common.h"
#include "r852.h"
-static int enable_dma = 1;
-module_param(enable_dma, bool, S_IRUGO);
-MODULE_PARM_DESC(enable_dma, "Enable usage of the DMA (default)");
+static int r852_enable_dma = 1;
+module_param(r852_enable_dma, bool, S_IRUGO);
+MODULE_PARM_DESC(r852_enable_dma, "Enable usage of the DMA (default)");
static int debug;
module_param(debug, int, S_IRUGO | S_IWUSR);
@@ -75,7 +76,7 @@ static void r852_dma_test(struct r852_device *dev)
if (!dev->dma_usable)
message("Non dma capable device detected, dma disabled");
- if (!enable_dma) {
+ if (!r852_enable_dma) {
message("disabling dma on user request");
dev->dma_usable = 0;
}
--
1.7.0
--
Cheers,
Stephen Rothwell s...@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
On Mon, 1 Mar 2010 10:42:55 +0100 Jens Axboe <jens....@oracle.com> wrote:
>
> Oops, thanks, applied.
Thanks.
Thanks, I've added this to the tree to send to Linus.
greg k-h