From: Harvey Harrison <harvey.harrison@gmail.com>
To: steve@chygwyn.com
Cc: Andrew Morton <akpm@linux-foundation.org>,
David Miller <davem@davemloft.net>,
linux-netdev <netdev@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH-mm 8/8] decnet: remove private wrappers of endian helpers
Date: Wed, 26 Nov 2008 13:49:04 -0800 [thread overview]
Message-ID: <1227736144.5511.131.camel@brick> (raw)
In-Reply-To: <20081126213359.GA20782@fogou.chygwyn.com>
On Wed, 2008-11-26 at 21:33 +0000, steve@chygwyn.com wrote:
> Hi,
>
> On Wed, Nov 26, 2008 at 01:12:54PM -0800, Harvey Harrison wrote:
> > Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
> > ---
> [snip]
> > diff --git a/include/net/dn_fib.h b/include/net/dn_fib.h
> > index 3012511..c378be7 100644
> > --- a/include/net/dn_fib.h
> > +++ b/include/net/dn_fib.h
> > @@ -181,9 +181,9 @@ static inline void dn_fib_res_put(struct dn_fib_res *res)
> >
> > static inline __le16 dnet_make_mask(int n)
> > {
> > - if (n)
> > - return dn_htons(~((1<<(16-n))-1));
> > - return 0;
> > + if (n)
> > + return cpu_to_le16(~((1 << (16 - n)) - 1));
> > + return cpu_to_le16(0);
> > }
> You don't need to convert 0.
Tell that to sparse ;-)
>
> [snip]
> >
> > @@ -327,7 +327,7 @@ int dn_username2sockaddr(unsigned char *data, int len, struct sockaddr_dn *sdn,
> > int namel = 12;
> >
> > sdn->sdn_objnum = 0;
> > - sdn->sdn_objnamel = dn_htons(0);
> > + sdn->sdn_objnamel = cpu_to_le16(0);
> Again, no need to convert 0 even though I did :-)
Again, sparse appreciates it.
>
> Otherwise the patch looks good.
>
> Reviewed-by: Steven Whitehouse <swhiteho@redhat.com>
>
Thanks.
Harvey
next prev parent reply other threads:[~2008-11-26 21:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-26 21:12 [PATCH-mm 8/8] decnet: remove private wrappers of endian helpers Harvey Harrison
2008-11-26 21:33 ` steve
2008-11-26 21:49 ` Harvey Harrison [this message]
2008-11-27 8:13 ` David Miller
2008-11-28 1:32 ` Ingo Oeser
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=1227736144.5511.131.camel@brick \
--to=harvey.harrison@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=steve@chygwyn.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).