public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: Nicolas Palix <npalix@diku.dk>
Cc: kernel-janitors@vger.kernel.org,
	Stuart Menefy <stuart.menefy@st.com>,
	linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arch/sh: Replace an explicit computation by the use of the container_of macro
Date: Wed, 9 Dec 2009 12:44:54 +0900	[thread overview]
Message-ID: <20091209034453.GB28280@linux-sh.org> (raw)
In-Reply-To: <200912071046.27330.npalix@diku.dk>

On Mon, Dec 07, 2009 at 10:46:26AM +0100, Nicolas Palix wrote:
> From 945e75c0e3202ab4cd0b8f185ea4be5609806edb Mon Sep 17 00:00:00 2001
> From: Nicolas Palix <npalix@diku.dk>
> Date: Mon, 7 Dec 2009 10:38:55 +0100
> 
> The macro container_of from kernel.h performs the same
> pointer arithmetic operation.
> 
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @@
> type T;
> expression mptr;
> expression member;
> @@
> 
> - (void *)((char *)mptr - offsetof(T, member))
> + container_of(mptr, T, member)
> // </smpl>
> 
> Signed-off-by: Nicolas Palix <npalix@diku.dk>

Applied, thanks.

      reply	other threads:[~2009-12-09  3:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-07  9:46 [PATCH] arch/sh: Replace an explicit computation by the use of the container_of macro Nicolas Palix
2009-12-09  3:44 ` Paul Mundt [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=20091209034453.GB28280@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=npalix@diku.dk \
    --cc=stuart.menefy@st.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