diff options
| author | Gargi Sharma <[email protected]> | 2017-03-02 11:16:14 +0530 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2017-03-09 14:13:51 +0100 |
| commit | feb254a7b5f9b4916c4cb9019ccc4fbfab7dc4f9 (patch) | |
| tree | 17af62320f8bc46eace3038c78534cd8bf581af7 /tools/perf/scripts/python/call-graph-from-postgresql.py | |
| parent | 08680307eb876e389e068ae75f6f6a84248e2263 (diff) | |
staging: rtl8192u: Constify ieee80211_qos_parameters structure
Declare ieee80211_qos_parameters structure constant it is only passed
as src parameter to the function memcpy. The fields of
def_qos_parameters structure are never modified and hence it can be
declared as const.
Coccinelle Script:
@r1 disable optional_qualifier@
identifier i;
position p;
@@
static struct ieee80211_qos_parameters i@p ={...};
@ok1@
identifier r1.i;
position p;
expression e1,e2;
@@
memcpy(e1,&i@p,e2)
@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p
@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct ieee80211_qos_parameters i={...};
Signed-off-by: Gargi Sharma <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions