public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Petri Latvala <petri.latvala@intel.com>
To: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] lib/igt_params: Fix verifying of debugfs parameters
Date: Tue, 19 May 2020 15:22:04 +0300	[thread overview]
Message-ID: <20200519122204.GC9497@platvala-desk.ger.corp.intel.com> (raw)
In-Reply-To: <20200519113845.12446-1-juhapekka.heikkila@gmail.com>

On Tue, May 19, 2020 at 02:38:45PM +0300, Juha-Pekka Heikkila wrote:
> After found correct place in debugfs for parameters there
> was used wrong path for verifying existence of parameter
> which caused fallback path to be used.
> 
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> ---
>  lib/igt_params.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/lib/igt_params.c b/lib/igt_params.c
> index d8649dfd..1f6dc13f 100644
> --- a/lib/igt_params.c
> +++ b/lib/igt_params.c
> @@ -143,14 +143,14 @@ static int __igt_params_open(int device, char **outpath, const char *param)
>  
>  		devname = openat(dir, "name", O_RDONLY);
>  		igt_require_f(devname >= 0,
> -		              "Driver need to name itself in debugfs!");
> +			      "Driver need to name itself in debugfs!\n");
>  
>  		read(devname, searchname, sizeof(searchname));
>  		close(devname);
>  
>  		foundname = strtok_r(searchname, " ", &ctx);
>  		igt_require_f(foundname,
> -		              "Driver need to name itself in debugfs!");
> +			      "Driver need to name itself in debugfs!\n");
>  
>  		snprintf(searchpath, PATH_MAX, "%s_params", foundname);
>  		params = openat(dir, searchpath, O_RDONLY);
> @@ -162,8 +162,8 @@ static int __igt_params_open(int device, char **outpath, const char *param)
>  			if (param != NULL) {
>  				char filepath[PATH_MAX];
>  
> -				snprintf(filepath, PATH_MAX, "%s/%s",
> -					 debugfspath, param);
> +				snprintf(filepath, PATH_MAX, "%s/%s/%s",
> +					 debugfspath, searchpath, param);


Reviewed-by: Petri Latvala <petri.latvala@intel.com>



>  
>  				if (stat(filepath, &buffer) == 0) {
>  					if (outpath != NULL)
> -- 
> 2.26.0
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2020-05-19 12:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-19 11:38 [igt-dev] [PATCH i-g-t] lib/igt_params: Fix verifying of debugfs parameters Juha-Pekka Heikkila
2020-05-19 12:22 ` Petri Latvala [this message]
2020-05-19 12:36 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/igt_params: Fix verifying of debugfs parameters (rev2) Patchwork
2020-05-19 18:17 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2020-05-19 10:54 [igt-dev] [PATCH i-g-t] lib/igt_params: Fix verifying of debugfs parameters Juha-Pekka Heikkila
2020-05-19 11:00 ` Petri Latvala
2020-05-19 11:30   ` Juha-Pekka Heikkila

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=20200519122204.GC9497@platvala-desk.ger.corp.intel.com \
    --to=petri.latvala@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=juhapekka.heikkila@gmail.com \
    /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