From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wohnheim.fh-wedel.de (wohnheim.fh-wedel.de [213.39.233.138]) by ozlabs.org (Postfix) with ESMTP id 07E1667AC6 for ; Thu, 27 Apr 2006 21:58:06 +1000 (EST) Date: Thu, 27 Apr 2006 13:57:49 +0200 From: =?iso-8859-1?Q?J=F6rn?= Engel To: Heiko J Schick Subject: Re: [PATCH 03/16] ehca: structure definitions Message-ID: <20060427115749.GD32127@wohnheim.fh-wedel.de> References: <4450A16D.7000008@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 In-Reply-To: <4450A16D.7000008@de.ibm.com> Cc: linux-kernel@vger.kernel.org, openib-general@openib.org, linuxppc-dev@ozlabs.org, Christoph Raisch , Hoang-Nam Nguyen , Marcus Eder List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu, 27 April 2006 12:48:13 +0200, Heiko J Schick wrote: > + > +#ifdef CONFIG_PPC64 > +#include "ehca_classes_pSeries.h" > +#endif Is the #ifdef necessary? Such conditions around header includes often indicate problems with the included header. If that is the case here, you should fix the header in question in a seperate patch. > +struct ehca_shca { > + struct ib_device ib_device; > + struct ibmebus_dev *ibmebus_dev; > + u8 num_ports; ^^ > + int hw_level; This will cause some wasted space due to alignment. There don't seem to be other u8 or chars to consolidate with here, though. Still, you could take another look that your structures have fields on natural alignment borders and don't grow without you noticing. > +struct ehca_mr { > + union { > + struct ib_mr ib_mr; /* must always be first in ehca_mr */ > + struct ib_fmr ib_fmr; /* must always be first in ehca_mr */ > + } ib; > + > + spinlock_t mrlock; > + > + /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > + * !!! ehca_mr_deletenew() memsets from flags to end of structure > + * !!! DON'T move flags or insert another field before. > + * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > */ Yuck! Do you have really good reasons to play such games? > +struct ehca_pfpd { > +}; > + > +struct ehca_pfmr { > +}; > + > +struct ehca_pfmw { > +}; Why these? Jörn -- Those who come seeking peace without a treaty are plotting. -- Sun Tzu