lkml.org 
[lkml]   [2008]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2/3] sysfs: remove error messages for -EEXIST case
From
From: Cornelia Huck <cornelia.huck@de.ibm.com>
Date: Thu, 15 May 2008 09:52:46 +0200

> > int sysfs_add_one(struct sysfs_addrm_cxt *acxt, struct sysfs_dirent *sd)
> > {
> > - if (sysfs_find_dirent(acxt->parent_sd, sd->s_name)) {
> > - printk(KERN_WARNING "sysfs: duplicate filename '%s' "
> > - "can not be created\n", sd->s_name);
> > - WARN_ON(1);
> > + if (sysfs_find_dirent(acxt->parent_sd, sd->s_name))
> > return -EEXIST;
> > - }
> >
> > sd->s_parent = sysfs_get(acxt->parent_sd);
>
> ...but this will cause many useful warnings to disappear.
>
> What to do here?

Make a __sysfs_add_one() that doesn't warn. Make
sysfs_add_one() be a wrapper around __sysfs_add_one()
that warns.

Change networking to call __sysfs_add_one().

Repeat and rinse up the call chain, as needed.



\
 
 \ /
  Last update: 2008-05-15 10:05    [W:1.106 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site