From: hch@infradead.org (Christoph Hellwig)
Subject: [PATCH 3/7 v2] nvme-fabrics: Add FC transport FC-NVME definitions
Date: Wed, 19 Oct 2016 05:52:57 -0700 [thread overview]
Message-ID: <20161019125257.GA25922@infradead.org> (raw)
In-Reply-To: <20161018233223.GA2202@localhost.localdomain>
On Tue, Oct 18, 2016@05:32:24PM -0600, Jon Derrick wrote:
> > What is the rule for when it should be a macro vs an inline ? It makes
> > sense to me to be an inline if you want to strongly check the type of an
> > argument, but something simple like this, it's not so clear. If I didn't
> > have the "cpu_to_be32" part, I'd abandon the inline and the macro and code
> > it directly.
> In this case they will both provide the same error checking, due to
> cpu_to_be32 returning type __be32. The only difference is that one adds
> a macro and the other adds a function, and if we ever need to add some
> caveats to the logic it will be simpler with the function. That and the
> coding style dictates that all things being equal, we should still
> prefer inline. Those are my only rationales in this case.
I generally prefer to avoid macros that make grepping hard. But
I don't want to bikeshed too much over this this - I'd prefer Jon's
variant, but I'm not going to NAK the series over this helper.
prev parent reply other threads:[~2016-10-19 12:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-07 23:09 [PATCH 3/7 v2] nvme-fabrics: Add FC transport FC-NVME definitions James Smart
2016-10-12 8:58 ` Christoph Hellwig
2016-10-12 18:53 ` James Smart
2016-10-13 9:15 ` Christoph Hellwig
2016-10-18 17:59 ` James Smart
2016-10-18 19:49 ` Jon Derrick
2016-10-18 22:20 ` James Smart
2016-10-18 23:32 ` Jon Derrick
2016-10-19 12:52 ` Christoph Hellwig [this message]
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=20161019125257.GA25922@infradead.org \
--to=hch@infradead.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 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.