DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Pattan, Reshma" <reshma.pattan@intel.com>
To: Markus Theil <markus.theil@tu-ilmenau.de>,
	"Hunt, David" <david.hunt@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"Theil, Markus" <markus.theil@secunet.com>
Subject: RE: [PATCH] power: fix pstate number parsing
Date: Wed, 12 Oct 2022 12:25:22 +0000	[thread overview]
Message-ID: <BYAPR11MB3366DE72CBD6F9CC701F2C51FF229@BYAPR11MB3366.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20221012113342.7931-1-markus.theil@tu-ilmenau.de>



> -----Original Message-----
> From: Markus Theil <markus.theil@tu-ilmenau.de>


> +#include <ctype.h>

This is not needed right.

>  #include <stdio.h>
>  #include <stdlib.h>
>  #include <fcntl.h>
> @@ -96,7 +97,7 @@ power_read_turbo_pct(uint64_t *outVal)
> 
>  	errno = 0;
>  	*outVal = (uint64_t) strtol(val, &endptr, 10);
> -	if (*endptr != 0 || errno != 0) {
> +	if (errno != 0 || (*endptr != 0 && *endptr != '\n')) {

I encountered today that power library initialization failed and the reason is this \n check. 
This fix fixes the issue.

So if you are sending the next version be removing the above mentioned header file, please keep my Review and Ack tags in next version.

Reviewed-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>



  reply	other threads:[~2022-10-12 12:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-12 11:33 Markus Theil
2022-10-12 12:25 ` Pattan, Reshma [this message]
2022-10-26 21:33   ` Thomas Monjalon
2022-10-12 12:36 ` [PATCH v2] " Markus Theil
2022-10-26 21:35   ` Thomas Monjalon

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=BYAPR11MB3366DE72CBD6F9CC701F2C51FF229@BYAPR11MB3366.namprd11.prod.outlook.com \
    --to=reshma.pattan@intel.com \
    --cc=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=markus.theil@secunet.com \
    --cc=markus.theil@tu-ilmenau.de \
    /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;
as well as URLs for NNTP newsgroup(s).