From: Al Viro <viro@ZenIV.linux.org.uk>
To: Christoph Hellwig <hch@infradead.org>
Cc: David Howells <dhowells@redhat.com>,
torvalds@linux-foundation.org, linux-fsdevel@vger.kernel.org,
linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 02/20] afs: Fix checker warnings
Date: Thu, 12 Apr 2018 07:06:01 +0100 [thread overview]
Message-ID: <20180412060600.GT30522@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20180412053807.GA32532@infradead.org>
On Wed, Apr 11, 2018 at 10:38:07PM -0700, Christoph Hellwig wrote:
> On Thu, Apr 05, 2018 at 09:29:42PM +0100, David Howells wrote:
> > Fix warnings raised by checker, including:
> >
> > (*) Warnings raised by unequal comparison for the purposes of sorting,
> > where the endianness doesn't matter:
> >
> > fs/afs/addr_list.c:246:21: warning: restricted __be16 degrades to integer
> > fs/afs/addr_list.c:246:30: warning: restricted __be16 degrades to integer
> > fs/afs/addr_list.c:248:21: warning: restricted __be32 degrades to integer
> > fs/afs/addr_list.c:248:49: warning: restricted __be32 degrades to integer
> > fs/afs/addr_list.c:283:21: warning: restricted __be16 degrades to integer
> > fs/afs/addr_list.c:283:30: warning: restricted __be16 degrades to integer
>
> Seriously - just do the endian swap. In most case it it free anyway
> becaue you have load instructions that can byte swap. Bonus points
> for doing the swap on the element iterated over.
> __force hacks without a very good reason (and an explanation for the
> reason in the code!) are an instance reason to NAK.
Nope. It's an arbitrary comparison for sorting purposes. There's no reason
for byteswapping anything, and while a comment to the effect that all we
care about is *some* linear order, no matter which one, would be a good idea,
that's about it.
next prev parent reply other threads:[~2018-04-12 6:06 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-05 20:29 [PATCH 00/20] afs: Fixes and development David Howells
2018-04-05 20:29 ` [PATCH 01/20] vfs: Remove the const from dir_context::actor David Howells
2018-04-05 20:29 ` [PATCH 02/20] afs: Fix checker warnings David Howells
2018-04-12 5:38 ` Christoph Hellwig
2018-04-12 6:06 ` Al Viro [this message]
2018-04-05 20:29 ` [PATCH 03/20] afs: Don't over-increment the cell usage count when pinning it David Howells
2018-04-05 20:29 ` [PATCH 04/20] afs: Prospectively look up extra files when doing a single lookup David Howells
2018-04-05 20:30 ` [PATCH 05/20] afs: Implement @sys substitution handling David Howells
2018-04-06 6:37 ` Christoph Hellwig
2018-04-06 6:51 ` Al Viro
2018-04-06 8:08 ` David Howells
2018-04-06 8:13 ` David Howells
2018-04-06 17:54 ` Nikolay Borisov
2018-04-06 9:04 ` David Howells
2018-04-06 10:32 ` David Howells
2018-04-05 20:30 ` [PATCH 06/20] afs: Implement @cell " David Howells
2018-04-05 20:30 ` [PATCH 07/20] afs: Dump bad status record David Howells
2018-04-05 20:30 ` [PATCH 08/20] afs: Introduce a statistics proc file David Howells
2018-04-05 20:30 ` [PATCH 09/20] afs: Init inode before accessing cache David Howells
2018-04-05 20:30 ` [PATCH 10/20] afs: Make it possible to get the data version in readpage David Howells
2018-04-05 20:30 ` [PATCH 11/20] afs: Rearrange status mapping David Howells
2018-04-05 20:30 ` [PATCH 12/20] afs: Keep track of invalid-before version for dentry coherency David Howells
2018-04-05 20:30 ` [PATCH 13/20] afs: Split the dynroot stuff out and give it its own ops tables David Howells
2018-04-05 20:31 ` [PATCH 14/20] afs: Fix directory handling David Howells
2018-04-05 20:31 ` [PATCH 15/20] afs: Split the directory content defs into a header David Howells
2018-04-05 20:31 ` [PATCH 16/20] afs: Adjust the directory XDR structures David Howells
2018-04-05 20:31 ` [PATCH 17/20] afs: Locally edit directory data for mkdir/create/unlink/ David Howells
2018-04-05 20:31 ` [PATCH 18/20] afs: Trace protocol errors David Howells
2018-04-05 20:31 ` [PATCH 19/20] afs: Add stats for data transfer operations David Howells
2018-04-05 20:31 ` [PATCH 20/20] afs: Do better accretion of small writes on newly created content David Howells
2018-04-07 16:50 ` [PATCH 00/20] afs: Fixes and development Linus Torvalds
2018-04-07 17:19 ` Al Viro
2018-04-07 18:04 ` Linus Torvalds
2018-04-08 7:36 ` David Howells
2018-04-11 14:37 ` David Howells
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=20180412060600.GT30522@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=dhowells@redhat.com \
--cc=hch@infradead.org \
--cc=linux-afs@lists.infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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