All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Nicholas Mc Guire <der.herr@hofr.at>
Cc: Sven Van Asbroeck <thesven73@gmail.com>,
	Nicholas Mc Guire <hofrat@osadl.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V2] staging: fieldbus: anybus-s: force endiannes annotation
Date: Tue, 30 Apr 2019 04:02:23 +0100	[thread overview]
Message-ID: <20190430030223.GE23075@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20190430022238.GA22593@osadl.at>

On Tue, Apr 30, 2019 at 04:22:38AM +0200, Nicholas Mc Guire wrote:
> On Mon, Apr 29, 2019 at 10:03:36AM -0400, Sven Van Asbroeck wrote:
> > On Mon, Apr 29, 2019 at 2:11 AM Nicholas Mc Guire <hofrat@osadl.org> wrote:
> > >
> > > V2: As requested by Sven Van Asbroeck <thesven73@gmail.com> make the
> > >     impact of the patch clear in the commit message.
> > 
> > Thank you, but did you miss my comment about creating a local variable
> > instead? See:
> > https://lkml.org/lkml/2019/4/28/97
> 
> Did not miss it - I just don't think that makes it any more
> understandable - the __force __be16 makes it clear I believe
> that this is correct, sparse does not like this though - so tell
> sparse.

... to STFU, 'cause you know better.  The trouble is, how do we
(or yourself a year or two later) know *why* it is correct?
Worse, how do we (or yourself, etc.) know if a change about to be
done to the code won't invalidate the proof of yours?

> The local variable would need to be explained as it is
> functionally not necessary - therefor I find it more confusing
> that using  __force here.

What's confusing is mixing host- and fixed-endian values in the
same variable at different times.  Treat those as unrelated
types that happen to have the same sizeof.

Quite a few of __force instances in the tree should be taken out
and shot.  Don't add to their number.

  reply	other threads:[~2019-04-30  3:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-29  6:05 [PATCH V2] staging: fieldbus: anybus-s: force endiannes annotation Nicholas Mc Guire
2019-04-29  6:05 ` [PATCH V3] staging: fieldbus: anybus-s: consolidate wait_for_completion_timeout return handling Nicholas Mc Guire
2019-04-29 14:01   ` Sven Van Asbroeck
2019-04-29 14:03 ` [PATCH V2] staging: fieldbus: anybus-s: force endiannes annotation Sven Van Asbroeck
2019-04-30  2:22   ` Nicholas Mc Guire
2019-04-30  3:02     ` Al Viro [this message]
2019-04-30  3:33       ` Nicholas Mc Guire
2019-04-30  4:19         ` Al Viro
2019-04-30 13:32           ` Sven Van Asbroeck
2019-04-30 14:03             ` Greg Kroah-Hartman
2019-04-30 14:22               ` Sven Van Asbroeck
2019-04-30 14:26                 ` Sven Van Asbroeck
2019-04-30 14:27             ` Al Viro

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=20190430030223.GE23075@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=der.herr@hofr.at \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hofrat@osadl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thesven73@gmail.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 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.