Re: [PATCH][5/5][resend] floppy.c: Fix device_create_file() warning

2007-03-20 Thread Dmitriy Monakhov
"Jesper Juhl" <[EMAIL PROTECTED]> writes: > On 20/03/07, Mikael Pettersson <[EMAIL PROTECTED]> wrote: >> On Mon, 19 Mar 2007 18:42:22 +0100, Jesper Juhl wrote: >> > --- a/drivers/block/floppy.c >> > +++ b/drivers/block/floppy.c >> > @@ -4302,7 +4302,12 @@ static int __init floppy_init(void) >> >

Re: [PATCH][5/5][resend] floppy.c: Fix device_create_file() warning

2007-03-20 Thread Mikael Pettersson
On Tue, 20 Mar 2007 12:29:49 +0100 (CET), Andreas Kleen <[EMAIL PROTECTED]> wrote: > > The floppy driver's sysfs file just provides some auxiliary > > information to user-space, none of which matters for most of > > its users. It is IMO totally inappropriate to fail floppy > > driver init in this

Re: [PATCH][5/5][resend] floppy.c: Fix device_create_file() warning

2007-03-20 Thread Andreas Kleen
> The floppy driver's sysfs file just provides some auxiliary > information to user-space, none of which matters for most of > its users. It is IMO totally inappropriate to fail floppy > driver init in this case. I thought it was for udev to create the device nodes? But I might be wrong on that.

Re: [PATCH][5/5][resend] floppy.c: Fix device_create_file() warning

2007-03-20 Thread Jesper Juhl
On 20/03/07, Mikael Pettersson <[EMAIL PROTECTED]> wrote: On Mon, 19 Mar 2007 18:42:22 +0100, Jesper Juhl wrote: > --- a/drivers/block/floppy.c > +++ b/drivers/block/floppy.c > @@ -4302,7 +4302,12 @@ static int __init floppy_init(void) > if (err) > goto out_flu

Re: [PATCH][5/5][resend] floppy.c: Fix device_create_file() warning

2007-03-20 Thread Mikael Pettersson
On Mon, 19 Mar 2007 18:42:22 +0100, Jesper Juhl wrote: > --- a/drivers/block/floppy.c > +++ b/drivers/block/floppy.c > @@ -4302,7 +4302,12 @@ static int __init floppy_init(void) > if (err) > goto out_flush_work; > > - device_create_file(&floppy_devi

Re: [PATCH][5/5][resend] floppy.c: Fix device_create_file() warning

2007-03-19 Thread Jesper Juhl
On Monday 19 March 2007 16:20:00 Andi Kleen wrote: > On Monday 19 March 2007 16:16, Jesper Juhl wrote: > > On 19/03/07, Andi Kleen <[EMAIL PROTECTED]> wrote: > > > > - > > > > device_create_file(&floppy_device[drive].dev,&dev_attr_cmos); + > > > > err = device_create_file(&f

Re: [PATCH][5/5][resend] floppy.c: Fix device_create_file() warning

2007-03-19 Thread Andi Kleen
On Monday 19 March 2007 16:16, Jesper Juhl wrote: > On 19/03/07, Andi Kleen <[EMAIL PROTECTED]> wrote: > > > > > > > > - > > > device_create_file(&floppy_device[drive].dev,&dev_attr_cmos); > > > + err = device_create_file(&floppy_device[drive].dev, > > > &dev_attr_cmos); >

Re: [PATCH][5/5][resend] floppy.c: Fix device_create_file() warning

2007-03-19 Thread Jesper Juhl
On 19/03/07, Andi Kleen <[EMAIL PROTECTED]> wrote: > > - device_create_file(&floppy_device[drive].dev,&dev_attr_cmos); > + err = device_create_file(&floppy_device[drive].dev, &dev_attr_cmos); > + if (err) > + printk(KERN_WARNING "Unable to

Re: [PATCH][5/5][resend] floppy.c: Fix device_create_file() warning

2007-03-19 Thread Andi Kleen
> > - device_create_file(&floppy_device[drive].dev,&dev_attr_cmos); > + err = device_create_file(&floppy_device[drive].dev, > &dev_attr_cmos); > + if (err) > + printk(KERN_WARNING "Unable to create sysfs attribute " > +

[PATCH][5/5][resend] floppy.c: Fix device_create_file() warning

2007-03-19 Thread Jesper Juhl
This fixes the warning warning: ignoring return value of `device_create_file', declared with attribute warn_unused_result in function `floppy_init'. It does this by checking the return value and printing a warning message in case of no success. Signed-off-by: Jesper Juhl <[EMA