From: Harvey Harrison <harvey.harrison@gmail.com>
To: Eilon Greenstein <eilong@broadcom.com>
Cc: linux-netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH 3/9] bnx2x: annotate addr_hi/addr_lo as le32
Date: Thu, 22 Jan 2009 10:13:34 -0800 [thread overview]
Message-ID: <1232648015.9701.50.camel@brick> (raw)
In-Reply-To: <1232646585.29087.87.camel@lb-tlvb-eliezer>
On Thu, 2009-01-22 at 19:49 +0200, Eilon Greenstein wrote:
> On Tue, 2009-01-20 at 21:50 -0800, Harvey Harrison wrote:
> > Remove a completely unused structure definition as well.
> >
> > Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
>
> [...]
> >
> > diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
> > index 2f8d64c..021c31c 100644
> > --- a/drivers/net/bnx2x_main.c
> > +++ b/drivers/net/bnx2x_main.c
> > @@ -987,8 +987,8 @@ static inline void bnx2x_free_rx_sge(struct bnx2x *bp,
> > __free_pages(page, PAGES_PER_SGE_SHIFT);
> >
> > sw_buf->page = NULL;
> > - sge->addr_hi = 0;
> > - sge->addr_lo = 0;
> > + sge->addr_hi = cpu_to_le32(0);
> > + sge->addr_lo = cpu_to_le32(0);
> > }
>
> I prefer to keep zeros as zeros. I find it less readable with the
> cpu_to_le macro. I also noticed that it does not add a sparse warning,
> so on the combined image I will keep the zeros as zeros.
>
> Other than that, the patch looks fine
Sparse will only warn if CHECK_ENDIAN is set as addr_hi/lo was just marked
as a le32, how do you think I noticed this line needed changing ;-)
Harvey
prev parent reply other threads:[~2009-01-22 18:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-21 5:50 [PATCH 3/9] bnx2x: annotate addr_hi/addr_lo as le32 Harvey Harrison
2009-01-22 17:49 ` Eilon Greenstein
2009-01-22 18:13 ` Harvey Harrison [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=1232648015.9701.50.camel@brick \
--to=harvey.harrison@gmail.com \
--cc=eilong@broadcom.com \
--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 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.