Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1536291
| From | Nikita Yushchenko <nikita.yoush@cogentembedded.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [patch net v3] net: fec: fix compile with CONFIG_M5272 |
| Date | 2016-12-05 19:10 +0100 |
| Message-ID | <sL5Sa-7U6-33@gated-at.bofh.it> (permalink) |
| References | <sL5yO-7xB-17@gated-at.bofh.it> <sL5Sa-7U6-35@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> +#define FEC_STATS_SIZE (ARRAY_SIZE(fec_stats) * sizeof(u64)) > > > Do I take it right this actually translates to (sizeof(fec_stats) / > sizeof(u64) * sizeof(u64))? No. fec_stats is an array of structs, each struct has car arrsy and integer, and size of that is definitely not bytes. ARRAY_SIZE(fec_stats) is number of stats, i.e. it is returned from fec_enet_get_sset_count() Each stat in blob is u64. Thus (ARRAY_SIZE(fec_stats) * sizeof(u64)) is size of stats blob.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[patch net v3] net: fec: fix compile with CONFIG_M5272 Nikita Yushchenko <nikita.yoush@cogentembedded.com> - 2016-12-05 18:50 +0100 Re: [patch net v3] net: fec: fix compile with CONFIG_M5272 Nikita Yushchenko <nikita.yoush@cogentembedded.com> - 2016-12-05 19:10 +0100 Re: [patch net v3] net: fec: fix compile with CONFIG_M5272 David Miller <davem@davemloft.net> - 2016-12-06 02:00 +0100
csiph-web