All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] i915: Convert to use match_string() helper
@ 2018-05-03 18:17 Andy Shevchenko
  2018-05-03 18:46 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andy Shevchenko @ 2018-05-03 18:17 UTC (permalink / raw)
  To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, intel-gfx,
	David Airlie, dri-devel
  Cc: Andy Shevchenko

The new helper returns index of the matching string in an array.
We are going to use it here.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pipe_crc.c | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pipe_crc.c b/drivers/gpu/drm/i915/intel_pipe_crc.c
index 4f367c16e9e5..39a4e4edda07 100644
--- a/drivers/gpu/drm/i915/intel_pipe_crc.c
+++ b/drivers/gpu/drm/i915/intel_pipe_crc.c
@@ -766,13 +766,12 @@ display_crc_ctl_parse_object(const char *buf, enum intel_pipe_crc_object *o)
 {
 	int i;
 
-	for (i = 0; i < ARRAY_SIZE(pipe_crc_objects); i++)
-		if (!strcmp(buf, pipe_crc_objects[i])) {
-			*o = i;
-			return 0;
-		}
+	i = match_string(pipe_crc_objects, ARRAY_SIZE(pipe_crc_objects), buf);
+	if (i < 0)
+		return i;
 
-	return -EINVAL;
+	*o = i;
+	return 0;
 }
 
 static int display_crc_ctl_parse_pipe(struct drm_i915_private *dev_priv,
@@ -798,13 +797,12 @@ display_crc_ctl_parse_source(const char *buf, enum intel_pipe_crc_source *s)
 		return 0;
 	}
 
-	for (i = 0; i < ARRAY_SIZE(pipe_crc_sources); i++)
-		if (!strcmp(buf, pipe_crc_sources[i])) {
-			*s = i;
-			return 0;
-		}
+	i = match_string(pipe_crc_sources, ARRAY_SIZE(pipe_crc_sources), buf);
+	if (i < 0)
+		return i;
 
