* [PATCH 1/3] arch/mips/txx9/generic: init dynamic bin_attribute structures
[not found] <1268377431-11671-1-git-send-email-w.sang@pengutronix.de>
@ 2010-03-12 7:03 ` Wolfram Sang
2010-03-12 18:34 ` Dmitry Torokhov
0 siblings, 1 reply; 5+ messages in thread
From: Wolfram Sang @ 2010-03-12 7:03 UTC (permalink / raw)
To: kernel-janitors
Cc: Wolfram Sang, Ralf Baechle, Eric W. Biederman, linux-mips,
linux-kernel
Commit 6992f5334995af474c2b58d010d08bc597f0f2fe introduced this requirement.
Found with coccinelle, but fixed manually. Compile tested on X86 where
possible.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Eric W. Biederman <ebiederm@xmission.com>
---
arch/mips/txx9/generic/setup.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c
index 7174d83..95184a0 100644
--- a/arch/mips/txx9/generic/setup.c
+++ b/arch/mips/txx9/generic/setup.c
@@ -956,6 +956,7 @@ void __init txx9_sramc_init(struct resource *r)
if (!dev->base)
goto exit;
dev->dev.cls = &txx9_sramc_sysdev_class;
+ sysfs_bin_attr_init(&dev->bindata_attr);
dev->bindata_attr.attr.name = "bindata";
dev->bindata_attr.attr.mode = S_IRUSR | S_IWUSR;
dev->bindata_attr.read = txx9_sram_read;
--
1.7.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/3] arch/mips/txx9/generic: init dynamic bin_attribute structures
2010-03-12 7:03 ` [PATCH 1/3] arch/mips/txx9/generic: init dynamic bin_attribute structures Wolfram Sang
@ 2010-03-12 18:34 ` Dmitry Torokhov
2010-03-13 2:28 ` Wolfram Sang
0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Torokhov @ 2010-03-12 18:34 UTC (permalink / raw)
To: Wolfram Sang
Cc: kernel-janitors, Ralf Baechle, Eric W. Biederman, linux-mips,
linux-kernel
On Fri, Mar 12, 2010 at 08:03:49AM +0100, Wolfram Sang wrote:
> Commit 6992f5334995af474c2b58d010d08bc597f0f2fe introduced this requirement.
> Found with coccinelle, but fixed manually. Compile tested on X86 where
> possible.
>
Regarding all 3 - it looks like these dynamically alocated attributes
could be converted to statically allocated ones. I'd recommend doing
that instead (in fact, I posted patch for the firmware_class couple days
ago).
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: Eric W. Biederman <ebiederm@xmission.com>
> ---
> arch/mips/txx9/generic/setup.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c
> index 7174d83..95184a0 100644
> --- a/arch/mips/txx9/generic/setup.c
> +++ b/arch/mips/txx9/generic/setup.c
> @@ -956,6 +956,7 @@ void __init txx9_sramc_init(struct resource *r)
> if (!dev->base)
> goto exit;
> dev->dev.cls = &txx9_sramc_sysdev_class;
> + sysfs_bin_attr_init(&dev->bindata_attr);
> dev->bindata_attr.attr.name = "bindata";
> dev->bindata_attr.attr.mode = S_IRUSR | S_IWUSR;
> dev->bindata_attr.read = txx9_sram_read;
--
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/3] arch/mips/txx9/generic: init dynamic bin_attribute structures
2010-03-12 18:34 ` Dmitry Torokhov
@ 2010-03-13 2:28 ` Wolfram Sang
2010-03-13 8:33 ` Dmitry Torokhov
2010-03-15 17:49 ` Ralf Baechle
0 siblings, 2 replies; 5+ messages in thread
From: Wolfram Sang @ 2010-03-13 2:28 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: kernel-janitors, Ralf Baechle, Eric W. Biederman, linux-mips,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1102 bytes --]
On Fri, Mar 12, 2010 at 10:34:51AM -0800, Dmitry Torokhov wrote:
> On Fri, Mar 12, 2010 at 08:03:49AM +0100, Wolfram Sang wrote:
> > Commit 6992f5334995af474c2b58d010d08bc597f0f2fe introduced this requirement.
> > Found with coccinelle, but fixed manually. Compile tested on X86 where
> > possible.
> >
>
> Regarding all 3 - it looks like these dynamically alocated attributes
> could be converted to statically allocated ones. I'd recommend doing
> that instead (in fact, I posted patch for the firmware_class couple days
> ago).
I agree for the firmware-patch. Regarding the MIPS one, 'size' might differ and
'private' will differ per instance. Regarding the RTC driver, 'size' might also
differ. I don't know if somebody really wants two RTCs or the SRAM for MIPS can
be instantiated more than once. Unless somebody with actual hardware jumps in,
I'd say better safe than sorry.
Thanks for the comment!
Wolfram
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/3] arch/mips/txx9/generic: init dynamic bin_attribute structures
2010-03-13 2:28 ` Wolfram Sang
@ 2010-03-13 8:33 ` Dmitry Torokhov
2010-03-15 17:49 ` Ralf Baechle
1 sibling, 0 replies; 5+ messages in thread
From: Dmitry Torokhov @ 2010-03-13 8:33 UTC (permalink / raw)
To: Wolfram Sang
Cc: kernel-janitors, Ralf Baechle, Eric W. Biederman, linux-mips,
linux-kernel
On Sat, Mar 13, 2010 at 03:28:55AM +0100, Wolfram Sang wrote:
> On Fri, Mar 12, 2010 at 10:34:51AM -0800, Dmitry Torokhov wrote:
> > On Fri, Mar 12, 2010 at 08:03:49AM +0100, Wolfram Sang wrote:
> > > Commit 6992f5334995af474c2b58d010d08bc597f0f2fe introduced this requirement.
> > > Found with coccinelle, but fixed manually. Compile tested on X86 where
> > > possible.
> > >
> >
> > Regarding all 3 - it looks like these dynamically alocated attributes
> > could be converted to statically allocated ones. I'd recommend doing
> > that instead (in fact, I posted patch for the firmware_class couple days
> > ago).
>
> I agree for the firmware-patch. Regarding the MIPS one, 'size' might differ and
> 'private' will differ per instance. Regarding the RTC driver, 'size' might also
> differ. I don't know if somebody really wants two RTCs or the SRAM for MIPS can
> be instantiated more than once. Unless somebody with actual hardware jumps in,
> I'd say better safe than sorry.
>
Ah, right, size... I forgot about it. You are right, making the other 2
static is not an option.
--
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/3] arch/mips/txx9/generic: init dynamic bin_attribute structures
2010-03-13 2:28 ` Wolfram Sang
2010-03-13 8:33 ` Dmitry Torokhov
@ 2010-03-15 17:49 ` Ralf Baechle
1 sibling, 0 replies; 5+ messages in thread
From: Ralf Baechle @ 2010-03-15 17:49 UTC (permalink / raw)
To: Wolfram Sang
Cc: Dmitry Torokhov, kernel-janitors, Eric W. Biederman, linux-mips,
linux-kernel
On Sat, Mar 13, 2010 at 03:28:55AM +0100, Wolfram Sang wrote:
> > Regarding all 3 - it looks like these dynamically alocated attributes
> > could be converted to statically allocated ones. I'd recommend doing
> > that instead (in fact, I posted patch for the firmware_class couple days
> > ago).
>
> I agree for the firmware-patch. Regarding the MIPS one, 'size' might differ and
> 'private' will differ per instance. Regarding the RTC driver, 'size' might also
> differ. I don't know if somebody really wants two RTCs or the SRAM for MIPS can
> be instantiated more than once. Unless somebody with actual hardware jumps in,
> I'd say better safe than sorry.
On the txx9 platform you've posted the patch for additional RTCs or SRAMs
would not normally be expected. On other platforms such as IP27 there
would be one per node that is potencially very many.
Ralf
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-03-15 17:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1268377431-11671-1-git-send-email-w.sang@pengutronix.de>
2010-03-12 7:03 ` [PATCH 1/3] arch/mips/txx9/generic: init dynamic bin_attribute structures Wolfram Sang
2010-03-12 18:34 ` Dmitry Torokhov
2010-03-13 2:28 ` Wolfram Sang
2010-03-13 8:33 ` Dmitry Torokhov
2010-03-15 17:49 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).