All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Tulak <jtulak@redhat.com>
To: linux-xfs@vger.kernel.org
Cc: "Luis R. Rodriguez" <mcgrof@kernel.org>,
	Eric Sandeen <sandeen@sandeen.net>, Jan Tulak <jtulak@redhat.com>
Subject: Re: [RFC PATCH 1/2] mkfs: unify numeric types of main variables in main()
Date: Thu, 6 Apr 2017 17:02:49 +0200	[thread overview]
Message-ID: <CACj3i71p17no6p8=A9ys_8-w8G7mw-4jjSP4oMAfcOFUeTV7xw@mail.gmail.com> (raw)
In-Reply-To: <20170406144139.20284-1-jtulak@redhat.com>

On Thu, Apr 6, 2017 at 4:41 PM, Jan Tulak <jtulak@redhat.com> wrote:
> Followup of my "[xfsprogs] Do we need so many data types for user input?" email.
>
> In the past, when mkfs was first written, it used atoi and
> similar calls, so the variables were ints. However, the situation moved
> since then and in course of the time, mkfs began to use other types too.
>
> Clean and unify it. We don't need negative values anywhere in the code and
> some numbers has to be 64bit. Thus, uint64 is the best candidate as the target
> type.
>
> This patch changes variables declared at the beginning of main() + block/sectorsize, making only minimal changes. The following patch cleans some now-unnecessary type casts.
>
> It would be nice to change types in some of the structures too, but
> this might lead to changes outside of mkfs, so I'm skipping them for
> this moment to keep it simple.
>
> Signed-off-by: Jan Tulak <jtulak@redhat.com>
> ---
>  mkfs/xfs_mkfs.c | 184 ++++++++++++++++++++++++++++----------------------------
>  1 file changed, 92 insertions(+), 92 deletions(-)
>

Public git tree for these changes:
https://github.com/jtulak/xfsprogs-dev/tree/github-uint

(It includes the other two small patches I submitted today too).

Jan

-- 
Jan Tulak
jtulak@redhat.com / jan@tulak.me

  parent reply	other threads:[~2017-04-06 15:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-06 14:41 [RFC PATCH 1/2] mkfs: unify numeric types of main variables in main() Jan Tulak
2017-04-06 14:41 ` [RFC PATCH 2/2] mkfs: remove long long type casts Jan Tulak
2017-04-06 15:02 ` Jan Tulak [this message]
2017-04-06 19:46 ` [RFC PATCH 1/2] mkfs: unify numeric types of main variables in main() Darrick J. Wong
2017-04-06 20:13 ` Eric Sandeen
2017-04-07  1:50 ` Dave Chinner
2017-04-07 13:17   ` Jan Tulak
2017-04-08 23:59     ` Dave Chinner
2017-04-10  8:42       ` Jan Tulak
2017-04-13  9:41         ` Jan Tulak

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='CACj3i71p17no6p8=A9ys_8-w8G7mw-4jjSP4oMAfcOFUeTV7xw@mail.gmail.com' \
    --to=jtulak@redhat.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=sandeen@sandeen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.