On Wed, Nov 17, 2010 at 6:04 PM, Boaz Harrosh <bharrosh@xxxxxxxxxxx> wrote: > On 11/16/2010 07:35 PM, Rolf Eike Beer wrote: >> >> How about: >> Â Â Â scsi_dh_data = kzalloc(sizeof(*scsi_dh_data) + sizeof(*h), GFP_KERNEL)? >> >> Eike > I like the above, very cool :) > I always prefer this form because this way I have all the information in > that single statement. I'm allocating space for scsi_dh_data for what ever > that would be. The other form I have to go looking up to see what is > scsi_dh_data's type and there is place for error. > > Naturally for above it would follow: > Â Â Â Âh = typeof(h)(scsi_dh_data + 1); > > My $0.017 > Boaz > -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html