The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] driver core: auxiliary bus: No need to get auxdev->dev again
@ 2023-04-18 12:24 Angus Chen
  2023-04-18 12:32 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Angus Chen @ 2023-04-18 12:24 UTC (permalink / raw)
  To: gregkh, rafael; +Cc: linux-kernel, Angus Chen

Use dev variable directly.
No functional change intended.

Signed-off-by: Angus Chen <angus.chen@jaguarmicro.com>
---
 drivers/base/auxiliary.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/auxiliary.c b/drivers/base/auxiliary.c
index 4d4c2c8d26c4..ca1d044ff738 100644
--- a/drivers/base/auxiliary.c
+++ b/drivers/base/auxiliary.c
@@ -286,7 +286,7 @@ int auxiliary_device_init(struct auxiliary_device *auxdev)
 	}
 
 	dev->bus = &auxiliary_bus_type;
-	device_initialize(&auxdev->dev);
+	device_initialize(dev);
 	return 0;
 }
 EXPORT_SYMBOL_GPL(auxiliary_device_init);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] driver core: auxiliary bus: No need to get auxdev->dev again
  2023-04-18 12:24 [PATCH] driver core: auxiliary bus: No need to get auxdev->dev again Angus Chen
@ 2023-04-18 12:32 ` Greg KH
  2023-04-19  1:02   ` Angus Chen
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2023-04-18 12:32 UTC (permalink / raw)
  To: Angus Chen; +Cc: rafael, linux-kernel

On Tue, Apr 18, 2023 at 08:24:06PM +0800, Angus Chen wrote:
> Use dev variable directly.
> No functional change intended.

Not intended, but is it really intended?  What does this line mean?

> 
> Signed-off-by: Angus Chen <angus.chen@jaguarmicro.com>
> ---
>  drivers/base/auxiliary.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/base/auxiliary.c b/drivers/base/auxiliary.c
> index 4d4c2c8d26c4..ca1d044ff738 100644
> --- a/drivers/base/auxiliary.c
> +++ b/drivers/base/auxiliary.c
> @@ -286,7 +286,7 @@ int auxiliary_device_init(struct auxiliary_device *auxdev)
>  	}
>  
>  	dev->bus = &auxiliary_bus_type;
> -	device_initialize(&auxdev->dev);
> +	device_initialize(dev);

While an interesting change, is it needed?  Why make it?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] driver core: auxiliary bus: No need to get auxdev->dev again
  2023-04-18 12:32 ` Greg KH
@ 2023-04-19  1:02   ` Angus Chen
  0 siblings, 0 replies; 3+ messages in thread
From: Angus Chen @ 2023-04-19  1:02 UTC (permalink / raw)
  To: Greg KH; +Cc: rafael@kernel.org, linux-kernel@vger.kernel.org



> -----Original Message-----
> From: Greg KH <gregkh@linuxfoundation.org>
> Sent: Tuesday, April 18, 2023 8:32 PM
> To: Angus Chen <angus.chen@jaguarmicro.com>
> Cc: rafael@kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] driver core: auxiliary bus: No need to get auxdev->dev
> again
> 
> On Tue, Apr 18, 2023 at 08:24:06PM +0800, Angus Chen wrote:
> > Use dev variable directly.
> > No functional change intended.
> 
> Not intended, but is it really intended?  What does this line mean?
> 
> >
> > Signed-off-by: Angus Chen <angus.chen@jaguarmicro.com>
> > ---
> >  drivers/base/auxiliary.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/base/auxiliary.c b/drivers/base/auxiliary.c
> > index 4d4c2c8d26c4..ca1d044ff738 100644
> > --- a/drivers/base/auxiliary.c
> > +++ b/drivers/base/auxiliary.c
> > @@ -286,7 +286,7 @@ int auxiliary_device_init(struct auxiliary_device
> *auxdev)
> >  	}
> >
> >  	dev->bus = &auxiliary_bus_type;
> > -	device_initialize(&auxdev->dev);
> > +	device_initialize(dev);
> 
> While an interesting change, is it needed?  Why make it?
I mean it just a clean up.beacuse
struct device *dev = &auxdev->dev;
thanks.

> 
> thanks,
> 
> greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-04-19  1:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-18 12:24 [PATCH] driver core: auxiliary bus: No need to get auxdev->dev again Angus Chen
2023-04-18 12:32 ` Greg KH
2023-04-19  1:02   ` Angus Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox