From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>, linux-spi@vger.kernel.org
Cc: broonie@kernel.org,
Mika Westerberg <mika.westerberg@linux.intel.com>,
andy.shevchenko@gmail.com, masahisa.kojima@linaro.org,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
linux-acpi@vger.kernel.org, Lukas Wunner <lukas@wunner.de>
Subject: Re: [PATCH] spi/acpi: avoid spurious matches during slave enumeration
Date: Thu, 20 Jun 2019 15:54:37 +0300 [thread overview]
Message-ID: <dc5e7e9b-1aae-d268-c4b7-b14288247cb1@linux.intel.com> (raw)
In-Reply-To: <20190620123649.4492-1-ard.biesheuvel@linaro.org>
On 6/20/19 3:36 PM, Ard Biesheuvel wrote:
> In the new SPI ACPI slave enumeration code, we use the value of
> lookup.max_speed_khz as a flag to decide whether a match occurred.
> However, doing so only makes sense if we initialize its value to
> zero beforehand, or otherwise, random junk from the stack will
> cause spurious matches.
>
> So zero initialize the lookup struct fully, and only set the non-zero
> members explicitly.
>
> Fixes: 4c3c59544f33 ("spi/acpi: enumerate all SPI slaves in the namespace")
> Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
> Cc: andy.shevchenko@gmail.com
> Cc: masahisa.kojima@linaro.org
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> Cc: linux-acpi@vger.kernel.org
> Cc: Lukas Wunner <lukas@wunner.de>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
> drivers/spi/spi.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
next prev parent reply other threads:[~2019-06-20 12:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-20 12:36 [PATCH] spi/acpi: avoid spurious matches during slave enumeration Ard Biesheuvel
2019-06-20 12:54 ` Jarkko Nikula [this message]
2019-06-20 12:56 ` Mika Westerberg
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=dc5e7e9b-1aae-d268-c4b7-b14288247cb1@linux.intel.com \
--to=jarkko.nikula@linux.intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=ard.biesheuvel@linaro.org \
--cc=broonie@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=masahisa.kojima@linaro.org \
--cc=mika.westerberg@linux.intel.com \
--cc=rjw@rjwysocki.net \
/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