Am Montag, 4. Dezember 2006 17:57 schrieb Alan Stern:

> I was referring to sysfs_remove_file(), not sysfs_open_file() -- I agree 
> that getting rid of the check_perm() routine is good.  But this isn't:
> 
> >  void sysfs_remove_file(struct kobject * kobj, const struct attribute * 
> > attr)
> >  {
> > -       sysfs_hash_and_remove(kobj->dentry,attr->name);
> > +       struct dentry *d = kobj->dentry;
> > +
> > +       sysfs_hash_and_remove(d, attr->name);
> >  }
> 
> There's no apparent advantage to introducing the local variable d, either 
> in terms of execution speed or readability.  (Although the original source 
> line should have a space after the comma.)

Yes, correct, it is a remainder of using the dentry twice in that routine.
Then a local variable saved a recomputation. I can redo it, sorry.
However, it doesn't affect correctness, so I won't distract further by
doing an essentially cosmetic change.

        Regards
                Oliver

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to