That's nice. Remember, we used to have a lock in there, that's why the
code doesn't look that clean after it was removed.
> But why return anything? Which looks clearer?
>
> (a) kobj = kobject_get(kobj);
This is the way to call kobject_get(), as the object we get after the
function returns is the one we can then safely use.
> The first one makes me think that kobject_get might return a different
> kobject than the one I passed in. That doesn't make much sense.
Think of it as, "now we can use this kobject, not the one before calling
kobject_get()".
thanks,
greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/