LKML Archive on
help / color / mirror / Atom feed
From: David Miller <>
Subject: Re: [PATCH] atheros/atlx: Simplify bit manipulations
Date: Sat, 24 Jan 2015 23:35:40 -0800 (PST)	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

From: Rasmus Villemoes <>
Date: Fri, 23 Jan 2015 12:06:52 +0100

> The code 'if (foo & X) foo &= ~X;' is semantically equivalent to
> simply 'foo &= ~X;', but gcc generates about four instructions for the
> former, one for the latter. Similarly, if X consists of a single bit,
> 'if (!(foo & X)) X |= X;' can be replaced by 'foo |= X;'.
> In the atl2 case, gcc does know how to merge the new adjacent
> operations, so altogether this gives a nice little code size
> reduction of about 80 bytes.
> Signed-off-by: Rasmus Villemoes <>

I agree with the feedback given that these open-coded sequences should
be replaced with the appropriate PCI helpers instead of edited

      parent reply	other threads:[~2015-01-25  7:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-23 11:06 Rasmus Villemoes
2015-01-23 20:26 ` Francois Romieu
2015-01-25  7:35 ` David Miller [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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \
    --subject='Re: [PATCH] atheros/atlx: Simplify bit manipulations' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).