netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Oeser <netdev@axxeo.de>
To: Jon Paul Maloy <jon.maloy@ericsson.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	Per Liden <per.liden@ericsson.com>,
	"Stephens, Allan" <allan.stephens@windriver.com>
Subject: Re: [Fwd: [PATCH] [TIPC]: Enhancements to msg_set_bits() routine]
Date: Wed, 25 Apr 2007 18:39:43 +0200	[thread overview]
Message-ID: <200704251839.44056.netdev@axxeo.de> (raw)
In-Reply-To: <462E52DE.5000900@ericsson.com>

Hi Jon,

Jon Paul Maloy schrieb:
> 2) The code has been optimized to minimize the number of run-time
>    endianness conversion operations by leveraging the fact that the
>    mask (and, in some cases, the value as well) is constant and the
>    necessary conversion can be performed by the compiler.

3) It can be checked by sparse, if you use proper types.
 
> diff --git a/net/tipc/msg.h b/net/tipc/msg.h
> index 62d5490..5c64e55 100644
> --- a/net/tipc/msg.h
> +++ b/net/tipc/msg.h
> @@ -71,8 +71,11 @@ static inline void msg_set_word(struct tipc_msg *m, u32
> w, u32 val) static inline void msg_set_bits(struct tipc_msg *m, u32 w,
>  				u32 pos, u32 mask, u32 val)

static inlinevoid msg_set_bits(struct tipc_msg *m, u32 w,
  				u32 pos, __be32 mask, __be32 val)


Care to resubmit?


Best Regards

Ingo Oeser

  reply	other threads:[~2007-04-25 16:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-24 18:56 [Fwd: [PATCH] [TIPC]: Enhancements to msg_set_bits() routine] Jon Paul Maloy
2007-04-25 16:39 ` Ingo Oeser [this message]
     [not found]   ` <462FBADA.2060701@ericsson.com>
2007-04-27 11:06     ` 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=200704251839.44056.netdev@axxeo.de \
    --to=netdev@axxeo.de \
    --cc=allan.stephens@windriver.com \
    --cc=davem@davemloft.net \
    --cc=jon.maloy@ericsson.com \
    --cc=netdev@vger.kernel.org \
    --cc=per.liden@ericsson.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).