public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Garrett Cooper <yanegomi@gmail.com>
To: aelder@sgi.com
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH 3/3, v2] ltp: fix warnings in "fsstress.c"
Date: Mon, 11 Apr 2011 23:22:05 -0700	[thread overview]
Message-ID: <BANLkTimqaMit_JMGLvDJFzsoJZMQhf0JSQ@mail.gmail.com> (raw)
In-Reply-To: <1302546720.2580.29.camel@doink>

On Mon, Apr 11, 2011 at 11:32 AM, Alex Elder <aelder@sgi.com> wrote:
> Fix remaining warnings in "testcases/kernel/fs/fsstress/fsstress.c".
> Three of them are due to mismatches between fprintf() conversion
> specifications and the variables being formatted.  Fix these by
> casting the variables to the right type.
>
> Two others are due to the use of a __uint64_t local variable to
> represent a value of type __u64 (which evidently can be defined
> differently in some environments).  Fix these by using the exact
> matching type in the cases that produce the warning messages.
>
> Updated to address the concern raised by Garrett Cooper about the
> use of types that are not identical to what's used in the XFS
> ioctl() interface in the kernel.  Also added memset() calls so we're
> sure no garbage resides in data structures passed between user space
> and the kernel.

1. Please use sizeof() instead of bareword sizeof.
2. I'm not sure if this is necessarily LKML style (the code I've
sampled in the mainline kernel do this however), but casts don't
require spurious spaces in FreeBSD for instance, i.e.

    foo = (void*)bar;

instead of

    foo = (void*) bar;

Cheers,
-Garrett

------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2011-04-12  6:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-11 18:32 [LTP] [PATCH 3/3, v2] ltp: fix warnings in "fsstress.c" Alex Elder
2011-04-12  6:22 ` Garrett Cooper [this message]
2011-04-13 12:04   ` Cyril Hrubis

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=BANLkTimqaMit_JMGLvDJFzsoJZMQhf0JSQ@mail.gmail.com \
    --to=yanegomi@gmail.com \
    --cc=aelder@sgi.com \
    --cc=ltp-list@lists.sourceforge.net \
    /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