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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux