From: Kalle Valo <kvalo@qca.qualcomm.com>
To: <ath10k@lists.infradead.org>
Cc: <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 2/2] ath10k: check otp.bin result
Date: Tue, 11 Mar 2014 19:10:54 +0200 [thread overview]
Message-ID: <877g80hd9d.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <20140311153328.7148.50188.stgit@potku.adurom.net> (Kalle Valo's message of "Tue, 11 Mar 2014 17:33:28 +0200")
Kalle Valo <kvalo@qca.qualcomm.com> writes:
> When we execute otp.bin in the target check that the result it returns doesn't
> contain an error. This is to make sure that we don't accidentally use invalid
> calibration data.
>
> While at it, remove the useless label in the function and add few debug messages.
>
> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
> ---
> drivers/net/wireless/ath/ath10k/core.c | 21 ++++++++++++++++-----
> 1 file changed, 16 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
> index 602fb9644cbf..e8f419144db6 100644
> --- a/drivers/net/wireless/ath/ath10k/core.c
> +++ b/drivers/net/wireless/ath/ath10k/core.c
> @@ -254,23 +254,34 @@ static int ath10k_download_and_run_otp(struct ath10k *ar)
>
> /* OTP is optional */
>
> - if (!ar->otp_data || !ar->otp_len)
> + if (!ar->otp_data || !ar->otp_len) {
> + ath10k_warn("Not running otp, calibration will be incorrect!\n");
> return 0;
> + }
> +
> + ath10k_dbg(ATH10K_DBG_BOOT, "boot upload otp to 0x%x len %d\n",
> + address, ar->otp_len);
This one introduces a warning:
>> drivers/net/wireless/ath/ath10k/core.c:263:6: warning: format '%d' expects argument of type 'int', but argument 4 has type 'size_t' [-Wformat=]
address, ar->otp_len);
I fixed it to this:
ath10k_dbg(ATH10K_DBG_BOOT, "boot upload otp to 0x%x len %zd\n",
address, ar->otp_len);
--
Kalle Valo
next prev parent reply other threads:[~2014-03-11 17:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-11 15:33 [PATCH 1/2] ath10k: separate result parameter in ath10k_bmi_execute() Kalle Valo
2014-03-11 15:33 ` [PATCH 2/2] ath10k: check otp.bin result Kalle Valo
2014-03-11 17:10 ` Kalle Valo [this message]
2014-03-21 14:49 ` [PATCH 1/2] ath10k: separate result parameter in ath10k_bmi_execute() 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=877g80hd9d.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@qca.qualcomm.com \
--cc=ath10k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
/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).