-	return -EINVAL;
+	*s = i;
+	return 0;
 }
 
 static int display_crc_ctl_parse(struct drm_i915_private *dev_priv,
-- 
2.17.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✓ Fi.CI.BAT: success for i915: Convert to use match_string() helper
  2018-05-03 18:17 [PATCH v1] i915: Convert to use match_string() helper Andy Shevchenko
@ 2018-05-03 18:46 ` Patchwork
  2018-05-03 22:55 ` ✓ Fi.CI.IGT: " Patchwork
  2018-05-04  7:29 ` [PATCH v1] " Jani Nikula
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2018-05-03 18:46 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: intel-gfx

== Series Details ==

Series: i915: Convert to use match_string() helper
URL   : https://patchwork.freedesktop.org/series/42654/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4134 -> Patchwork_8901 =

== Summary - SUCCESS ==

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/42654/revisions/1/mbox/

== Known issues ==

  Here are the changes found in Patchwork_8901 that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@gem_exec_suspend@basic-s3:
      fi-ivb-3520m:       PASS -> DMESG-WARN (fdo#106084)
      fi-skl-guc:         PASS -> FAIL (fdo#105900, fdo#104699) +1

    igt@kms_frontbuffer_tracking@basic:
      fi-hsw-4200u:       PASS -> DMESG-FAIL (fdo#102614)
      fi-hsw-peppy:       PASS -> DMESG-FAIL (fdo#102614, fdo#106103)

    igt@prime_vgem@basic-fence-flip:
      fi-ilk-650:         PASS -> FAIL (fdo#104008)

    
    ==== Possible fixes ====

    igt@drv_module_reload@basic-no-display:
      fi-bsw-n3050:       DMESG-FAIL (fdo#106373) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-ivb-3520m:       DMESG-WARN (fdo#106084) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
      fi-cnl-y3:          DMESG-WARN (fdo#104951) -> PASS

    
  fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
  fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
  fdo#104699 https://bugs.freedesktop.org/show_bug.cgi?id=104699
  fdo#104951 https://bugs.freedesktop.org/show_bug.cgi?id=104951
  fdo#105900 https://bugs.freedesktop.org/show_bug.cgi?id=105900
  fdo#106084 https://bugs.freedesktop.org/show_bug.cgi?id=106084
  fdo#106103 https://bugs.freedesktop.org/show_bug.cgi?id=106103
  fdo#106373 https://bugs.freedesktop.org/show_bug.cgi?id=106373


== Participating hosts (40 -> 37) ==

  Missing    (3): fi-ctg-p8600 fi-ilk-m540 fi-skl-6700hq 


== Build changes ==

    * Linux: CI_DRM_4134 -> Patchwork_8901

  CI_DRM_4134: 3fc6b5905d2bac264ced33d06f0cb2245c62b83f @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4460: f772d9a910130b3aec8efa4f09ed723618fae656 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_8901: b05131ccedac99c2bebc2833d18df9d3efcbad36 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4460: f74d92e704849610364b4474a2c67ea2008c14e0 @ git://anongit.freedesktop.org/piglit


== Linux commits ==

b05131ccedac i915: Convert to use match_string() helper

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8901/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✓ Fi.CI.IGT: success for i915: Convert to use match_string() helper
  2018-05-03 18:17 [PATCH v1] i915: Convert to use match_string() helper Andy Shevchenko
  2018-05-03 18:46 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-05-03 22:55 ` Patchwork
  2018-05-04  7:29 ` [PATCH v1] " Jani Nikula
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2018-05-03 22:55 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: intel-gfx

== Series Details ==

Series: i915: Convert to use match_string() helper
URL   : https://patchwork.freedesktop.org/series/42654/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4134_full -> Patchwork_8901_full =

== Summary - WARNING ==

  Minor unknown changes coming with Patchwork_8901_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_8901_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/42654/revisions/1/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in Patchwork_8901_full:

  === IGT changes ===

    ==== Warnings ====

    igt@gem_mocs_settings@mocs-rc6-blt:
      shard-kbl:          PASS -> SKIP +1

    
== Known issues ==

  Here are the changes found in Patchwork_8901_full that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@gem_tiled_blits@normal:
      shard-apl:          PASS -> INCOMPLETE (fdo#103927)

    igt@kms_flip@2x-plain-flip-fb-recreate-interruptible:
      shard-hsw:          PASS -> FAIL (fdo#100368)

    igt@kms_flip@flip-vs-absolute-wf_vblank-interruptible:
      shard-glk:          PASS -> FAIL (fdo#100368)

    igt@kms_flip@flip-vs-expired-vblank:
      shard-glk:          PASS -> FAIL (fdo#102887)

    igt@kms_plane_scaling@pipe-b-scaler-with-pixel-format:
      shard-kbl:          PASS -> DMESG-WARN (fdo#103558, fdo#105602) +1

    igt@kms_rotation_crc@sprite-rotation-270:
      shard-apl:          PASS -> FAIL (fdo#103925)

    
    ==== Possible fixes ====

    igt@gem_ppgtt@blt-vs-render-ctxn:
      shard-kbl:          INCOMPLETE (fdo#106023, fdo#103665) -> PASS

    igt@kms_flip@2x-modeset-vs-vblank-race:
      shard-hsw:          FAIL (fdo#103060) -> PASS

    igt@kms_flip@flip-vs-expired-vblank:
      shard-hsw:          FAIL (fdo#102887) -> PASS

    igt@kms_flip@flip-vs-expired-vblank-interruptible:
      shard-apl:          FAIL (fdo#102887, fdo#105363) -> PASS

    igt@kms_flip@wf_vblank-ts-check-interruptible:
      shard-glk:          FAIL (fdo#105312) -> PASS

    igt@kms_rotation_crc@primary-rotation-270:
      shard-apl:          FAIL (fdo#103925) -> PASS

    igt@kms_setmode@basic:
      shard-glk:          FAIL (fdo#99912) -> PASS
      shard-kbl:          FAIL (fdo#99912) -> PASS

    
  fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
  fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
  fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
  fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#105312 https://bugs.freedesktop.org/show_bug.cgi?id=105312
  fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
  fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
  fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
  fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912


== Participating hosts (6 -> 6) ==

  No changes in participating hosts


== Build changes ==

    * Linux: CI_DRM_4134 -> Patchwork_8901

  CI_DRM_4134: 3fc6b5905d2bac264ced33d06f0cb2245c62b83f @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4460: f772d9a910130b3aec8efa4f09ed723618fae656 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_8901: b05131ccedac99c2bebc2833d18df9d3efcbad36 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4460: f74d92e704849610364b4474a2c67ea2008c14e0 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8901/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v1] i915: Convert to use match_string() helper
  2018-05-03 18:17 [PATCH v1] i915: Convert to use match_string() helper Andy Shevchenko
  2018-05-03 18:46 ` ✓ Fi.CI.BAT: success for " Patchwork
  2018-05-03 22:55 ` ✓ Fi.CI.IGT: " Patchwork
@ 2018-05-04  7:29 ` Jani Nikula
  2 siblings, 0 replies; 4+ messages in thread
From: Jani Nikula @ 2018-05-04  7:29 UTC (permalink / raw)
  To: Joonas Lahtinen, Rodrigo Vivi, intel-gfx, David Airlie, dri-devel
  Cc: Andy Shevchenko

On Thu, 03 May 2018, Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> The new helper returns index of the matching string in an array.
> We are going to use it here.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Pushed to drm-intel-next-queued, thanks for the patch.

BR,
Jani.

> ---
>  drivers/gpu/drm/i915/intel_pipe_crc.c | 22 ++++++++++------------
>  1 file changed, 10 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pipe_crc.c b/drivers/gpu/drm/i915/intel_pipe_crc.c
> index 4f367c16e9e5..39a4e4edda07 100644
> --- a/drivers/gpu/drm/i915/intel_pipe_crc.c
> +++ b/drivers/gpu/drm/i915/intel_pipe_crc.c
> @@ -766,13 +766,12 @@ display_crc_ctl_parse_object(const char *buf, enum intel_pipe_crc_object *o)
>  {
>  	int i;
>  
> -	for (i = 0; i < ARRAY_SIZE(pipe_crc_objects); i++)
> -		if (!strcmp(buf, pipe_crc_objects[i])) {
> -			*o = i;
> -			return 0;
> -		}
> +	i = match_string(pipe_crc_objects, ARRAY_SIZE(pipe_crc_objects), buf);
> +	if (i < 0)
> +		return i;
>  
> -	return -EINVAL;
> +	*o = i;
> +	return 0;
>  }
>  
>  static int display_crc_ctl_parse_pipe(struct drm_i915_private *dev_priv,
> @@ -798,13 +797,12 @@ display_crc_ctl_parse_source(const char *buf, enum intel_pipe_crc_source *s)
>  		return 0;
>  	}
>  
> -	for (i = 0; i < ARRAY_SIZE(pipe_crc_sources); i++)
> -		if (!strcmp(buf, pipe_crc_sources[i])) {
> -			*s = i;
> -			return 0;
> -		}
> +	i = match_string(pipe_crc_sources, ARRAY_SIZE(pipe_crc_sources), buf);
> +	if (i < 0)
> +		return i;
>  
> -	return -EINVAL;
> +	*s = i;
> +	return 0;
>  }
>  
>  static int display_crc_ctl_parse(struct drm_i915_private *dev_priv,

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2018-05-04  7:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-03 18:17 [PATCH v1] i915: Convert to use match_string() helper Andy Shevchenko
2018-05-03 18:46 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-05-03 22:55 ` ✓ Fi.CI.IGT: " Patchwork
2018-05-04  7:29 ` [PATCH v1] " Jani Nikula

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.