[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1232648015.9701.50.camel@brick>
Date: Thu, 22 Jan 2009 10:13:34 -0800
From: Harvey Harrison <harvey.harrison@...il.com>
To: Eilon Greenstein <eilong@...adcom.com>
Cc: linux-netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH 3/9] bnx2x: annotate addr_hi/addr_lo as le32
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@...il.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists