netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Gortmaker <p_gortmaker@yahoo.com>
To: Roel Kluin <12o3l@tiscali.nl>, jschlst@samba.org
Cc: netdev@vger.kernel.org
Subject: Re: drivers/net/tokenring/smctr.c: logical-bitwise or confusion?
Date: Sun, 9 Mar 2008 20:09:39 -0400 (EDT)	[thread overview]
Message-ID: <993737.45508.qm@web65610.mail.ac4.yahoo.com> (raw)
In-Reply-To: <47D45A0F.1060102@tiscali.nl>


--- Roel Kluin <12o3l@tiscali.nl> wrote:

> drivers/net/tokenring/smctr.c:3416
> 
> tsv->svv[0] = ((tx_fstatus & 0x0100 >> 6) || IBM_PASS_SOURCE_ADDR);
> 
> shouldn't this be a bit-wise or?
> from drivers/net/tokenring/smctr.h:50:
> 
> #define      IBM_PASS_SOURCE_ADDR    0x01

Probably a safe bet that is what they meant to have. Since
as it stands, gcc will (correctly) optimize that into:

tsv->svv[0]= 1;

which probably isn't particularly useful.

Paul.
 



      Connect with friends from any web browser - no download required. Try the new Yahoo! Canada Messenger for the Web BETA at http://ca.messenger.yahoo.com/webmessengerpromo.php

  reply	other threads:[~2008-03-10  0:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-09 21:43 drivers/net/tokenring/smctr.c: logical-bitwise or confusion? Roel Kluin
2008-03-10  0:09 ` Paul Gortmaker [this message]
2008-03-10  1:16   ` Roel Kluin
2008-03-10  1:27     ` Joe Perches

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=993737.45508.qm@web65610.mail.ac4.yahoo.com \
    --to=p_gortmaker@yahoo.com \
    --cc=12o3l@tiscali.nl \
    --cc=jschlst@samba.org \
    --cc=netdev@vger.kernel.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 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).