lkml.org 
[lkml]   [2006]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] Add Amstrad Delta NAND support.
Date
>>>> And please create a structure containing both struct mtd_info and
>>>> struct nand_chip. Then use sizeof(that structure)...

> It's fine as-is. The claim that it's nicer to introduce an extra
> datatype just for the allocation is subjective, at best.

Not just for the allocation, but also for getting the address of
the second struct, after that allocation.

If the second struct has bigger alignment required than the first,
the current code gets the second struct misaligned. Putting both
into one bigger struct would add the required padding.

(Say: sizes 4 and 8, alignment requirements 4 and 8 resp.)


Segher

-
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-05-20 02:14    [W:0.044 / U:0.984 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site