From: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
To: Vitaly Wool <vitalywool@gmail.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
Troy Kisky <troy.kisky@boundarydevices.com>,
linux-kernel@vger.kernel.org, Chris Healy <cphealy@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Fugang Duan <fugang.duan@nxp.com>, Eric Nelson <eric@nelint.com>,
Andrew Lunn <andrew@lunn.ch>,
Fabio Estevam <fabio.estevam@nxp.com>,
netdev@vger.kernel.org, Philippe Reynes <tremyfr@gmail.com>
Subject: Re: [patch net v3] net: fec: fix compile with CONFIG_M5272
Date: Mon, 5 Dec 2016 21:06:41 +0300 [thread overview]
Message-ID: <fe66d23d-345a-a87a-cbaa-270b1ebdb315@cogentembedded.com> (raw)
In-Reply-To: <CAMJBoFNd==OugwCjwT-q1MkooFr+Ed7AF00ifdimTk_DFVJO9Q@mail.gmail.com>
> +#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.
next prev parent reply other threads:[~2016-12-05 18:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-05 17:41 Nikita Yushchenko
[not found] ` <CAMJBoFNd==OugwCjwT-q1MkooFr+Ed7AF00ifdimTk_DFVJO9Q@mail.gmail.com>
2016-12-05 18:06 ` Nikita Yushchenko [this message]
2016-12-06 0:56 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fe66d23d-345a-a87a-cbaa-270b1ebdb315@cogentembedded.com \
--to=nikita.yoush@cogentembedded.com \
--cc=andrew@lunn.ch \
--cc=cphealy@gmail.com \
--cc=davem@davemloft.net \
--cc=eric@nelint.com \
--cc=fabio.estevam@nxp.com \
--cc=fugang.duan@nxp.com \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tremyfr@gmail.com \
--cc=troy.kisky@boundarydevices.com \
--cc=vitalywool@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®