Re: [PATCH 16/23] Kobject: provide better warning messages when people do stupid things

From: Greg KH
Date: Wed Mar 22 2006 - 17:15:33 EST


On Tue, Mar 21, 2006 at 08:16:46PM +0300, Artem B. Bityutskiy wrote:
> Greg Kroah-Hartman wrote:
> >+
> >+ /* be noisy on error issues */
> >+ if (error == -EEXIST)
> >+ printk("kobject_add failed for %s with -EEXIST, "
> >+ "don't try to register things with the "
> >+ "same name in the same directory.\n",
> >+ kobject_name(kobj));
>
> This looks like an attempt to put documentation into kernel code. Isn't
> it better to add good documentation to the header file just above the
> prototype?

Normally I would agree with you, but it's users that hit this error,
when they load a combination of drivers that no developer has in the
past. And due to the noise in my inbox, people are still quite confused
when this happens. That error message is to help people determine what
the real problem is.

> When I started using sysfs, I noticed a lack of good comments above
> prototypes of exported functions.

I agree, care to provide a patch that fixes this?

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/