2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-17 10:04:14 +08:00
linux-next/drivers/staging/rtl8192u
Gargi Sharma feb254a7b5 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 <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09 14:13:51 +01:00
..
ieee80211 staging: rtl8192u: Replace "the the " with "the" 2017-03-07 20:15:18 +01:00
authors
changes
copying
Kconfig
Makefile
r819xU_cmdpkt.c staging: rtl8192u: Replace "is is" with "is" 2017-03-07 20:00:22 +01:00
r819xU_cmdpkt.h Staging: rtl8192u: r819xU_cmdpkt.h - style fix 2017-02-12 13:37:13 +01:00
r819xU_firmware_img.c
r819xU_firmware_img.h
r819xU_firmware.c staging: rtl8192u: Fixing no new typedef warning 2017-02-12 13:48:33 +01:00
r819xU_firmware.h
r819xU_phy.c Staging: rtl8192u: r819xU_phy.c - style fix 2017-02-12 13:35:26 +01:00
r819xU_phy.h
r819xU_phyreg.h
r8180_93cx6.c Staging: rtl8192u: r8180_93cx6.c - style fix 2017-02-12 13:40:47 +01:00
r8180_93cx6.h staging: rtl8192u: Removed multiple white lines. 2017-01-16 18:08:57 +01:00
r8190_rtl8256.c Staging: rtl8192u: r8190_rtl8256.c - style fix 2017-02-12 13:40:47 +01:00
r8190_rtl8256.h Staging: rtl8192u: r8190_rtl8256.h - style fix 2017-02-12 13:40:47 +01:00
r8192U_core.c staging: rtl8192u: Constify ieee80211_qos_parameters structure 2017-03-09 14:13:51 +01:00
r8192U_dm.c Staging: rtl8192u: Remove useless type conversion 2016-09-20 13:35:45 +02:00
r8192U_dm.h
r8192U_hw.h Staging: rtl8192u: r8192U_hw.h - style fix 2017-02-12 13:40:47 +01:00
r8192U_wx.c staging: rtl8192u: Fix indentation 2017-02-09 13:23:13 +01:00
r8192U_wx.h
r8192U.h Staging: rtl8192u: r8192U.h - style fix 2017-02-16 10:41:22 -08:00