public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kill open-coded offsetof in cm4000_cs.c ZERO_DEV()
@ 2006-06-15 11:26 Al Viro
  2006-06-30 18:53 ` Dominik Brodowski
  0 siblings, 1 reply; 2+ messages in thread
From: Al Viro @ 2006-06-15 11:26 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, Dominik Brodowski

... to make sure that it doesn't break again when a field changes (see
"[PATCH] pcmcia: fix zeroing of cm4000_cs.c data" for recent example).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

---

 drivers/char/pcmcia/cm4000_cs.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

e9defe1ea51dd92069e68d3b32ac55ca73b06b53
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
index eab5394..31c8a21 100644
--- a/drivers/char/pcmcia/cm4000_cs.c
+++ b/drivers/char/pcmcia/cm4000_cs.c
@@ -149,12 +149,7 @@ struct cm4000_dev {
 #define	ZERO_DEV(dev)  						\
 	memset(&dev->atr_csum,0,				\
 		sizeof(struct cm4000_dev) - 			\
-		/*link*/ sizeof(struct pcmcia_device *) - 	\
-		/*node*/ sizeof(dev_node_t) - 			\
-		/*atr*/ MAX_ATR*sizeof(char) - 			\
-		/*rbuf*/ 512*sizeof(char) - 			\
-		/*sbuf*/ 512*sizeof(char) - 			\
-		/*queue*/ 4*sizeof(wait_queue_head_t))
+		offsetof(struct cm4000_dev, atr_csum))
 
 static struct pcmcia_device *dev_table[CM4000_MAX_DEV];
 static struct class *cmm_class;
-- 
1.3.GIT


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kill open-coded offsetof in cm4000_cs.c ZERO_DEV()
  2006-06-15 11:26 [PATCH] kill open-coded offsetof in cm4000_cs.c ZERO_DEV() Al Viro
@ 2006-06-30 18:53 ` Dominik Brodowski
  0 siblings, 0 replies; 2+ messages in thread
From: Dominik Brodowski @ 2006-06-30 18:53 UTC (permalink / raw)
  To: Al Viro; +Cc: Linus Torvalds, linux-kernel

On Thu, Jun 15, 2006 at 12:26:55PM +0100, Al Viro wrote:
> ... to make sure that it doesn't break again when a field changes (see
> "[PATCH] pcmcia: fix zeroing of cm4000_cs.c data" for recent example).

Applied.

Thanks,
	Dominik

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-06-30 19:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-15 11:26 [PATCH] kill open-coded offsetof in cm4000_cs.c ZERO_DEV() Al Viro
2006-06-30 18:53 ` Dominik Brodowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox