Re: drivers/block/ub.c

From: Oliver Neukum
Date: Sat Jun 26 2004 - 17:37:10 EST


Am Sonntag, 27. Juni 2004 00:07 schrieb David S. Miller:
> On Sat, 26 Jun 2004 23:56:49 +0200
> Oliver Neukum <oliver@xxxxxxxxxx> wrote:
>
> > Unless I am mistaken, this structure is transfered as such over the bus,
> > so IMHO here it is needed.
>
> That is not the only criterious that needs to be met in order for
> the packed attribute to be required.
>
> It is needed only if the structure elements are such that gcc will
> not packet them properly on all supported architecutures. Peter's
> example in his code will be packed properly without the packed
> attribute to the best of my knowledge.

So either it has no effect or it is needed?
Then why take the risk that gcc is changed or an architecture added that
needs it? It seems to be cleaner to me to mark data structures that
must be layed out as specified specially. Safer, too, just in case.

Regards
Oliver
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/