Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1740385
| From | David Miller <davem@davemloft.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 02/16] thunderbolt: Add support for XDomain properties |
| Date | 2017-09-27 06:40 +0200 |
| Message-ID | <uuciB-5Yf-7@gated-at.bofh.it> (permalink) |
| References | <utzqV-5xX-3@gated-at.bofh.it> <utzAD-5BH-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Mika Westerberg <mika.westerberg@linux.intel.com>
Date: Mon, 25 Sep 2017 14:07:24 +0300
> +struct tb_property_entry {
> + u32 key_hi;
> + u32 key_lo;
> + u16 length;
> + u8 reserved;
> + u8 type;
> + u32 value;
> +} __packed;
> +
> +struct tb_property_rootdir_entry {
> + u32 magic;
> + u32 length;
> + struct tb_property_entry entries[];
> +} __packed;
> +
> +struct tb_property_dir_entry {
> + u32 uuid[4];
> + struct tb_property_entry entries[];
> +} __packed;
There is no apparent need for __packed here, and __packed should be
avoided unless absolutely necessary as it pessimizes the code
significantly on some architectures.
Please remove __packed from these datastructures unless you can
prove it is absolutely needed and, in such case, please document
in a comment why that requirement exists. Because from the layout
of these types, everything will be packed in just fine without
__packed.
Thank you.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 02/16] thunderbolt: Add support for XDomain properties Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-09-25 13:20 +0200
Re: [PATCH v2 02/16] thunderbolt: Add support for XDomain properties David Miller <davem@davemloft.net> - 2017-09-27 06:40 +0200
Re: [PATCH v2 02/16] thunderbolt: Add support for XDomain properties Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-09-27 13:40 +0200
RE: [PATCH v2 02/16] thunderbolt: Add support for XDomain properties David Laight <David.Laight@ACULAB.COM> - 2017-09-27 18:20 +0200
Re: [PATCH v2 02/16] thunderbolt: Add support for XDomain properties David Miller <davem@davemloft.net> - 2017-09-27 18:30 +0200
csiph-web