* Re: + s390-add-modalias-to-uevent-for-ccw-devices.patch added to -mm tree
[not found] <200603060714.k267E6gN021778@shell0.pdx.osdl.net>
@ 2006-03-06 10:04 ` Cornelia Huck
2006-03-06 10:14 ` Andrew Morton
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Cornelia Huck @ 2006-03-06 10:04 UTC (permalink / raw)
To: linux-kernel; +Cc: akpm, bastian, heiko.carstens, schwidefsky
On Sun, 05 Mar 2006 23:12:30 -0800
akpm@osdl.org wrote:
> From: Bastian Blank <bastian@waldi.eu.org>
>
> Add a MODALIAS line to the uevents generated for ccw devices. udev uses
> them to load modules.
>
> Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
> Signed-off-by: Andrew Morton <akpm@osdl.org>
> ---
>
> drivers/s390/cio/device.c | 40 ++++++++++++++++++++++++++----------
> 1 files changed, 29 insertions(+), 11 deletions(-)
Hm, didn't see this on lkml, but the patch looks fine.
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Cornelia
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: + s390-add-modalias-to-uevent-for-ccw-devices.patch added to -mm tree
2006-03-06 10:04 ` + s390-add-modalias-to-uevent-for-ccw-devices.patch added to -mm tree Cornelia Huck
@ 2006-03-06 10:14 ` Andrew Morton
2006-03-06 10:18 ` Bastian Blank
2006-03-06 13:50 ` Bastian Blank
2 siblings, 0 replies; 7+ messages in thread
From: Andrew Morton @ 2006-03-06 10:14 UTC (permalink / raw)
To: Cornelia Huck; +Cc: linux-kernel, bastian, heiko.carstens, schwidefsky
Cornelia Huck <cornelia.huck@de.ibm.com> wrote:
>
> On Sun, 05 Mar 2006 23:12:30 -0800
> akpm@osdl.org wrote:
>
> > From: Bastian Blank <bastian@waldi.eu.org>
> >
> > Add a MODALIAS line to the uevents generated for ccw devices. udev uses
> > them to load modules.
> >
> > Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
> > Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
> > Signed-off-by: Andrew Morton <akpm@osdl.org>
> > ---
> >
> > drivers/s390/cio/device.c | 40 ++++++++++++++++++++++++++----------
> > 1 files changed, 29 insertions(+), 11 deletions(-)
>
> Hm, didn't see this on lkml, but the patch looks fine.
It was a best guess, based upon random URLs which people were tossing around.
(I did ask to be emailed the updated patch).
> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
OK, but if you're prefer to do it differently, please send the patch. Via
email ;)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: + s390-add-modalias-to-uevent-for-ccw-devices.patch added to -mm tree
2006-03-06 10:04 ` + s390-add-modalias-to-uevent-for-ccw-devices.patch added to -mm tree Cornelia Huck
2006-03-06 10:14 ` Andrew Morton
@ 2006-03-06 10:18 ` Bastian Blank
2006-03-06 13:50 ` Bastian Blank
2 siblings, 0 replies; 7+ messages in thread
From: Bastian Blank @ 2006-03-06 10:18 UTC (permalink / raw)
To: Cornelia Huck; +Cc: linux-kernel, akpm, heiko.carstens, schwidefsky
[-- Attachment #1: Type: text/plain, Size: 295 bytes --]
On Mon, Mar 06, 2006 at 11:04:16AM +0100, Cornelia Huck wrote:
> Hm, didn't see this on lkml, but the patch looks fine.
Yep, I forgot to add the lkml in the recipient list, sorry.
Bastian
--
Love sometimes expresses itself in sacrifice.
-- Kirk, "Metamorphosis", stardate 3220.3
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: + s390-add-modalias-to-uevent-for-ccw-devices.patch added to -mm tree
2006-03-06 10:04 ` + s390-add-modalias-to-uevent-for-ccw-devices.patch added to -mm tree Cornelia Huck
2006-03-06 10:14 ` Andrew Morton
2006-03-06 10:18 ` Bastian Blank
@ 2006-03-06 13:50 ` Bastian Blank
2006-03-06 15:39 ` Cornelia Huck
2 siblings, 1 reply; 7+ messages in thread
From: Bastian Blank @ 2006-03-06 13:50 UTC (permalink / raw)
To: Cornelia Huck; +Cc: linux-kernel, akpm, heiko.carstens, schwidefsky
[-- Attachment #1.1: Type: text/plain, Size: 453 bytes --]
On Mon, Mar 06, 2006 at 11:04:16AM +0100, Cornelia Huck wrote:
> Hm, didn't see this on lkml, but the patch looks fine.
And it does not work as expected. The uevent includes "MODALIAS=" but
the rest got lost in the buffer as it used a wrong offset. The attached
patch makes that really working.
Bastian
--
Lots of people drink from the wrong bottle sometimes.
-- Edith Keeler, "The City on the Edge of Forever",
stardate unknown
[-- Attachment #1.2: diff --]
[-- Type: text/plain, Size: 865 bytes --]
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index 3494bff..ea4652b 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -79,7 +79,7 @@ ccw_uevent (struct device *dev, char **e
{
struct ccw_device *cdev = to_ccwdev(dev);
int i = 0;
- int length = 0;
+ int length = 0, tmp_length = 0;
if (!cdev)
return -ENODEV;
@@ -120,8 +120,8 @@ ccw_uevent (struct device *dev, char **e
buffer += length;
envp[i++] = buffer;
- length += scnprintf(buffer, buffer_size - length, "MODALIAS=");
- length += modalias_print(cdev, buffer + length, buffer_size - length);
+ length += tmp_length = scnprintf(buffer, buffer_size - length, "MODALIAS=");
+ length += modalias_print(cdev, buffer + tmp_length, buffer_size - length);
if ((buffer_size - length <= 0) || (i >= num_envp))
return -ENOMEM;
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: + s390-add-modalias-to-uevent-for-ccw-devices.patch added to -mm tree
2006-03-06 13:50 ` Bastian Blank
@ 2006-03-06 15:39 ` Cornelia Huck
2006-03-06 16:02 ` Bastian Blank
0 siblings, 1 reply; 7+ messages in thread
From: Cornelia Huck @ 2006-03-06 15:39 UTC (permalink / raw)
To: Bastian Blank; +Cc: linux-kernel, akpm, heiko.carstens, schwidefsky
On Mon, 6 Mar 2006 14:50:17 +0100
Bastian Blank <bastian@waldi.eu.org> wrote:
> And it does not work as expected. The uevent includes "MODALIAS=" but
> the rest got lost in the buffer as it used a wrong offset. The attached
> patch makes that really working.
> @@ -120,8 +120,8 @@ ccw_uevent (struct device *dev, char **e
> buffer += length;
>
> envp[i++] = buffer;
> - length += scnprintf(buffer, buffer_size - length, "MODALIAS=");
> - length += modalias_print(cdev, buffer + length, buffer_size - length);
> + length += tmp_length = scnprintf(buffer, buffer_size - length, "MODALIAS=");
> + length += modalias_print(cdev, buffer + tmp_length, buffer_size - length);
> if ((buffer_size - length <= 0) || (i >= num_envp))
> return -ENOMEM;
You're right. I don't like the tmp_length too much, but can't think of
anything better.
Cornelia
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: + s390-add-modalias-to-uevent-for-ccw-devices.patch added to -mm tree
2006-03-06 15:39 ` Cornelia Huck
@ 2006-03-06 16:02 ` Bastian Blank
2006-03-06 16:17 ` Cornelia Huck
0 siblings, 1 reply; 7+ messages in thread
From: Bastian Blank @ 2006-03-06 16:02 UTC (permalink / raw)
To: Cornelia Huck; +Cc: linux-kernel, akpm, heiko.carstens, schwidefsky
[-- Attachment #1: Type: text/plain, Size: 332 bytes --]
On Mon, Mar 06, 2006 at 04:39:50PM +0100, Cornelia Huck wrote:
> You're right. I don't like the tmp_length too much, but can't think of
> anything better.
This will get fixed in my next patch, which uses add_uevent_var where
possible.
Bastian
--
A woman should have compassion.
-- Kirk, "Catspaw", stardate 3018.2
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: + s390-add-modalias-to-uevent-for-ccw-devices.patch added to -mm tree
2006-03-06 16:02 ` Bastian Blank
@ 2006-03-06 16:17 ` Cornelia Huck
0 siblings, 0 replies; 7+ messages in thread
From: Cornelia Huck @ 2006-03-06 16:17 UTC (permalink / raw)
To: Bastian Blank; +Cc: linux-kernel, akpm, heiko.carstens, schwidefsky
On Mon, 6 Mar 2006 17:02:34 +0100
Bastian Blank <bastian@waldi.eu.org> wrote:
> This will get fixed in my next patch, which uses add_uevent_var where
> possible.
Sounds good - thanks for working on this!
Cornelia
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-03-06 16:17 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200603060714.k267E6gN021778@shell0.pdx.osdl.net>
2006-03-06 10:04 ` + s390-add-modalias-to-uevent-for-ccw-devices.patch added to -mm tree Cornelia Huck
2006-03-06 10:14 ` Andrew Morton
2006-03-06 10:18 ` Bastian Blank
2006-03-06 13:50 ` Bastian Blank
2006-03-06 15:39 ` Cornelia Huck
2006-03-06 16:02 ` Bastian Blank
2006-03-06 16:17 ` Cornelia Huck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox