lkml.org 
[lkml]   [2006]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 03/16] ehca: structure definitions
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-27 14:00    [W:0.102 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site