linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs <linux-xfs@vger.kernel.org>, Eric Sandeen <sandeen@redhat.com>
Subject: Re: [PATCH 1/3] xfs: remove double-underscore integer types
Date: Wed, 17 May 2017 23:21:20 -0700	[thread overview]
Message-ID: <20170518062120.GX4519@birch.djwong.org> (raw)
In-Reply-To: <20170518060158.GP17542@dastard>

On Thu, May 18, 2017 at 04:01:58PM +1000, Dave Chinner wrote:
> On Wed, May 17, 2017 at 06:30:43PM -0700, Darrick J. Wong wrote:
> > This is a purely mechanical patch that removes the private
> > __{u,}int{8,16,32,64}_t typedefs in favor of using the system
> > {u,}int{8,16,32,64}_t typedefs.  This is the sed script used to perform
> > the transformation and fix the resulting whitespace and indentation
> > errors:
> > 
> > s/typedef\t__uint8_t/typedef __uint8_t\t/g
> > s/typedef\t__uint/typedef __uint/g
> > s/typedef\t__int\([0-9]*\)_t/typedef int\1_t\t/g
> > s/__uint8_t\t/__uint8_t\t\t/g
> > s/__uint/uint/g
> > s/__int\([0-9]*\)_t\t/__int\1_t\t\t/g
> > s/__int/int/g
> > /^typedef.*int[0-9]*_t;$/d
> 
> I'm not sure that this is entirely correct when it comes to sparse
> endian notations or the way the __ types were intended to be used.
> ISTR we used the __ types were originally for the in-memory endian
> converted variable definitions that shadowed the on-disk structures.
> The cleanup plan I was planning to do was to convert these all to
> the linux kernel definitions of __[s,u][8,16,32,64] so it was clear
> they shadow on disk structures of specific sizes.

<nod> I do see the appeal of __be/__le -> __u in source code, though I
also see that include/linux/types.h typedefs them together (uint16_t is
__u16), though in my head the signedness and size are encode in the name
so they're interchangeable. :)

> Once that was done, everything else could be converted to c99 types
> (like you've done above) and then we'd be free of all the old
> __[u]int*_t types....

Well I /did/ leave the existing __[ui]{8,16,32,64} declarations alone
since /most/ of them looked like incore versions of ondisk structures.
Though truth be told there was a lot of code to look at!

(Though I also wonder why you'd want to have mixed __u32 and
uint32_t...)

Anyway, let's see if anyone else bites. :)

--D

> 
> Cheers,
> 
> Dave.
> -- 
> Dave Chinner
> david@fromorbit.com
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2017-05-18  6:21 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-18  1:26 [RFCRAP 0/3?] xfs: OH GOD MY EYES! Darrick J. Wong
2017-05-18  1:30 ` [PATCH 1/3] xfs: remove double-underscore integer types Darrick J. Wong
2017-05-18  6:01   ` Dave Chinner
2017-05-18  6:21     ` Darrick J. Wong [this message]
2017-05-18  6:31     ` Christoph Hellwig
2017-05-18  1:31 ` [PATCH 2/3] xfsprogs: " Darrick J. Wong
2017-05-18  6:32   ` Christoph Hellwig
2017-05-23  2:48     ` Darrick J. Wong
2017-05-23  2:24   ` Eric Sandeen
2017-05-18  1:32 ` [PATCH 3/3] xfs: freeze rw filesystems just prior to reboot Darrick J. Wong
2017-05-18  6:28   ` Christoph Hellwig
2017-05-18  8:34   ` Dave Chinner
2017-05-18 22:30     ` Darrick J. Wong
2017-05-19 19:09       ` Chris Murphy
2017-05-19 21:00         ` Darrick J. Wong
2017-05-20  0:27           ` Chris Murphy
2017-05-22  2:07             ` Dave Chinner
     [not found]           ` <20170522020112.GV17542@dastard>
2017-05-22 20:46             ` Chris Murphy
2017-05-23  3:56               ` Chris Murphy
2017-05-23  4:04                 ` Eric Sandeen
2017-05-23 11:44                   ` Dave Chinner
2017-05-24  3:19               ` Dave Chinner
2017-05-24  8:06                 ` Chris Murphy
2017-05-24  6:22               ` Chris Murphy
2017-05-24  6:25                 ` Chris Murphy
2017-05-24 23:13                   ` Dave Chinner
2017-05-25  0:03                 ` Dave Chinner

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=20170518062120.GX4519@birch.djwong.org \
    --to=darrick.wong@oracle.com \
    --cc=david@fromorbit.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@redhat.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;
as well as URLs for NNTP newsgroup(s).