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

Previous thread: [PATCH 5/6] powerpc/pci: Remove owner field from attribute initialization in PCI bridge init by Guenter Roeck on Wednesday, July 28, 2010 - 10:09 pm. (1 message)

Next thread: [PATCH 0/5] memcg: few nit fix and cleanups by KOSAKI Motohiro on Wednesday, July 28, 2010 - 10:25 pm. (6 messages)
From: Guenter Roeck
Date: Wednesday, July 28, 2010 - 10:09 pm

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.

--

From: Guenter Roeck
Date: Wednesday, July 28, 2010 - 10:09 pm

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
---
 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

--

From: Guenter Roeck
Date: Wednesday, July 28, 2010 - 10:09 pm

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
---
 drivers/regulator/core.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 2248087..422a709 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1025,7 +1025,6 @@ static struct regulator *create_regulator(struct regulator_dev *rdev,
 		if (regulator->dev_attr.attr.name == NULL)
 			goto attr_name_err;
 
-		regulator->dev_attr.attr.owner = THIS_MODULE;
 		regulator->dev_attr.attr.mode = 0444;
 		regulator->dev_attr.show = device_requested_uA_show;
 		err = device_create_file(dev, &regulator->dev_attr);
-- 
1.7.0.87.g0901d

--

From: Mark Brown
Date: Thursday, July 29, 2010 - 10:15 am

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
--

From: Eric Biederman
Date: Wednesday, July 28, 2010 - 11:16 pm

On Wed, Jul 28, 2010 at 10:09 PM, Guenter Roeck

This seems reasonable to me.  Can we get this in linux-next?

Eric
--

From: Greg KH
Date: Monday, August 2, 2010 - 4:31 pm

It will show up in linux-next tomorrow.

thanks,

greg k-h
--

From: Jean Delvare
Date: Tuesday, August 10, 2010 - 6:43 am

From: Stephen Rothwell
Date: Tuesday, August 10, 2010 - 8:17 am

Hi Jean,


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/
From: Stephen Rothwell
Date: Tuesday, August 10, 2010 - 8:20 am

Hi Jean,


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/
From: Guenter Roeck
Date: Tuesday, August 10, 2010 - 9:43 am

Excellent. Guess the patch I sent out earlier today to fix the problem
wasn't needed then.

Guenter


--

From: Tejun Heo
Date: Friday, July 30, 2010 - 1:45 am

Yeah, the change is way overdue.  Maybe we should have just removed
them back then.

 Acked-by: Tejun Heo <tj@kernel.org>

Thanks.

-- 
tejun
--

From: Benjamin Herrenschmidt
Date: Friday, July 30, 2010 - 3:28 am

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,


--

From: Greg KH
Date: Friday, July 30, 2010 - 7:36 am

I can carry them all in my driver-core tree if you don't object.

thanks,

greg k-h
--

From: Guenter Roeck
Date: Monday, August 2, 2010 - 9:15 am

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


--

From: Greg KH
Date: Monday, August 2, 2010 - 9:53 am

I'll take it.

thanks,

greg k-h
--