Re: [PATCH] kobject: avoid unnecessary assignment of kobj->parent

2015-06-07 Thread Wei Yang
On Sat, Jun 06, 2015 at 01:22:30PM +0900, Greg KH wrote: >On Thu, Jun 04, 2015 at 10:13:50AM +0800, Wei Yang wrote: >> kobj->parent is changed only when it is NULL originally. >> >> This patch moves the assignment in the "if" to avoid unnecessary assignment. >> >> Signed-off-by: Wei Yang >> ---

Re: [PATCH] kobject: avoid unnecessary assignment of kobj->parent

2015-06-05 Thread Greg KH
On Thu, Jun 04, 2015 at 10:13:50AM +0800, Wei Yang wrote: > kobj->parent is changed only when it is NULL originally. > > This patch moves the assignment in the "if" to avoid unnecessary assignment. > > Signed-off-by: Wei Yang > --- > lib/kobject.c |3 +-- > 1 file changed, 1 insertion(+), 2

[PATCH] kobject: avoid unnecessary assignment of kobj->parent

2015-06-03 Thread Wei Yang
kobj->parent is changed only when it is NULL originally. This patch moves the assignment in the "if" to avoid unnecessary assignment. Signed-off-by: Wei Yang --- lib/kobject.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/kobject.c b/lib/kobject.c index 03d4ab3..3