Skip to content

Commit 8136fd5

Browse files
JuliaLawallKalle Valo
authored andcommitted
ath: constify local structures
For structure types defined in the same file or local header files, find top-level static structure declarations that have the following properties: 1. Never reassigned. 2. Address never taken 3. Not passed to a top-level macro call 4. No pointer or array-typed field passed to a function or stored in a variable. Declare structures having all of these properties as const. Done using Coccinelle. Based on a suggestion by Joe Perches <[email protected]>. Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
1 parent 0cd7f70 commit 8136fd5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/wireless/ath/dfs_pattern_detector.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ static bool dpd_set_domain(struct dfs_pattern_detector *dpd,
338338
return true;
339339
}
340340

341-
static struct dfs_pattern_detector default_dpd = {
341+
static const struct dfs_pattern_detector default_dpd = {
342342
.exit = dpd_exit,
343343
.set_dfs_domain = dpd_set_domain,
344344
.add_pulse = dpd_add_pulse,

0 commit comments

Comments
 (0)