linux-modules.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lucas De Marchi <lucas.de.marchi@gmail.com>
To: Joel Stanley <joel@jms.id.au>
Cc: linux-modules <linux-modules@vger.kernel.org>,
	Stewart Smith <stewart@linux.vnet.ibm.com>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Subject: Re: [PATCH kmod] util: fix non-static assert_cc use
Date: Thu, 8 Jun 2017 16:08:00 -0700	[thread overview]
Message-ID: <CAKi4VALeXAYkSRVOUL8qfCk4zaniv3Ncxk=Pb2YoqKK3TtPEvA@mail.gmail.com> (raw)
In-Reply-To: <CACPK8XcLBdLijc-CfxoFRNq6pHX6nGri7JCTyfJS9qx+8Juv=Q@mail.gmail.com>

On Wed, Jun 7, 2017 at 5:00 AM, Joel Stanley <joel@jms.id.au> wrote:
> On Wed, Jun 7, 2017 at 3:48 PM, Joel Stanley <joel@jms.id.au> wrote:
>> In commit a6ede6c7ad46 (util: fix warning of equal values on logical OR)
>> the runtime check for EAGAIN and EWOULDBLOCK being equal was converted
>> into an assert.
>>
>> For the case where the compiler supports _Static_assert, this is can be
>> called staticly. However the fallback for older compilers uses a
>> non-static test that needs to be called from a function context.
>>
>> Move the assert into the functions that used to have the runtime check.
>> The test does not add any runtime overhead, so it is fine to duplicate
>> it.
>>
>> Tested with and without HAVE_STATIC_ASSERT defined using GCC 6.3.
>>
>> Signed-off-by: Joel Stanley <joel@jms.id.au>
>
> I just saw the git history and noticed that Thomas sent a patch fixing
> this already. Excellent! Sorry for the noise.

So many people using ancient compilers... I must be missing the fun :)

Lucas De Marchi

  reply	other threads:[~2017-06-08 23:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-07  6:18 [PATCH kmod] util: fix non-static assert_cc use Joel Stanley
2017-06-07 12:00 ` Joel Stanley
2017-06-08 23:08   ` Lucas De Marchi [this message]
2017-06-09  5:10     ` Joel Stanley

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='CAKi4VALeXAYkSRVOUL8qfCk4zaniv3Ncxk=Pb2YoqKK3TtPEvA@mail.gmail.com' \
    --to=lucas.de.marchi@gmail.com \
    --cc=joel@jms.id.au \
    --cc=linux-modules@vger.kernel.org \
    --cc=stewart@linux.vnet.ibm.com \
    --cc=thomas.petazzoni@free-electrons.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).