diff mbox series

[2/2] drm/i915: Fix checkpatch warns in cursor code

Message ID 20201110175624.3524-2-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series [1/2] drm/i915: Introduce intel_cursor.c | expand

Commit Message

Ville Syrjälä Nov. 10, 2020, 5:56 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Eliminate checkpatch warnings from intel_cursor.c:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
WARNING: Possible repeated word: 'by'

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_cursor.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Lucas De Marchi Nov. 11, 2020, 12:20 a.m. UTC | #1
On Tue, Nov 10, 2020 at 07:56:24PM +0200, Ville Syrjälä wrote:
>From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
>Eliminate checkpatch warnings from intel_cursor.c:
>WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
>WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
>WARNING: Possible repeated word: 'by'

a comment in the commit message saying you moved to int instead of
unsigned int as suggested by the warning on purpose (since that's what
the function returns) would be good.


Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>

Lucas De Marchi

>
>Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>---
> drivers/gpu/drm/i915/display/intel_cursor.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
>diff --git a/drivers/gpu/drm/i915/display/intel_cursor.c b/drivers/gpu/drm/i915/display/intel_cursor.c
>index d307c58db8f1..2697cc9dedc9 100644
>--- a/drivers/gpu/drm/i915/display/intel_cursor.c
>+++ b/drivers/gpu/drm/i915/display/intel_cursor.c
>@@ -477,8 +477,8 @@ static void i9xx_update_cursor(struct intel_plane *plane,
> 	unsigned long irqflags;
>
> 	if (plane_state && plane_state->uapi.visible) {
>-		unsigned width = drm_rect_width(&plane_state->uapi.dst);
>-		unsigned height = drm_rect_height(&plane_state->uapi.dst);
>+		int width = drm_rect_width(&plane_state->uapi.dst);
>+		int height = drm_rect_height(&plane_state->uapi.dst);
>
> 		cntl = plane_state->ctl |
> 			i9xx_cursor_ctl_crtc(crtc_state);
>@@ -507,7 +507,7 @@ static void i9xx_update_cursor(struct intel_plane *plane,
> 	 * cursor that doesn't appear to move, or even change
> 	 * shape. Thus we always write CURBASE.
> 	 *
>-	 * The other registers are armed by by the CURBASE write
>+	 * The other registers are armed by the CURBASE write
> 	 * except when the plane is getting enabled at which time
> 	 * the CURCNTR write arms the update.
> 	 */
>-- 
>2.26.2
>
>_______________________________________________
>Intel-gfx mailing list
>Intel-gfx@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_cursor.c b/drivers/gpu/drm/i915/display/intel_cursor.c
index d307c58db8f1..2697cc9dedc9 100644
--- a/drivers/gpu/drm/i915/display/intel_cursor.c
+++ b/drivers/gpu/drm/i915/display/intel_cursor.c
@@ -477,8 +477,8 @@  static void i9xx_update_cursor(struct intel_plane *plane,
 	unsigned long irqflags;
 
 	if (plane_state && plane_state->uapi.visible) {
-		unsigned width = drm_rect_width(&plane_state->uapi.dst);
-		unsigned height = drm_rect_height(&plane_state->uapi.dst);
+		int width = drm_rect_width(&plane_state->uapi.dst);
+		int height = drm_rect_height(&plane_state->uapi.dst);
 
 		cntl = plane_state->ctl |
 			i9xx_cursor_ctl_crtc(crtc_state);
@@ -507,7 +507,7 @@  static void i9xx_update_cursor(struct intel_plane *plane,
 	 * cursor that doesn't appear to move, or even change
 	 * shape. Thus we always write CURBASE.
 	 *
-	 * The other registers are armed by by the CURBASE write
+	 * The other registers are armed by the CURBASE write
 	 * except when the plane is getting enabled at which time
 	 * the CURCNTR write arms the update.
 	 */