dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Gustavo Padovan <gustavo@padovan.org>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Sean Paul <seanpaul@chromium.org>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v1] drm: panel-orientation-quirks: Convert to use match_string() helper
Date: Mon, 7 May 2018 10:12:47 +0200	[thread overview]
Message-ID: <d997a4eb-78ee-650c-140d-6b8d6c36f6d0@redhat.com> (raw)
In-Reply-To: <20180503184119.22355-1-andriy.shevchenko@linux.intel.com>

Hi,

On 03-05-18 20:41, Andy Shevchenko 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>

Thanks, LGTM:

Acked-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans



> ---
>   drivers/gpu/drm/drm_panel_orientation_quirks.c | 7 +++----
>   1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_panel_orientation_quirks.c b/drivers/gpu/drm/drm_panel_orientation_quirks.c
> index caebddda8bce..fe9c6c731e87 100644
> --- a/drivers/gpu/drm/drm_panel_orientation_quirks.c
> +++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c
> @@ -172,10 +172,9 @@ int drm_get_panel_orientation_quirk(int width, int height)
>   		if (!bios_date)
>   			continue;
>   
> -		for (i = 0; data->bios_dates[i]; i++) {
> -			if (!strcmp(data->bios_dates[i], bios_date))
> -				return data->orientation;
> -		}
> +		i = match_string(data->bios_dates, -1, bios_date);
> +		if (i >= 0)
> +			return data->orientation;
>   	}
>   
>   	return DRM_MODE_PANEL_ORIENTATION_UNKNOWN;
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2018-05-07  8:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-03 18:41 [PATCH v1] drm: panel-orientation-quirks: Convert to use match_string() helper Andy Shevchenko
2018-05-03 19:16 ` Sean Paul
2018-05-07  8:12 ` Hans de Goede [this message]
2018-05-10 19:03   ` Sean Paul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d997a4eb-78ee-650c-140d-6b8d6c36f6d0@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo@padovan.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=seanpaul@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox