drm: Remove 80-column line in drm_mode_object.c
Subsystems (2)
PATCH 1/1 drm: Remove 80-column line in drm_mode_object.c
Add a new variable to make the drm_mode_object comparison before idr_alloc and decrease line size.
--- drivers/gpu/drm/drm_mode_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_mode_object.c +2 -1
@@ -36,9 +36,10 @@ int __drm_mode_object_add(struct drm_device *dev, struct drm_mode_object *obj, void (*obj_free_cb)(struct kref *kref)) {int ret; +struct drm_mode_object *obj_tmp = register_obj ? obj :NULL ;mutex_lock (&dev->mode_config.idr_mutex); - ret =idr_alloc (&dev->mode_config.crtc_idr, register_obj ? obj :NULL ,1 ,0 ,GFP_KERNEL ); + ret =idr_alloc (&dev->mode_config.crtc_idr, obj_tmp,1 ,0 ,GFP_KERNEL );if (ret >=0 ) {/* * Set up the object linking under the protection of the idr
Signature · 1 line
2.19.1
Quoted 13 lines · Shayenne da Luz Moura
Add a new variable to make the
drm_mode_objectcomparison beforeidr_allocand decrease line size.Signed-off-by Shayenne da Luz Moura <[email protected]>--- drivers/gpu/drm/drm_mode_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/drm_mode_object.c +0
-0
drivers/gpu/drm/drm_mode_object.c int __drm_mode_object_add(struct drm_device *dev, struct drm_mode_object *obj, · line 42
Quoted 8 lines
drivers/gpu/drm/drm_mode_object.c +2
-1@@ -36,9 +36,10 @@ int __drm_mode_object_add(struct drm_device *dev, struct drm_mode_object *obj, void (*obj_free_cb)(struct kref *kref)) {int ret; +struct drm_mode_object *obj_tmp = register_obj ? obj :NULL ;mutex_lock (&dev->mode_config.idr_mutex); - ret =idr_alloc (&dev->mode_config.crtc_idr, register_obj ? obj :NULL ,1 ,0 ,GFP_KERNEL ); + ret =idr_alloc (&dev->mode_config.crtc_idr, obj_tmp,1 ,0 ,GFP_KERNEL );
Please don't send checkpatch "fixes" to adhere to the 80-column rule. Or at least use --max-line-length=100 or something to look for worse offenders than this.
And if you insist, please just add a newline and proper indentation after "NULL," instead of adding a temporary variable.
BR,
Jani.
Quoted 3 lines
drivers/gpu/drm/drm_mode_object.c +0
-0if (ret >=0 ) {/* * Set up the object linking under the protection of the idr
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Quoted 28 lines · Jani Nikula
Quoted 13 lines · Shayenne da Luz Moura
Add a new variable to make the
drm_mode_objectcomparison beforeidr_allocand decrease line size.Signed-off-by Shayenne da Luz Moura <[email protected]>--- drivers/gpu/drm/drm_mode_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/drm_mode_object.c +0
-0drivers/gpu/drm/drm_mode_object.c int __drm_mode_object_add(struct drm_device *dev, struct drm_mode_object *obj, · line 42
Quoted 8 lines
drivers/gpu/drm/drm_mode_object.c +2
-1@@ -36,9 +36,10 @@ int __drm_mode_object_add(struct drm_device *dev, struct drm_mode_object *obj, void (*obj_free_cb)(struct kref *kref)) {int ret; +struct drm_mode_object *obj_tmp = register_obj ? obj :NULL ;mutex_lock (&dev->mode_config.idr_mutex); - ret =idr_alloc (&dev->mode_config.crtc_idr, register_obj ? obj :NULL ,1 ,0 ,GFP_KERNEL ); + ret =idr_alloc (&dev->mode_config.crtc_idr, obj_tmp,1 ,0 ,GFP_KERNEL );Please don't send checkpatch "fixes" to adhere to the 80-column rule. Or at least use --max-line-length=100 or something to look for worse offenders than this.
Quoted 2 lines
And if you insist, please just add a newline and proper indentation after "NULL," instead of adding a temporary variable.
Breaking the line after NULL, seems reasonable, I'd be happy to merge that. -Daniel
Quoted 18 lines
BR,
Jani.drivers/gpu/drm/drm_mode_object.c int __drm_mode_object_add(struct drm_device *dev, struct drm_mode_object *obj, · line 45
Quoted 3 lines
drivers/gpu/drm/drm_mode_object.c +0
-0if (ret >=0 ) {/* * Set up the object linking under the protection of the idr --
Jani Nikula, Intel Open Source Graphics Center--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/87a7mudu8t.fsf%40intel.com.
For more options, visit https://groups.google.com/d/optout.
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 29 lines · Daniel Vetter
Quoted 28 lines · Jani Nikula
Quoted 13 lines · Shayenne da Luz Moura
Add a new variable to make the
drm_mode_objectcomparison beforeidr_allocand decrease line size.Signed-off-by Shayenne da Luz Moura <[email protected]>--- drivers/gpu/drm/drm_mode_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/drm_mode_object.c +0
-0drivers/gpu/drm/drm_mode_object.c int __drm_mode_object_add(struct drm_device *dev, struct drm_mode_object *obj, · line 42
Quoted 8 lines
drivers/gpu/drm/drm_mode_object.c +2
-1@@ -36,9 +36,10 @@ int __drm_mode_object_add(struct drm_device *dev, struct drm_mode_object *obj, void (*obj_free_cb)(struct kref *kref)) {int ret; +struct drm_mode_object *obj_tmp = register_obj ? obj :NULL ;mutex_lock (&dev->mode_config.idr_mutex); - ret =idr_alloc (&dev->mode_config.crtc_idr, register_obj ? obj :NULL ,1 ,0 ,GFP_KERNEL ); + ret =idr_alloc (&dev->mode_config.crtc_idr, obj_tmp,1 ,0 ,GFP_KERNEL );Please don't send checkpatch "fixes" to adhere to the 80-column rule. Or at least use --max-line-length=100 or something to look for worse offenders than this.
Quoted 5 lines
Quoted 2 lines
And if you insist, please just add a newline and proper indentation after "NULL," instead of adding a temporary variable.
Breaking the line after NULL, seems reasonable, I'd be happy to merge that. -Daniel
Okay, I will send a new version.
Thank you!
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel