diff mbox series

drm/drv: Make use of local variable driver in drm_dev_register()

Message ID 20221219183147.1639399-1-u.kleine-koenig@pengutronix.de (mailing list archive)
State Accepted, archived
Commit 5f70ba0243a9
Headers show
Series drm/drv: Make use of local variable driver in drm_dev_register() | expand

Commit Message

Uwe Kleine-König Dec. 19, 2022, 6:31 p.m. UTC
There is a local variable that contains dev->driver. Make use of it
instead of "open coding" it.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpu/drm/drm_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


base-commit: 678e5b2258e871b22fe8c26edac2723feb852a47

Comments

Thomas Zimmermann Dec. 20, 2022, 7:24 a.m. UTC | #1
Hi

Am 19.12.22 um 19:31 schrieb Uwe Kleine-König:
> There is a local variable that contains dev->driver. Make use of it
> instead of "open coding" it.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Added to drm-misc-next. Thanks a lot.

Best regards
Thomas

> ---
>   drivers/gpu/drm/drm_drv.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> index 203bf8d6c34c..3cc8e8111d16 100644
> --- a/drivers/gpu/drm/drm_drv.c
> +++ b/drivers/gpu/drm/drm_drv.c
> @@ -889,8 +889,8 @@ int drm_dev_register(struct drm_device *dev, unsigned long flags)
>   
>   	dev->registered = true;
>   
> -	if (dev->driver->load) {
> -		ret = dev->driver->load(dev, flags);
> +	if (driver->load) {
> +		ret = driver->load(dev, flags);
>   		if (ret)
>   			goto err_minors;
>   	}
> 
> base-commit: 678e5b2258e871b22fe8c26edac2723feb852a47
Daniel Vetter Jan. 5, 2023, 2:33 p.m. UTC | #2
On Tue, Dec 20, 2022 at 08:24:18AM +0100, Thomas Zimmermann wrote:
> Hi
> 
> Am 19.12.22 um 19:31 schrieb Uwe Kleine-König:
> > There is a local variable that contains dev->driver. Make use of it
> > instead of "open coding" it.
> > 
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> Added to drm-misc-next. Thanks a lot.

Given that Uwe has a pile of drm commits all over, time for drm-misc
commit rights?

https://drm.pages.freedesktop.org/maintainer-tools/commit-access.html#drm-misc
-Daniel

> 
> Best regards
> Thomas
> 
> > ---
> >   drivers/gpu/drm/drm_drv.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> > index 203bf8d6c34c..3cc8e8111d16 100644
> > --- a/drivers/gpu/drm/drm_drv.c
> > +++ b/drivers/gpu/drm/drm_drv.c
> > @@ -889,8 +889,8 @@ int drm_dev_register(struct drm_device *dev, unsigned long flags)
> >   	dev->registered = true;
> > -	if (dev->driver->load) {
> > -		ret = dev->driver->load(dev, flags);
> > +	if (driver->load) {
> > +		ret = driver->load(dev, flags);
> >   		if (ret)
> >   			goto err_minors;
> >   	}
> > 
> > base-commit: 678e5b2258e871b22fe8c26edac2723feb852a47
> 
> -- 
> Thomas Zimmermann
> Graphics Driver Developer
> SUSE Software Solutions Germany GmbH
> Maxfeldstr. 5, 90409 Nürnberg, Germany
> (HRB 36809, AG Nürnberg)
> Geschäftsführer: Ivo Totev
Uwe Kleine-König Jan. 5, 2023, 8:16 p.m. UTC | #3
Hello Daniel,

On Thu, Jan 05, 2023 at 03:33:13PM +0100, Daniel Vetter wrote:
> On Tue, Dec 20, 2022 at 08:24:18AM +0100, Thomas Zimmermann wrote:
> > Hi
> > 
> > Am 19.12.22 um 19:31 schrieb Uwe Kleine-König:
> > > There is a local variable that contains dev->driver. Make use of it
> > > instead of "open coding" it.
> > > 
> > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > 
> > Added to drm-misc-next. Thanks a lot.
> 
> Given that Uwe has a pile of drm commits all over, time for drm-misc
> commit rights?

I feel honored, but if you ask me, that's not necessary/sensible. At
least up to now my patches are more or less drive-by changes and letting
them go through someone else with commit access is fine for me. There is
no driver in the drm area I feel responsible for.

Or is this about reducing maintainer load on your end?

Best regards
Uwe
Daniel Vetter Jan. 6, 2023, 6:57 p.m. UTC | #4
On Thu, Jan 05, 2023 at 09:16:36PM +0100, Uwe Kleine-König wrote:
> Hello Daniel,
> 
> On Thu, Jan 05, 2023 at 03:33:13PM +0100, Daniel Vetter wrote:
> > On Tue, Dec 20, 2022 at 08:24:18AM +0100, Thomas Zimmermann wrote:
> > > Hi
> > > 
> > > Am 19.12.22 um 19:31 schrieb Uwe Kleine-König:
> > > > There is a local variable that contains dev->driver. Make use of it
> > > > instead of "open coding" it.
> > > > 
> > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > 
> > > Added to drm-misc-next. Thanks a lot.
> > 
> > Given that Uwe has a pile of drm commits all over, time for drm-misc
> > commit rights?
> 
> I feel honored, but if you ask me, that's not necessary/sensible. At
> least up to now my patches are more or less drive-by changes and letting
> them go through someone else with commit access is fine for me. There is
> no driver in the drm area I feel responsible for.
> 
> Or is this about reducing maintainer load on your end?

Yes :-)

Essentially it gives you the keys to drive your own patches, all you have
to do is find someone to review them for you (trading review works best).
And since all regulars have commit rights there's otherwise big confusion
whether patches should be pushed or not. Which means they routinely fall
through cracks and need extra attention from everyone involved.

Also note that commit rights does not mean you assume maintainer
responsibilities for anything (ofc your review is appreciated where you
can help out), that's still separate and tracked in MAINTAINERS as usual.
-Daniel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index 203bf8d6c34c..3cc8e8111d16 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -889,8 +889,8 @@  int drm_dev_register(struct drm_device *dev, unsigned long flags)
 
 	dev->registered = true;
 
-	if (dev->driver->load) {
-		ret = dev->driver->load(dev, flags);
+	if (driver->load) {
+		ret = driver->load(dev, flags);
 		if (ret)
 			goto err_minors;
 	}