2019-03-13 15:36:39

by Luca Ceresoli

[permalink] [raw]
Subject: [PATCH 1/2] drm/doc: fix kerneldoc syntax

The probe() reference renders incorrectly and without a link, fix it.

Also fix a typo reported by checkpatch in the context lines.

Signed-off-by: Luca Ceresoli <[email protected]>
---
drivers/gpu/drm/drm_drv.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index 381581b01d48..585f5d079046 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -264,13 +264,13 @@ void drm_minor_release(struct drm_minor *minor)
* DOC: driver instance overview
*
* A device instance for a drm driver is represented by &struct drm_device. This
- * is initialized with drm_dev_init(), usually from bus-specific ->probe()
- * callbacks implemented by the driver. The driver then needs to initialize all
- * the various subsystems for the drm device like memory management, vblank
- * handling, modesetting support and intial output configuration plus obviously
- * initialize all the corresponding hardware bits. Finally when everything is up
- * and running and ready for userspace the device instance can be published
- * using drm_dev_register().
+ * is initialized with drm_dev_init(), usually from bus-specific
+ * &drm_driver.probe() callbacks implemented by the driver. The driver then
+ * needs to initialize all the various subsystems for the drm device like memory
+ * management, vblank handling, modesetting support and initial output
+ * configuration plus obviously initialize all the corresponding hardware
+ * bits. Finally when everything is up and running and ready for userspace the
+ * device instance can be published using drm_dev_register().
*
* There is also deprecated support for initalizing device instances using
* bus-specific helpers and the &drm_driver.load callback. But due to
--
2.17.1



2019-03-13 15:36:49

by Luca Ceresoli

[permalink] [raw]
Subject: [PATCH 2/2] drm/doc: fix missing verb

Add a missing "be". While there, also fix the syntax for
struct drm_device.

