From: Dan Carpenter <error27@gmail.com>
To: Lingbo Kong <quic_lingbok@quicinc.com>
Cc: linux-wireless@vger.kernel.org, ath12k@lists.infradead.org
Subject: [bug report] wifi: ath12k: Add support for reading variant from ACPI to download board data file
Date: Fri, 24 Apr 2026 11:59:31 +0300 [thread overview]
Message-ID: <aesw8xC4txXCTlw-@stanley.mountain> (raw)
Hello Lingbo Kong,
Commit 0a43c3a520e9 ("wifi: ath12k: Add support for reading variant
from ACPI to download board data file") from Jan 13, 2025
(linux-next), leads to the following Smatch static checker warning:
drivers/net/wireless/ath/ath12k/acpi.c:395 ath12k_acpi_start()
warn: set error code if 'ab->acpi.bdf_string[0] == 0'
drivers/net/wireless/ath/ath12k/acpi.c
351 int ath12k_acpi_start(struct ath12k_base *ab)
352 {
353 acpi_status status;
354 int ret;
355
356 ab->acpi.acpi_tas_enable = false;
357 ab->acpi.acpi_disable_11be = false;
358 ab->acpi.acpi_disable_rfkill = false;
359 ab->acpi.acpi_bios_sar_enable = false;
360 ab->acpi.acpi_cca_enable = false;
361 ab->acpi.acpi_band_edge_enable = false;
362 ab->acpi.acpi_enable_bdf = false;
363 ab->acpi.bdf_string[0] = '\0';
364
365 if (!ab->hw_params->acpi_guid)
366 /* not supported with this hardware */
367 return 0;
368
369 ret = ath12k_acpi_dsm_get_data(ab, ATH12K_ACPI_DSM_FUNC_SUPPORT_FUNCS);
370 if (ret) {
371 ath12k_dbg(ab, ATH12K_DBG_BOOT, "failed to get ACPI DSM data: %d\n", ret);
372 return ret;
373 }
374
375 if (ATH12K_ACPI_FUNC_BIT_VALID(ab->acpi, ATH12K_ACPI_FUNC_BIT_DISABLE_FLAG)) {
376 ret = ath12k_acpi_dsm_get_data(ab, ATH12K_ACPI_DSM_FUNC_DISABLE_FLAG);
377 if (ret) {
378 ath12k_warn(ab, "failed to get ACPI DISABLE FLAG: %d\n", ret);
379 return ret;
380 }
381
382 if (ATH12K_ACPI_CHEK_BIT_VALID(ab->acpi,
383 ATH12K_ACPI_DSM_DISABLE_11BE_BIT))
384 ab->acpi.acpi_disable_11be = true;
385
386 if (!ATH12K_ACPI_CHEK_BIT_VALID(ab->acpi,
387 ATH12K_ACPI_DSM_DISABLE_RFKILL_BIT))
388 ab->acpi.acpi_disable_rfkill = true;
389 }
390
391 if (ATH12K_ACPI_FUNC_BIT_VALID(ab->acpi, ATH12K_ACPI_FUNC_BIT_BDF_EXT)) {
392 ret = ath12k_acpi_dsm_get_data(ab, ATH12K_ACPI_DSM_FUNC_BDF_EXT);
393 if (ret || ab->acpi.bdf_string[0] == '\0') {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Should we set the error code for an empty string?
394 ath12k_warn(ab, "failed to get ACPI BDF EXT: %d\n", ret);
--> 395 return ret;
396 }
397
398 ab->acpi.acpi_enable_bdf = true;
399 }
400
401 if (ATH12K_ACPI_FUNC_BIT_VALID(ab->acpi, ATH12K_ACPI_FUNC_BIT_TAS_CFG)) {
402 ret = ath12k_acpi_dsm_get_data(ab, ATH12K_ACPI_DSM_FUNC_TAS_CFG);
403 if (ret) {
404 ath12k_warn(ab, "failed to get ACPI TAS config table: %d\n", ret);
This email is a free service from the Smatch-CI project [smatch.sf.net].
regards,
dan carpenter
reply other threads:[~2026-04-24 8:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=aesw8xC4txXCTlw-@stanley.mountain \
--to=error27@gmail.com \
--cc=ath12k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_lingbok@quicinc.com \
/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