From: Thomas Hisch <t.hisch@gmail.com>
To: Linux kernel mailing list <linux-kernel@vger.kernel.org>
Cc: rpjday@mindspring.com
Subject: Re: [PATCH] Simplify some code to use the container_of() macro.
Date: Thu, 4 Jan 2007 09:42:24 +0100 [thread overview]
Message-ID: <20070104084224.GA3630@unknown-00-0d-60-79-ca-00.lan> (raw)
In-Reply-To: <Pine.LNX.4.64.0612311547200.30821@localhost.localdomain>
On Sun, Dec 31, 2006 at 03:55:22PM -0500, Robert P. J. Day wrote:
> @@ -1810,8 +1809,7 @@ lcs_get_frames_cb(struct lcs_channel *channel, struct lcs_buffer *buffer)
> LCS_DBF_TEXT(4, trace, "-eiogpkt");
> return;
> }
> - card = (struct lcs_card *)
> - ((char *) channel - offsetof(struct lcs_card, read));
> + card = container_of(channel, struct lcs_card, write);
the last argument in container_of should be read instead of write.
> offset = 0;
> while (lcs_hdr->offset != 0) {
--
Thomas Hisch
e0625874@stud.tuwien.ac.at
next prev parent reply other threads:[~2007-01-04 8:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-31 20:55 Robert P. J. Day
2007-01-04 0:50 ` Andrew Morton
2007-01-04 7:40 ` Robert P. J. Day
2007-01-04 7:59 ` Robert P. J. Day
2007-01-04 8:42 ` Thomas Hisch [this message]
2007-01-04 8:48 ` Robert P. J. Day
2007-02-04 14:29 ` [PATCH] ipv4: remove a call to skb_queue_len() in inet_diag.c Thomas Hisch
2007-02-04 20:23 ` David Miller
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=20070104084224.GA3630@unknown-00-0d-60-79-ca-00.lan \
--to=t.hisch@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rpjday@mindspring.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
all inboxes | Powered by JetHome®