linux-modules.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joel Stanley <joel@jms.id.au>
To: Lucas De Marchi <lucas.de.marchi@gmail.com>
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: Fri, 9 Jun 2017 14:40:45 +0930	[thread overview]
Message-ID: <CACPK8Xd35t9GhwX3bHtJMRFz5zz8T-iWDDL_OpwnXij_ns45rQ@mail.gmail.com> (raw)
In-Reply-To: <CAKi4VALeXAYkSRVOUL8qfCk4zaniv3Ncxk=Pb2YoqKK3TtPEvA@mail.gmail.com>

On Fri, Jun 9, 2017 at 8:38 AM, Lucas De Marchi
<lucas.de.marchi@gmail.com> wrote:
> 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 :)

Yeah. Supporting groups that insist on using RHEL6.4 and gcc 4.4 is a
barrel of laughs.

:)

Cheers,

Joel

      reply	other threads:[~2017-06-09  5:10 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
2017-06-09  5:10     ` Joel Stanley [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=CACPK8Xd35t9GhwX3bHtJMRFz5zz8T-iWDDL_OpwnXij_ns45rQ@mail.gmail.com \
    --to=joel@jms.id.au \
    --cc=linux-modules@vger.kernel.org \
    --cc=lucas.de.marchi@gmail.com \
    --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).