Signed-off-by: Luca Ceresoli <[email protected]>
---
include/drm/drm_drv.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
index 570f9d03b2eb..ecbbcb281260 100644
--- a/include/drm/drm_drv.h
+++ b/include/drm/drm_drv.h
@@ -152,9 +152,9 @@ enum drm_driver_feature {
/**
* struct drm_driver - DRM driver structure
*
- * This structure represent the common code for a family of cards. There will
- * one drm_device for each card present in this family. It contains lots of
- * vfunc entries, and a pile of those probably should be moved to more
+ * This structure represent the common code for a family of cards. There will be
+ * one &struct drm_device for each card present in this family. It contains lots
+ * of vfunc entries, and a pile of those probably should be moved to more
* appropriate places like &drm_mode_config_funcs or into a new operations
* structure for GEM drivers.
*/
--
2.17.1


2019-03-14 10:42:31

by Daniel Vetter

[permalink] [raw]
Subject: Re: [PATCH 1/2] drm/doc: fix kerneldoc syntax

On Wed, Mar 13, 2019 at 04:35:36PM +0100, Luca Ceresoli wrote:
> The probe() reference renders incorrectly and without a link, fix it.
>
> Also fix a typo reported by checkpatch in the context lines.
>
> Signed-off-by: Luca Ceresoli <[email protected]>
> ---
> drivers/gpu/drm/drm_drv.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> index 381581b01d48..585f5d079046 100644
> --- a/drivers/gpu/drm/drm_drv.c
> +++ b/drivers/gpu/drm/drm_drv.c
> @@ -264,13 +264,13 @@ void drm_minor_release(struct drm_minor *minor)
> * DOC: driver instance overview
> *
> * A device instance for a drm driver is represented by &struct drm_device. This
> - * is initialized with drm_dev_init(), usually from bus-specific ->probe()
> - * callbacks implemented by the driver. The driver then needs to initialize all
> - * the various subsystems for the drm device like memory management, vblank
> - * handling, modesetting support and intial output configuration plus obviously
> - * initialize all the corresponding hardware bits. Finally when everything is up
> - * and running and ready for userspace the device instance can be published
> - * using drm_dev_register().
> + * is initialized with drm_dev_init(), usually from bus-specific
> + * &drm_driver.probe() callbacks implemented by the driver. The driver then

drm_driver.probe isn't a thing, and definitely not bus specific. What
could work here is:

"... instead of a bus specific probe function like e.g.
&pci_driver.probe or &platform_driver.probe."

When updating docs please make sure the rendering looks correct and the
hyperlinks all work.

Cheers, Daniel

> + * needs to initialize all the various subsystems for the drm device like memory
> + * management, vblank handling, modesetting support and initial output
> + * configuration plus obviously initialize all the corresponding hardware
> + * bits. Finally when everything is up and running and ready for userspace the
> + * device instance can be published using drm_dev_register().
> *
> * There is also deprecated support for initalizing device instances using
> * bus-specific helpers and the &drm_driver.load callback. But due to
> --
> 2.17.1
>

--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

2019-03-14 10:44:46

by Daniel Vetter

[permalink] [raw]
Subject: Re: [PATCH 2/2] drm/doc: fix missing verb

On Wed, Mar 13, 2019 at 04:35:37PM +0100, Luca Ceresoli wrote:
> Add a missing "be". While there, also fix the syntax for
> struct drm_device.
>
> Signed-off-by: Luca Ceresoli <[email protected]>

Queued for 5.2, thanks for your patch.
-Daniel

> ---
> include/drm/drm_drv.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
> index 570f9d03b2eb..ecbbcb281260 100644
> --- a/include/drm/drm_drv.h
> +++ b/include/drm/drm_drv.h
> @@ -152,9 +152,9 @@ enum drm_driver_feature {
> /**
> * struct drm_driver - DRM driver structure
> *
> - * This structure represent the common code for a family of cards. There will
> - * one drm_device for each card present in this family. It contains lots of
> - * vfunc entries, and a pile of those probably should be moved to more
> + * This structure represent the common code for a family of cards. There will be
> + * one &struct drm_device for each card present in this family. It contains lots
> + * of vfunc entries, and a pile of those probably should be moved to more
> * appropriate places like &drm_mode_config_funcs or into a new operations
> * structure for GEM drivers.
> */
> --
> 2.17.1
>

--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

2019-03-19 17:26:19

by Luca Ceresoli

[permalink] [raw]
Subject: Re: [PATCH 1/2] drm/doc: fix kerneldoc syntax

On 14/03/19 11:41, Daniel Vetter wrote:
> On Wed, Mar 13, 2019 at 04:35:36PM +0100, Luca Ceresoli wrote:
>> The probe() reference renders incorrectly and without a link, fix it.
>>
>> Also fix a typo reported by checkpatch in the context lines.
>>
>> Signed-off-by: Luca Ceresoli <[email protected]>
>> ---
>> drivers/gpu/drm/drm_drv.c | 14 +++++++-------
>> 1 file changed, 7 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
>> index 381581b01d48..585f5d079046 100644
>> --- a/drivers/gpu/drm/drm_drv.c
>> +++ b/drivers/gpu/drm/drm_drv.c
>> @@ -264,13 +264,13 @@ void drm_minor_release(struct drm_minor *minor)
>> * DOC: driver instance overview
>> *
>> * A device instance for a drm driver is represented by &struct drm_device. This
>> - * is initialized with drm_dev_init(), usually from bus-specific ->probe()
>> - * callbacks implemented by the driver. The driver then needs to initialize all
>> - * the various subsystems for the drm device like memory management, vblank
>> - * handling, modesetting support and intial output configuration plus obviously
>> - * initialize all the corresponding hardware bits. Finally when everything is up
>> - * and running and ready for userspace the device instance can be published
>> - * using drm_dev_register().
>> + * is initialized with drm_dev_init(), usually from bus-specific
>> + * &drm_driver.probe() callbacks implemented by the driver. The driver then
>
> drm_driver.probe isn't a thing, and definitely not bus specific. What
> could work here is:

You're obviously right, thanks for taking the time to correct me.

> "... instead of a bus specific probe function like e.g.
> &pci_driver.probe or &platform_driver.probe."

Uhm, these don't want to render as hyperlinks. I guess it's because
these structs are not kernel-doc-annotated, nor are their .probe
methods. Probably not worth just doing that for the sake of this humble
patch.

Is it OK if I resend with just the basic syntax fix:
- ... bus-specific ->probe()
+ ... bus-specific probe()
?

Thanks,
--
Luca