Re: Re: [PATCH] kobject: kobject_add_internal cleanup

From: Greg KH
Date: Fri Jul 30 2021 - 09:37:33 EST


On Fri, Jul 30, 2021 at 08:47:28PM +0800, qiaoyanbo_310@xxxxxxx wrote:
> On Fri, Jul 30, 2021 at 06:48:23AM +0200, Greg KH wrote:
> > On Fri, Jul 30, 2021 at 12:44:26AM +0800, qiaoyanbo_310 wrote:
> > > Hi Greg KH,
> >
> > Sorry, but html email is rejected by the mailing lists. Please try
> > again after fixing up your email client, and I will be glad to respond.
> >
> > thanks,
> >
> > greg k-h
>
> (Sorry, this is the first time I use the mutt environment to send mail,
> shamed on me I know~)
>
> >Why is this a problem? What bug is this solving? Is the code somehow
> >now faster or smaller that can be measured?
>
> I don't think the logic of the original code is self consistent.

I no longer even remember what the patch was anymore here, sorry.
That's the problem when emails are not quoted properly :(

> This is not a bug, but it causes some unnecessary assignment operations.

Are you sure? What would set the kobject parent to NULL then?

> This patch is to clean unnecessary assignment operations.

Are you sure there is anything unneeded? Have you measured the
performance issues here? What benchmark is affected by this?

thanks,

greg k-h