[PATCH 0/6] Remove owner field from sysfs attribute structure

STALE5836d

17 messages, 8 authors, 2010-08-10 · open the first message on its own page

[PATCH 0/6] Remove owner field from sysfs attribute structure

From: Guenter Roeck <hidden>
Date: 2010-07-29 05:14:36

The following comment is found in include/linux/sysfs.h:

   /* FIXME
    * The *owner field is no longer used.
    * x86 tree has been cleaned up. The owner
    * attribute is still left for other arches.
    */

As it turns out, the *owner field is (again?) initialized in several modules,
suggesting that such initialization may be creeping back into the code.

This patch set removes the above comment, the *owner field, and each instance
in the code where it was found to be initialized.

Compiled with x86 allmodconfig as well as with all alpha, arm, mips, powerpc,
and sparc defconfig builds.

[PATCH 6/6] Remove owner field from sysfs struct attribute

From: Guenter Roeck <hidden>
Date: 2010-07-29 05:13:55

Signed-off-by: Guenter Roeck <redacted>
---
 include/linux/sysfs.h |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index f2694eb..880fa1a 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -22,14 +22,8 @@ struct kobject;
 struct module;
 enum kobj_ns_type;
 
-/* FIXME
- * The *owner field is no longer used.
- * x86 tree has been cleaned up. The owner
- * attribute is still left for other arches.
- */
 struct attribute {
 	const char		*name;
-	struct module		*owner;
 	mode_t			mode;
 #ifdef CONFIG_DEBUG_LOCK_ALLOC
 	struct lock_class_key	*key;
-- 
1.7.0.87.g0901d

[PATCH 3/6] leds: Remove owner field from attribute initialization in bd2802 driver

From: Guenter Roeck <hidden>
Date: 2010-07-29 05:13:59

Signed-off-by: Guenter Roeck <redacted>
---
 drivers/leds/leds-bd2802.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/leds/leds-bd2802.c b/drivers/leds/leds-bd2802.c
index 5dcdf9d..19dc4b6 100644
--- a/drivers/leds/leds-bd2802.c
+++ b/drivers/leds/leds-bd2802.c
@@ -351,7 +351,7 @@ static ssize_t bd2802_store_reg##reg_addr(struct device *dev,		\
 	return count;							\
 }									\
 static struct device_attribute bd2802_reg##reg_addr##_attr = {		\
-	.attr = {.name = reg_name, .mode = 0644, .owner = THIS_MODULE},	\
+	.attr = {.name = reg_name, .mode = 0644},			\
 	.store = bd2802_store_reg##reg_addr,				\
 };
 
