[<prev] [next>] [day] [month] [year] [list]
Message-ID: <fe66d23d-345a-a87a-cbaa-270b1ebdb315@cogentembedded.com>
Date: Mon, 5 Dec 2016 21:06:41 +0300
From: Nikita Yushchenko <nikita.yoush@...entembedded.com>
To: Vitaly Wool <vitalywool@...il.com>
Cc: Johannes Berg <johannes@...solutions.net>,
Troy Kisky <troy.kisky@...ndarydevices.com>,
linux-kernel@...r.kernel.org, Chris Healy <cphealy@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Fugang Duan <fugang.duan@....com>,
Eric Nelson <eric@...int.com>, Andrew Lunn <andrew@...n.ch>,
Fabio Estevam <fabio.estevam@....com>, netdev@...r.kernel.org,
Philippe Reynes <tremyfr@...il.com>
Subject: Re: [patch net v3] net: fec: fix compile with CONFIG_M5272
> +#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.
Powered by blists - more mailing lists