* re: ath9k: dfs move ath_dfs_pool_stats
@ 2013-11-01 10:26 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2013-11-01 10:26 UTC (permalink / raw)
To: janusz.dziedzic; +Cc: linux-wireless, ath9k-devel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-11-01 10:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-01 10:26 ath9k: dfs move ath_dfs_pool_stats Dan Carpenter
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).