From: Dan Carpenter <dan.carpenter@oracle.com>
To: janusz.dziedzic@tieto.com
Cc: linux-wireless@vger.kernel.org, ath9k-devel@venema.h4ckr.net
Subject: re: ath9k: dfs move ath_dfs_pool_stats
Date: Fri, 1 Nov 2013 13:26:14 +0300 [thread overview]
Message-ID: <20131101102614.GG29795@longonot.mountain> (raw)
Hello Janusz Dziedzic,
This is a semi-automatic email about new static checker warnings.
The patch d265214b614a: "ath9k: dfs move ath_dfs_pool_stats" from Oct
14, 2013, leads to the following Smatch complaint:
drivers/net/wireless/ath/ath9k/dfs_debug.c:67 read_file_dfs()
error: we previously assumed 'sc->dfs_detector' could be null (see line 47)
drivers/net/wireless/ath/ath9k/dfs_debug.c
46
47 if (sc->dfs_detector)
^^^^^^^^^^^^^^^^
Patch introduces a new check.
48 dfs_pool_stats = sc->dfs_detector->get_stats(sc->dfs_detector);
49
50 len += scnprintf(buf + len, size - len, "DFS support for "
51 "macVersion = 0x%x, macRev = 0x%x: %s\n",
52 hw_ver->macVersion, hw_ver->macRev,
53 (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_DFS) ?
54 "enabled" : "disabled");
55 len += scnprintf(buf + len, size - len, "Pulse detector statistics:\n");
56 ATH9K_DFS_STAT("pulse events reported ", pulses_total);
57 ATH9K_DFS_STAT("invalid pulse events ", pulses_no_dfs);
58 ATH9K_DFS_STAT("DFS pulses detected ", pulses_detected);
59 ATH9K_DFS_STAT("Datalen discards ", datalen_discards);
60 ATH9K_DFS_STAT("RSSI discards ", rssi_discards);
61 ATH9K_DFS_STAT("BW info discards ", bwinfo_discards);
62 ATH9K_DFS_STAT("Primary channel pulses ", pri_phy_errors);
63 ATH9K_DFS_STAT("Secondary channel pulses", ext_phy_errors);
64 ATH9K_DFS_STAT("Dual channel pulses ", dc_phy_errors);
65 len += scnprintf(buf + len, size - len, "Radar detector statistics "
66 "(current DFS region: %d)\n",
67 sc->dfs_detector->region);
^^^^^^^^^^^^^^^^^^^^^^^^^
Existing unchecked dereference.
68 ATH9K_DFS_STAT("Pulse events processed ", pulses_processed);
69 ATH9K_DFS_STAT("Radars detected ", radar_detected);
regards,
dan carpenter
reply other threads:[~2013-11-01 10:29 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=20131101102614.GG29795@longonot.mountain \
--to=dan.carpenter@oracle.com \
--cc=ath9k-devel@venema.h4ckr.net \
--cc=janusz.dziedzic@tieto.com \
--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