linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Cc: Jakub Kicinski <kubakici@wp.pl>, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mt7601u: remove a warning in mt7601u_efuse_physical_size_check()
Date: Wed, 28 Feb 2018 17:01:55 +0100	[thread overview]
Message-ID: <1519833715.2292.2.camel@sipsolutions.net> (raw)
In-Reply-To: <CAJ0CqmU5uii64C2MwCgtFRVzfker4c4G9f5=M3Le8nf+Vkx96A@mail.gmail.com> (sfid-20180228_170124_317316_AE956031)

On Wed, 2018-02-28 at 17:01 +0100, Lorenzo Bianconi wrote:
> > On Wed, 2018-02-28 at 15:26 +0100, Lorenzo Bianconi wrote:
> > > 
> > >       const int map_reads = DIV_ROUND_UP(MT_EFUSE_USAGE_MAP_SIZE, 16);
> > > -     u8 data[map_reads * 16];
> > > +     u8 data[round_up(MT_EFUSE_USAGE_MAP_SIZE, 16)];
> > > 
> > 
> > You could turn it upside down and make
> > 
> > const int map_reads = ARRAY_SIZE(data);
> 
> map_reads is actually 2 since MT_EFUSE_USAGE_MAP_SIZE is 29. Using
> ARRAY_SIZE(data) map_reads will be set to 32

Oh yeah, good point, sorry.

johannes

  reply	other threads:[~2018-02-28 16:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1519827461.git.lorenzo.bianconi@redhat.com>
2018-02-28 14:26 ` [PATCH] mt7601u: remove a warning in mt7601u_efuse_physical_size_check() Lorenzo Bianconi
2018-02-28 15:06   ` Johannes Berg
2018-02-28 16:01     ` Lorenzo Bianconi
2018-02-28 16:01       ` Johannes Berg [this message]
2018-02-28 19:46   ` Jakub Kicinski
2018-03-01 10:22   ` Bas Vermeulen
2018-03-01 10:25     ` Bas Vermeulen
2018-03-01 10:51       ` Lorenzo Bianconi
2018-03-13 16:33   ` Kalle Valo

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=1519833715.2292.2.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=kubakici@wp.pl \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.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;
as well as URLs for NNTP newsgroup(s).