Kalle Valo
2016-12-01 11:18:07 UTC
Declare the structure ath_bus_ops as const as it is only passed as an
argument to the function ath9k_init_device. This argument is of type
const struct ath_bus_ops *, so ath_bus_ops structures with this property
can be declared as const.
@r1 disable optional_qualifier @
identifier i;
position p;
@@
@ok1@
identifier r1.i;
position p;
expression e1,e2;
@@
@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct ath_bus_ops i={...};
@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct ath_bus_ops i;
text data bss dec hex filename
1295 232 0 1527 5f7 ath/ath9k/ahb.o
text data bss dec hex filename
1359 176 0 1535 5ff ath/ath9k/ahb.o
Patch applied to ath-next branch of ath.git, thanks.argument to the function ath9k_init_device. This argument is of type
const struct ath_bus_ops *, so ath_bus_ops structures with this property
can be declared as const.
@r1 disable optional_qualifier @
identifier i;
position p;
@@
@ok1@
identifier r1.i;
position p;
expression e1,e2;
@@
@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct ath_bus_ops i={...};
@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct ath_bus_ops i;
text data bss dec hex filename
1295 232 0 1527 5f7 ath/ath9k/ahb.o
text data bss dec hex filename
1359 176 0 1535 5ff ath/ath9k/ahb.o
8ca5a6078d6d ath9k: constify ath_bus_ops structure
--
https://patchwork.kernel.org/patch/9448851/
Documentation about submitting wireless patches and checking status
from patchwork:
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
https://patchwork.kernel.org/patch/9448851/
Documentation about submitting wireless patches and checking status
from patchwork:
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches