Re: [PATCH] Add Amstrad Delta NAND support.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux