All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Jonas Dreßler" <verdre@v0yd.nl>
Cc: "Brian Norris" <briannorris@chromium.org>,
	"Amitkumar Karwar" <amitkarwar@gmail.com>,
	"Ganapathi Bhat" <ganapathi017@gmail.com>,
	"Xinming Hu" <huxinming820@gmail.com>,
	"Kalle Valo" <kvalo@codeaurora.org>,
	"David S. Miller" <davem@davemloft.net>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Tsuchiya Yuto" <kitakar@gmail.com>,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	"Maximilian Luz" <luzmaximilian@gmail.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Pali Rohár" <pali@kernel.org>
Subject: Re: [PATCH] mwifiex: Add quirk to disable deep sleep with certain hardware revision
Date: Wed, 3 Nov 2021 16:15:47 +0200	[thread overview]
Message-ID: <YYKZkz3EFfdENhoZ@smile.fi.intel.com> (raw)
In-Reply-To: <b2aaf6f7-9f22-926a-963b-cfd0d4fca31d@v0yd.nl>

On Wed, Nov 03, 2021 at 02:37:53PM +0100, Jonas Dreßler wrote:
> On 11/3/21 13:25, Jonas Dreßler wrote:

...

> > > > +               if (strncmp(ver_ext->version_str, "ChipRev:20, BB:9b(10.00), RF:40(21)", 128) == 0) {
> > > 
> > > Rather than memorize the 128-size array here, maybe use
> > > sizeof(ver_ext->version_str) ?
> > 
> > Sounds like a good idea, yeah.
> 
> Nevermind, the reason I did this was for consistency in the
> function, right underneath in the same function it also assumes
> a fixed size of 128 characters, so I'd rather use the same
> length.
> 
> > 		memcpy(version_ext->version_str, ver_ext->version_str,
> > 		       sizeof(char) * 128);

Besides sizeof(char)...

> > 		memcpy(priv->version_str, ver_ext->version_str, 128);
> 
> Might be a good idea to #define it as MWIFIEX_VERSION_STR_LENGTH
> in fw.h though...

...I think you simply need a precursor patch that changes this
to sizeof() / #define approach.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2021-11-03 14:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-28  7:37 [PATCH] mwifiex: Add quirk to disable deep sleep with certain hardware revision Jonas Dreßler
2021-10-28  8:07 ` Andy Shevchenko
2021-10-28 12:14 ` Denis Kirjanov
2021-10-28 21:27 ` Brian Norris
2021-11-03 12:25   ` Jonas Dreßler
2021-11-03 12:29     ` Jonas Dreßler
2021-11-03 13:37     ` Jonas Dreßler
2021-11-03 14:15       ` Andy Shevchenko [this message]
2021-11-03 17:21     ` Brian Norris

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=YYKZkz3EFfdENhoZ@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=amitkarwar@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=briannorris@chromium.org \
    --cc=davem@davemloft.net \
    --cc=ganapathi017@gmail.com \
    --cc=huxinming820@gmail.com \
    --cc=kitakar@gmail.com \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luzmaximilian@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pali@kernel.org \
    --cc=verdre@v0yd.nl \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.