@@ -482,7 +482,6 @@ static struct device_attribute bd2802_adv_conf_attr = {
 	.attr = {
 		.name = "advanced_configuration",
 		.mode = 0644,
-		.owner = THIS_MODULE
 	},
 	.show = bd2802_show_adv_conf,
 	.store = bd2802_store_adv_conf,
@@ -519,7 +518,6 @@ static struct device_attribute bd2802_##attr_name##_attr = {		\
 	.attr = {							\
 		.name = name_str,					\
 		.mode = 0644,						\
-		.owner = THIS_MODULE					\
 	},								\
 	.show = bd2802_show_##attr_name,				\
 	.store = bd2802_store_##attr_name,				\
-- 
1.7.0.87.g0901d

[PATCH 2/6] scsi: Remove owner field from attribute initialization in ARCMSR driver

From: Guenter Roeck <hidden>
Date: 2010-07-29 05:14:28

Signed-off-by: Guenter Roeck <redacted>
---
 drivers/scsi/arcmsr/arcmsr_attr.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/arcmsr/arcmsr_attr.c b/drivers/scsi/arcmsr/arcmsr_attr.c
index 07fdfe5..a4e04c5 100644
--- a/drivers/scsi/arcmsr/arcmsr_attr.c
+++ b/drivers/scsi/arcmsr/arcmsr_attr.c
@@ -192,7 +192,6 @@ static struct bin_attribute arcmsr_sysfs_message_read_attr = {
 	.attr = {
 		.name = "mu_read",
 		.mode = S_IRUSR ,
-		.owner = THIS_MODULE,
 	},
 	.size = 1032,
 	.read = arcmsr_sysfs_iop_message_read,
@@ -202,7 +201,6 @@ static struct bin_attribute arcmsr_sysfs_message_write_attr = {
 	.attr = {
 		.name = "mu_write",
 		.mode = S_IWUSR,
-		.owner = THIS_MODULE,
 	},
 	.size = 1032,
 	.write = arcmsr_sysfs_iop_message_write,
@@ -212,7 +210,6 @@ static struct bin_attribute arcmsr_sysfs_message_clear_attr = {
 	.attr = {
 		.name = "mu_clear",
 		.mode = S_IWUSR,
-		.owner = THIS_MODULE,
 	},
 	.size = 1,
 	.write = arcmsr_sysfs_iop_message_clear,
-- 
1.7.0.87.g0901d

[PATCH 5/6] powerpc/pci: Remove owner field from attribute initialization in PCI bridge init

From: Guenter Roeck <hidden>
Date: 2010-07-29 05:14:32

Signed-off-by: Guenter Roeck <redacted>
---
 arch/powerpc/sysdev/mv64x60_pci.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/sysdev/mv64x60_pci.c b/arch/powerpc/sysdev/mv64x60_pci.c
index 198f288..77bb3f4 100644
--- a/arch/powerpc/sysdev/mv64x60_pci.c
+++ b/arch/powerpc/sysdev/mv64x60_pci.c
@@ -73,7 +73,6 @@ static struct bin_attribute mv64x60_hs_reg_attr = { /* Hotswap register */
 	.attr = {
 		.name = "hs_reg",
 		.mode = S_IRUGO | S_IWUSR,
-		.owner = THIS_MODULE,
 	},
 	.size  = MV64X60_VAL_LEN_MAX,
 	.read  = mv64x60_hs_reg_read,
-- 
1.7.0.87.g0901d

[PATCH 1/6] scsi: Remove owner field from attribute initialization in LPFC driver

From: Guenter Roeck <hidden>
Date: 2010-07-29 05:14:40

Signed-off-by: Guenter Roeck <redacted>
---
 drivers/scsi/lpfc/lpfc_attr.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index bf33b31..8f89edf 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -2720,7 +2720,6 @@ static struct bin_attribute sysfs_drvr_stat_data_attr = {
 	.attr = {
 		.name = "lpfc_drvr_stat_data",
 		.mode = S_IRUSR,
-		.owner = THIS_MODULE,
 	},
 	.size = LPFC_MAX_TARGET * MAX_STAT_DATA_SIZE_PER_TARGET,
 	.read = sysfs_drvr_stat_data_read,
-- 
1.7.0.87.g0901d

Re: [PATCH 0/6] Remove owner field from sysfs attribute structure

From: Eric Biederman <hidden>
Date: 2010-07-29 06:16:37

On Wed, Jul 28, 2010 at 10:09 PM, Guenter Roeck
[off-list ref] wrote:
The following comment is found in include/linux/sysfs.h:

=A0 /* FIXME
=A0 =A0* The *owner field is no longer used.
=A0 =A0* x86 tree has been cleaned up. The owner
=A0 =A0* attribute is still left for other arches.
=A0 =A0*/

As it turns out, the *owner field is (again?) initialized in several modu=
les,
suggesting that such initialization may be creeping back into the code.

This patch set removes the above comment, the *owner field, and each inst=
ance
in the code where it was found to be initialized.

Compiled with x86 allmodconfig as well as with all alpha, arm, mips, powe=
rpc,
and sparc defconfig builds.
This seems reasonable to me.  Can we get this in linux-next?

Eric

Re: [PATCH 0/6] Remove owner field from sysfs attribute structure

From: Greg KH <hidden>
Date: 2010-08-02 23:32:12

On Wed, Jul 28, 2010 at 11:16:35PM -0700, Eric Biederman wrote:
On Wed, Jul 28, 2010 at 10:09 PM, Guenter Roeck
[off-list ref] wrote:
quoted
The following comment is found in include/linux/sysfs.h:

  /* FIXME
   * The *owner field is no longer used.
   * x86 tree has been cleaned up. The owner
   * attribute is still left for other arches.
   */

As it turns out, the *owner field is (again?) initialized in several modules,
suggesting that such initialization may be creeping back into the code.

This patch set removes the above comment, the *owner field, and each instance
in the code where it was found to be initialized.

Compiled with x86 allmodconfig as well as with all alpha, arm, mips, powerpc,
and sparc defconfig builds.
This seems reasonable to me.  Can we get this in linux-next?
It will show up in linux-next tomorrow.

thanks,

greg k-h

Re: [PATCH 0/6] Remove owner field from sysfs attribute structure

From: Jean Delvare <hidden>
Date: 2010-08-10 13:44:26

On Mon, 2 Aug 2010 16:31:28 -0700, Greg KH wrote:
On Wed, Jul 28, 2010 at 11:16:35PM -0700, Eric Biederman wrote:
quoted
On Wed, Jul 28, 2010 at 10:09 PM, Guenter Roeck
[off-list ref] wrote:
quoted
The following comment is found in include/linux/sysfs.h:

=C2=A0 /* FIXME
=C2=A0 =C2=A0* The *owner field is no longer used.
=C2=A0 =C2=A0* x86 tree has been cleaned up. The owner
=C2=A0 =C2=A0* attribute is still left for other arches.
=C2=A0 =C2=A0*/

As it turns out, the *owner field is (again?) initialized in several =
modules,
quoted
quoted
suggesting that such initialization may be creeping back into the cod=
e.
quoted
quoted
This patch set removes the above comment, the *owner field, and each =
instance
quoted
quoted
in the code where it was found to be initialized.

Compiled with x86 allmodconfig as well as with all alpha, arm, mips, =
powerpc,
quoted
quoted
and sparc defconfig builds.
=20
This seems reasonable to me.  Can we get this in linux-next?
=20
It will show up in linux-next tomorrow.
Related bug?

https://bugzilla.kernel.org/show_bug.cgi?id=3D16544

--=20
Jean Delvare

Re: [PATCH 0/6] Remove owner field from sysfs attribute structure

From: Stephen Rothwell <hidden>
Date: 2010-08-10 15:17:53

Hi Jean,

On Tue, 10 Aug 2010 15:43:37 +0200 Jean Delvare [off-list ref] wrote:
Related bug?

https://bugzilla.kernel.org/show_bug.cgi?id=16544
Yep, fixed in linux-next today - hopefully the fix is on its way to Linus.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

Re: [PATCH 0/6] Remove owner field from sysfs attribute structure

From: Stephen Rothwell <hidden>
Date: 2010-08-10 15:20:12

Hi Jean,

On Wed, 11 Aug 2010 01:17:33 +1000 Stephen Rothwell [off-list ref] wrote:
On Tue, 10 Aug 2010 15:43:37 +0200 Jean Delvare [off-list ref] wrote:
quoted
Related bug?

https://bugzilla.kernel.org/show_bug.cgi?id=16544
Yep, fixed in linux-next today - hopefully the fix is on its way to Linus.
Sorry, more info:

Fixed by commit 690e85a3957291f4cfe0cac22d97994ec7e5ee45 ("olpc_battery:
Fix build failure caused by sysfs changes") from the battery tree.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

Re: [PATCH 0/6] Remove owner field from sysfs attribute structure

From: Guenter Roeck <hidden>
Date: 2010-08-10 16:47:16

On Tue, 2010-08-10 at 11:20 -0400, Stephen Rothwell wrote:
Hi Jean,

On Wed, 11 Aug 2010 01:17:33 +1000 Stephen Rothwell [off-list ref] wrote:
quoted
On Tue, 10 Aug 2010 15:43:37 +0200 Jean Delvare [off-list ref] wrote:
quoted
Related bug?

https://bugzilla.kernel.org/show_bug.cgi?id=16544
Yep, fixed in linux-next today - hopefully the fix is on its way to Linus.
Sorry, more info:

Fixed by commit 690e85a3957291f4cfe0cac22d97994ec7e5ee45 ("olpc_battery:
Fix build failure caused by sysfs changes") from the battery tree.
Excellent. Guess the patch I sent out earlier today to fix the problem
wasn't needed then.

Guenter

Re: [PATCH 0/6] Remove owner field from sysfs attribute structure

From: Tejun Heo <tj@kernel.org>
Date: 2010-07-30 08:46:44

On 07/29/2010 07:09 AM, Guenter Roeck wrote:
The following comment is found in include/linux/sysfs.h:

   /* FIXME
    * The *owner field is no longer used.
    * x86 tree has been cleaned up. The owner
    * attribute is still left for other arches.
    */

As it turns out, the *owner field is (again?) initialized in several modules,
suggesting that such initialization may be creeping back into the code.

This patch set removes the above comment, the *owner field, and each instance
in the code where it was found to be initialized.

Compiled with x86 allmodconfig as well as with all alpha, arm, mips, powerpc,
and sparc defconfig builds.
Yeah, the change is way overdue.  Maybe we should have just removed
them back then.

 Acked-by: Tejun Heo [off-list ref]

Thanks.

-- 
tejun

Re: [PATCH 0/6] Remove owner field from sysfs attribute structure

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2010-07-30 10:56:27

On Fri, 2010-07-30 at 10:45 +0200, Tejun Heo wrote:
On 07/29/2010 07:09 AM, Guenter Roeck wrote:
quoted
The following comment is found in include/linux/sysfs.h:

   /* FIXME
    * The *owner field is no longer used.
    * x86 tree has been cleaned up. The owner
    * attribute is still left for other arches.
    */

As it turns out, the *owner field is (again?) initialized in several modules,
suggesting that such initialization may be creeping back into the code.

This patch set removes the above comment, the *owner field, and each instance
in the code where it was found to be initialized.

Compiled with x86 allmodconfig as well as with all alpha, arm, mips, powerpc,
and sparc defconfig builds.
Yeah, the change is way overdue.  Maybe we should have just removed
them back then.
I'm happy with the powerpc related patches as long as we all agree that
needs to go. Do you need me to put some of this in powerpc.git or are
you carrying them all to Linus ?

Cheers,
Ben.
 Acked-by: Tejun Heo [off-list ref]

Thanks.

Re: [PATCH 0/6] Remove owner field from sysfs attribute structure

From: Greg KH <gregkh@suse.de>
Date: 2010-07-30 14:41:53

On Fri, Jul 30, 2010 at 08:28:10PM +1000, Benjamin Herrenschmidt wrote:
On Fri, 2010-07-30 at 10:45 +0200, Tejun Heo wrote:
quoted
On 07/29/2010 07:09 AM, Guenter Roeck wrote:
quoted
The following comment is found in include/linux/sysfs.h:

   /* FIXME
    * The *owner field is no longer used.
    * x86 tree has been cleaned up. The owner
    * attribute is still left for other arches.
    */

As it turns out, the *owner field is (again?) initialized in several modules,
suggesting that such initialization may be creeping back into the code.

This patch set removes the above comment, the *owner field, and each instance
in the code where it was found to be initialized.

Compiled with x86 allmodconfig as well as with all alpha, arm, mips, powerpc,
and sparc defconfig builds.
Yeah, the change is way overdue.  Maybe we should have just removed
them back then.
I'm happy with the powerpc related patches as long as we all agree that
needs to go. Do you need me to put some of this in powerpc.git or are
you carrying them all to Linus ?
I can carry them all in my driver-core tree if you don't object.

thanks,

greg k-h

Re: [PATCH 0/6] Remove owner field from sysfs attribute structure

From: Guenter Roeck <hidden>
Date: 2010-08-02 16:50:06

On Fri, 2010-07-30 at 10:36 -0400, Greg KH wrote:
On Fri, Jul 30, 2010 at 08:28:10PM +1000, Benjamin Herrenschmidt wrote:
quoted
On Fri, 2010-07-30 at 10:45 +0200, Tejun Heo wrote:
quoted
On 07/29/2010 07:09 AM, Guenter Roeck wrote:
quoted
The following comment is found in include/linux/sysfs.h:

   /* FIXME
    * The *owner field is no longer used.
    * x86 tree has been cleaned up. The owner
    * attribute is still left for other arches.
    */

As it turns out, the *owner field is (again?) initialized in several modules,
suggesting that such initialization may be creeping back into the code.

This patch set removes the above comment, the *owner field, and each instance
in the code where it was found to be initialized.

Compiled with x86 allmodconfig as well as with all alpha, arm, mips, powerpc,
and sparc defconfig builds.
Yeah, the change is way overdue.  Maybe we should have just removed
them back then.
I'm happy with the powerpc related patches as long as we all agree that
needs to go. Do you need me to put some of this in powerpc.git or are
you carrying them all to Linus ?
I can carry them all in my driver-core tree if you don't object.
Any final verdict ? 

Not that it is my decision to make, but I think it would be better to
have it all in one tree. Otherwise the timing for the last patch would
get a bit complicated.

Thanks,
Guenter

Re: [PATCH 0/6] Remove owner field from sysfs attribute structure

From: Greg KH <gregkh@suse.de>
Date: 2010-08-02 17:13:02

On Mon, Aug 02, 2010 at 09:15:24AM -0700, Guenter Roeck wrote:
On Fri, 2010-07-30 at 10:36 -0400, Greg KH wrote:
quoted
On Fri, Jul 30, 2010 at 08:28:10PM +1000, Benjamin Herrenschmidt wrote:
quoted
On Fri, 2010-07-30 at 10:45 +0200, Tejun Heo wrote:
quoted
On 07/29/2010 07:09 AM, Guenter Roeck wrote:
quoted
The following comment is found in include/linux/sysfs.h:

   /* FIXME
    * The *owner field is no longer used.
    * x86 tree has been cleaned up. The owner
    * attribute is still left for other arches.
    */

As it turns out, the *owner field is (again?) initialized in several modules,
suggesting that such initialization may be creeping back into the code.

This patch set removes the above comment, the *owner field, and each instance
in the code where it was found to be initialized.

Compiled with x86 allmodconfig as well as with all alpha, arm, mips, powerpc,
and sparc defconfig builds.
Yeah, the change is way overdue.  Maybe we should have just removed
them back then.
I'm happy with the powerpc related patches as long as we all agree that
needs to go. Do you need me to put some of this in powerpc.git or are
you carrying them all to Linus ?
I can carry them all in my driver-core tree if you don't object.
Any final verdict ? 

Not that it is my decision to make, but I think it would be better to
have it all in one tree. Otherwise the timing for the last patch would
get a bit complicated.
I'll take it.

thanks,

greg k-h
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help