From: arend@broadcom.com (Arend van Spriel)
To: cocci@systeme.lip6.fr
Subject: [Cocci] [PATCH 3/3] p54: use request_firmware_direct() for optional EEPROM override
Date: Wed, 25 Jun 2014 09:26:23 +0200 [thread overview]
Message-ID: <53AA799F.7030807@broadcom.com> (raw)
In-Reply-To: <1403649583-12707-4-git-send-email-mcgrof@do-not-panic.com>
On 25-06-14 00:39, Luis R. Rodriguez wrote:
> From: "Luis R. Rodriguez" <mcgrof@suse.com>
>
> The p54 driver uses request_firmware() twice, once for actual
> firmware and then another time for an optional user overide on
> EEPROM, 3826.eeprom. The custom EEPROM is optional but if not
> present we'll introduce an extra lag of 60 seconds with udev
> present. Annotate we don't want udev nonsense here to avoid
> the lag in case its not present.
I guess the fact that EEPROM is optional does not matter much. If doing
a second request you could always use request_firmware_direct(), right?
Regards,
Arend
> This was found with the following SmPL patch.
>
> @ firmware_not_critical @
> expression cf;
> expression config_file;
> expression dev;
> int ret;
> identifier l;
> statement S;
> @@
>
> - ret = request_firmware(&cf, config_file, dev);
> + ret = request_firmware_direct(&cf, config_file, dev);
> if (ret < 0) {
> ... when != goto l;
> when != return ret;
> when any
> } else {
> ...
> release_firmware(cf);
> ...
> }
>
> Cc: Takashi Iwai <tiwai@suse.de>
> Cc: Christian Lamparter <chunkeey@googlemail.com>
> Cc: linux-wireless at vger.kernel.org
> Cc: cocci at systeme.lip6.fr
> Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
> ---
> drivers/net/wireless/p54/p54spi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/p54/p54spi.c b/drivers/net/wireless/p54/p54spi.c
> index de15171..63de5ee 100644
> --- a/drivers/net/wireless/p54/p54spi.c
> +++ b/drivers/net/wireless/p54/p54spi.c
> @@ -193,7 +193,7 @@ static int p54spi_request_eeprom(struct ieee80211_hw *dev)
> /* allow users to customize their eeprom.
> */
>
> - ret = request_firmware(&eeprom, "3826.eeprom", &priv->spi->dev);
> + ret = request_firmware_direct(&eeprom, "3826.eeprom", &priv->spi->dev);
> if (ret < 0) {
> #ifdef CONFIG_P54_SPI_DEFAULT_EEPROM
> dev_info(&priv->spi->dev, "loading default eeprom...\n");
>
WARNING: multiple messages have this Message-ID (diff)
From: Arend van Spriel <arend@broadcom.com>
To: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>, <tiwai@suse.de>,
<chunkeey@googlemail.com>, <leedom@chelsio.com>,
<cocci@systeme.lip6.fr>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<gregkh@linuxfoundation.org>,
"Luis R. Rodriguez" <mcgrof@suse.com>,
<linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 3/3] p54: use request_firmware_direct() for optional EEPROM override
Date: Wed, 25 Jun 2014 09:26:23 +0200 [thread overview]
Message-ID: <53AA799F.7030807@broadcom.com> (raw)
In-Reply-To: <1403649583-12707-4-git-send-email-mcgrof@do-not-panic.com>
On 25-06-14 00:39, Luis R. Rodriguez wrote:
> From: "Luis R. Rodriguez" <mcgrof@suse.com>
>
> The p54 driver uses request_firmware() twice, once for actual
> firmware and then another time for an optional user overide on
> EEPROM, 3826.eeprom. The custom EEPROM is optional but if not
> present we'll introduce an extra lag of 60 seconds with udev
> present. Annotate we don't want udev nonsense here to avoid
> the lag in case its not present.
I guess the fact that EEPROM is optional does not matter much. If doing
a second request you could always use request_firmware_direct(), right?
Regards,
Arend
> This was found with the following SmPL patch.
>
> @ firmware_not_critical @
> expression cf;
> expression config_file;
> expression dev;
> int ret;
> identifier l;
> statement S;
> @@
>
> - ret = request_firmware(&cf, config_file, dev);
> + ret = request_firmware_direct(&cf, config_file, dev);
> if (ret < 0) {
> ... when != goto l;
> when != return ret;
> when any
> } else {
> ...
> release_firmware(cf);
> ...
> }
>
> Cc: Takashi Iwai <tiwai@suse.de>
> Cc: Christian Lamparter <chunkeey@googlemail.com>
> Cc: linux-wireless@vger.kernel.org
> Cc: cocci@systeme.lip6.fr
> Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
> ---
> drivers/net/wireless/p54/p54spi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/p54/p54spi.c b/drivers/net/wireless/p54/p54spi.c
> index de15171..63de5ee 100644
> --- a/drivers/net/wireless/p54/p54spi.c
> +++ b/drivers/net/wireless/p54/p54spi.c
> @@ -193,7 +193,7 @@ static int p54spi_request_eeprom(struct ieee80211_hw *dev)
> /* allow users to customize their eeprom.
> */
>
> - ret = request_firmware(&eeprom, "3826.eeprom", &priv->spi->dev);
> + ret = request_firmware_direct(&eeprom, "3826.eeprom", &priv->spi->dev);
> if (ret < 0) {
> #ifdef CONFIG_P54_SPI_DEFAULT_EEPROM
> dev_info(&priv->spi->dev, "loading default eeprom...\n");
>
next prev parent reply other threads:[~2014-06-25 7:26 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-24 22:39 [Cocci] [PATCH 0/3] drivers: expand usage of request_firmware_direct() Luis R. Rodriguez
2014-06-24 22:39 ` Luis R. Rodriguez
2014-06-24 22:39 ` [Cocci] [PATCH 1/3] mmc: vub300: use request_firmware_direct() for pseudo code Luis R. Rodriguez
2014-06-24 22:39 ` Luis R. Rodriguez
2014-06-24 22:39 ` [Cocci] [PATCH 2/3] cxgb4: make configuration load use request_firmware_direct() Luis R. Rodriguez
2014-06-24 22:39 ` Luis R. Rodriguez
2014-06-24 22:54 ` [Cocci] " Casey Leedom
2014-06-24 22:54 ` Casey Leedom
2014-06-25 1:50 ` [Cocci] " Luis R. Rodriguez
2014-06-25 1:50 ` Luis R. Rodriguez
2014-06-25 17:12 ` [Cocci] " Casey Leedom
2014-06-25 17:12 ` Casey Leedom
2014-06-25 17:31 ` [Cocci] " Luis R. Rodriguez
2014-06-25 17:31 ` Luis R. Rodriguez
2014-06-25 18:58 ` [Cocci] " Casey Leedom
2014-06-25 18:58 ` Casey Leedom
2014-06-25 20:05 ` [Cocci] " Luis R. Rodriguez
2014-06-25 20:05 ` Luis R. Rodriguez
2014-06-24 22:39 ` [Cocci] [PATCH 3/3] p54: use request_firmware_direct() for optional EEPROM override Luis R. Rodriguez
2014-06-24 22:39 ` Luis R. Rodriguez
2014-06-25 1:10 ` [Cocci] [RESEND][PATCH " Christian Lamparter
2014-06-25 1:10 ` Christian Lamparter
2014-06-25 7:26 ` Arend van Spriel [this message]
2014-06-25 7:26 ` [PATCH " Arend van Spriel
2014-06-25 8:06 ` [Cocci] " Luis R. Rodriguez
2014-06-25 8:06 ` Luis R. Rodriguez
2014-06-26 16:18 ` [Cocci] [PATCH 0/3] drivers: expand usage of request_firmware_direct() Takashi Iwai
2014-06-26 16:18 ` Takashi Iwai
2014-06-26 19:21 ` [Cocci] " Greg KH
2014-06-26 19:21 ` Greg KH
2014-07-08 22:25 ` [Cocci] " Greg KH
2014-07-08 22:25 ` Greg KH
2014-07-08 23:52 ` [Cocci] " Luis R. Rodriguez
2014-07-08 23:52 ` Luis R. Rodriguez
2014-07-09 0:24 ` [Cocci] " Greg KH
2014-07-09 0:24 ` Greg KH
2014-07-09 0:46 ` [Cocci] " Luis R. Rodriguez
2014-07-09 0:46 ` Luis R. Rodriguez
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=53AA799F.7030807@broadcom.com \
--to=arend@broadcom.com \
--cc=cocci@systeme.lip6.fr \
/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.