Flexible I/O Tester development
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: kusumi.tomohiro@gmail.com
Cc: fio@vger.kernel.org, Tomohiro Kusumi <tkusumi@tuxera.com>
Subject: Re: [PATCH 1/3] Be more verbose on endianness detection failure
Date: Mon, 13 Feb 2017 08:41:20 -0700	[thread overview]
Message-ID: <20170213154120.GA4585@kernel.dk> (raw)
In-Reply-To: <20170211142854.23620-1-tkusumi@tuxera.com>

On Sat, Feb 11 2017, kusumi.tomohiro@gmail.com wrote:
> From: Tomohiro Kusumi <tkusumi@tuxera.com>
> 
> Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
> ---
>  libfio.c | 29 ++++++++++++++++++++++++-----
>  1 file changed, 24 insertions(+), 5 deletions(-)
> 
> diff --git a/libfio.c b/libfio.c
> index 960daf6..096efe2 100644
> --- a/libfio.c
> +++ b/libfio.c
> @@ -327,16 +327,16 @@ static int endian_check(void)
>  
>  #if defined(CONFIG_LITTLE_ENDIAN)
>  	if (be)
> -		return 1;
> +		return 1; /* should be little */
>  #elif defined(CONFIG_BIG_ENDIAN)
>  	if (le)
> -		return 1;
> +		return 2; /* should be big */

I think this deserves and enum. That also enables the compiler to check
if the below switch covers all the potential values.

-- 
Jens Axboe



      parent reply	other threads:[~2017-02-13 15:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-11 14:28 [PATCH 1/3] Be more verbose on endianness detection failure kusumi.tomohiro
2017-02-11 14:28 ` [PATCH 2/3] Add a comment to clarify 941bda94 kusumi.tomohiro
2017-02-13 15:41   ` Jens Axboe
2017-02-11 14:28 ` [PATCH 3/3] steadystate: Use calloc(3) kusumi.tomohiro
2017-02-13 15:41 ` Jens Axboe [this message]

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=20170213154120.GA4585@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    --cc=kusumi.tomohiro@gmail.com \
    --cc=tkusumi@tuxera.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