From: "Andreas Färber" <afaerber@suse.de>
To: Ben Whitten <ben.whitten@gmail.com>
Cc: starnight@g.ncu.edu.tw, hasnain.virk@arm.com,
netdev@vger.kernel.org, liuxuenetmail@gmail.com,
shess@hessware.de, Ben Whitten <ben.whitten@lairdtech.com>
Subject: Re: [PATCH lora-next v2 5/8] net: lora: sx1301: remove duplicate firmware size checks
Date: Thu, 9 Aug 2018 22:58:48 +0200 [thread overview]
Message-ID: <e570b048-a2ef-c731-4d05-a0872850579d@suse.de> (raw)
In-Reply-To: <1533818018-29005-5-git-send-email-ben.whitten@lairdtech.com>
Am 09.08.2018 um 14:33 schrieb Ben Whitten:
> No need to check the size of the firmware multiple times, just do it once
> in the function responsible for loading as the firmwares are the same size.
>
> Signed-off-by: Ben Whitten <ben.whitten@lairdtech.com>
> ---
> drivers/net/lora/sx1301.c | 21 +++------------------
> 1 file changed, 3 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/net/lora/sx1301.c b/drivers/net/lora/sx1301.c
> index 3f2a532..916ee40 100644
> --- a/drivers/net/lora/sx1301.c
> +++ b/drivers/net/lora/sx1301.c
> @@ -293,8 +293,10 @@ static int sx1301_load_firmware(struct sx1301_priv *priv, int mcu, const struct
> u8 val, rst, select_mux;
> int ret;
>
> - if (fw->size > 8192)
> + if (fw->size != 8192) {
Note the original intention here was to allow loading firmware smaller
than the maximum size, but we can revisit that later if we ever have
such a firmware.
Applied.
Thanks,
Andreas
--
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
next prev parent reply other threads:[~2018-08-09 23:25 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-09 12:33 [PATCH lora-next v2 1/8] net: lora: add methods for devm registration Ben Whitten
2018-08-09 12:33 ` [PATCH lora-next v2 2/8] net: lora: sx1301: convert to devm registration of netdev Ben Whitten
2018-08-09 19:27 ` Andreas Färber
2018-08-09 12:33 ` [PATCH lora-next v2 3/8] net: lora: sx1301: convert to passing priv data throughout Ben Whitten
2018-08-09 20:43 ` Andreas Färber
2018-08-09 21:06 ` Ben Whitten
2018-08-09 21:21 ` Andreas Färber
2018-08-09 12:33 ` [PATCH lora-next v2 4/8] net: lora: sx1301: convert load_firmware to take firmware directly Ben Whitten
2018-08-09 20:48 ` Andreas Färber
2018-08-09 12:33 ` [PATCH lora-next v2 5/8] net: lora: sx1301: remove duplicate firmware size checks Ben Whitten
2018-08-09 20:58 ` Andreas Färber [this message]
2018-08-09 12:33 ` [PATCH lora-next v2 6/8] net: lora: sx1301: replace version and size magic numbers with defines Ben Whitten
2018-08-09 21:11 ` Andreas Färber
2018-08-09 12:33 ` [PATCH lora-next v2 7/8] net: lora: sx1301: add initial registration for regmap Ben Whitten
2018-08-09 21:58 ` Andreas Färber
2018-08-09 12:33 ` [PATCH lora-next v2 8/8] net: lora: sx1301: convert driver over to regmap reads and writes Ben Whitten
2018-08-09 22:34 ` Andreas Färber
2018-08-09 22:47 ` Ben Whitten
2018-08-10 0:17 ` Andreas Färber
2018-08-09 19:18 ` [PATCH lora-next v2 1/8] net: lora: add methods for devm registration Andreas Färber
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=e570b048-a2ef-c731-4d05-a0872850579d@suse.de \
--to=afaerber@suse.de \
--cc=ben.whitten@gmail.com \
--cc=ben.whitten@lairdtech.com \
--cc=hasnain.virk@arm.com \
--cc=liuxuenetmail@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=shess@hessware.de \
--cc=starnight@g.ncu.edu.tw \
/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).