aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-09-27Staging: iio: adc: constify attribute_group structuresBhumika Goyal1-1/+1
Check for attribute_group structures that are only stored in the attrs filed of iio_info structure. As the attrs field of iio_info structures is constant, so these attribute_group structures can also be declared constant. Done using coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct attribute_group i@p = {...}; @ok1@ identifier r1.i; position p; struct iio_info x; @@ x.attrs=&i@p; @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct attribute_group i={...}; @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct attribute_group i; File size before: drivers/staging/iio/adc/ad7280a.o text data bss dec hex filename 6487 584 776 7847 1ea7 drivers/staging/iio/adc/ad7280a.o File size after: drivers/staging/iio/adc/ad7280a.o text data bss dec hex filename 6551 544 776 7871 1ebf drivers/staging/iio/adc/ad7280a.o Signed-off-by: Bhumika Goyal <[email protected]> Acked-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-27staging: wilc1000: fix sparse warning: symbol was not declared. Should it be ↵Matias Mucciolo1-1/+1
static? - Fixed a sparse warning: wilc_debugfs.c:32:10: warning: symbol 'WILC_DEBUG_LEVEL' was not declared. Should it be static? Signed-off-by: Matias Mucciolo <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-27Staging: wilc1000: constify cfg80211_ops structuresBhumika Goyal1-1/+1
Check for cfg80211_ops structures that are only passed as the first argument to the function wiphy_new. As this argument is constant, so cfg80211_ops structures having this property can also be declared constant. Done using coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct cfg80211_ops i@p = {...}; @ok1@ identifier r1.i; position p; expression e1; @@ wiphy_new(&i@p,e1) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct cfg80211_ops i={...}; @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct cfg80211_ops i; File size before: text data bss dec hex filename 17468 2417 14912 34797 87ed drivers/staging/wilc1000/wilc_wfi_cfgoperations.o File size after: text data bss dec hex filename 18204 1681 14912 34797 87ed drivers/staging/wilc1000/wilc_wfi_cfgoperations.o Signed-off-by: Bhumika Goyal <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-27staging: lustre: llite: add missing LMV_MAGIC_V1 casewang di2-0/+5
The port to upstream dropped handling the LMV_MAGIC_V1 case for ll_dir_getstripe. This adds it back. Signed-off-by: wang di <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3531 Reviewed-on: http://review.whamcloud.com/7228 Reviewed-by: Andreas Dilger <[email protected]> Reviewed-by: John L. Hammond <[email protected]> Reviewed-by: Alex Zhuravlev <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: James Simmons <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-27greybus: manifest: style fix missing space before '('Quentin Lambert1-1/+1
Checkpatch printed a style ERROR concerning a missing space before '('. This patch fixes this issue. Signed-off-by: Quentin Lambert <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-27staging: greybus/timesync: avoid divide by zero on X86 QemuBryan O'Donoghue1-2/+7
A system configured without CONFIG_CPUFREQ will return 0 for cpufreq_get(). greybus-timesync can subsequently then do a divide-by-zero as result. This patch fixes by checking for a zero return value from cpufreq_get() and setting to a default value of 19.2MHz. Reported-by: Rui Miguel Silva <[email protected]> Signed-off-by: Bryan O'Donoghue <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-27drivers/staging/greybus: gpio.c - Fixed a checkpatch generated warningChase Metzger1-2/+1
Removed braces for single line if statement. Signed-off-by: Chase Metzger <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-27greybus: audio: fix uninitialized variable errors found by cppcheckVaibhav Agarwal1-2/+3
Currently, if info is null, the dev_err message is dereferencing an uninitialized module pointer. Instead, it should use codec->dev pointer in dev_err call and better align with other err msg in this function. Also, ret variable might be used uninitialized in a specific case. Avoid using it this way. Found using static analysis with cppcheck: Checking drivers/staging/greybus/audio_topology.c... [drivers/staging/greybus/audio_topology.c:175]: (error) Uninitialized variable: module [drivers/staging/greybus/audio_topology.c:495]: (error) Uninitialized variable: ret Reported-by: Colin Ian King <[email protected]> Signed-off-by: Vaibhav Agarwal <[email protected]> Acked-by: Viresh Kumar <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-26staging: rtl8192e: fixed block comments should align the * on each lineDarryl T. Agostinelli1-1/+1
shifted over comment block one space Signed-off-by: Darryl T. Agostinelli <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-26staging: rtl8172: usb_intf.c: Fixed block comment coding styleGonçalo Salazar1-1/+1
Fixed a block comment indentation in the rtl8712 usb_intf.c file. Signed-off-by: Gonçalo Salazar <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: wlan-ng: fix block comments style errorsSergio Paracuellos1-67/+68
This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: Block comments should align the * on each line Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: wlan-ng: avoid new typedef: p80211item_unk4096_tSergio Paracuellos2-4/+4
This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211item_unk4096_t Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: wlan-ng: avoid new typedef: p80211item_unk1024_tSergio Paracuellos2-3/+3
This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211item_unk1024_t Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: wlan-ng: avoid new typedef: p80211item_unk392_tSergio Paracuellos3-5/+5
This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211item_unk392_t Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: wlan-ng: avoid new typedef: p80211item_pstr255_tSergio Paracuellos1-2/+2
This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211item_pstr255_t Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: wlan-ng: avoid new typedef: p80211item_pstr32_tSergio Paracuellos3-8/+8
This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211item_pstr32_t Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: wlan-ng: avoid new typedef: p80211item_pstr14_tSergio Paracuellos2-3/+3
This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211item_pstr14_t Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: wlan-ng: avoid new typedef: p80211item_pstr6_tSergio Paracuellos3-6/+6
This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211item_pstr6_t Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: wlan-ng: avoid new typedef: p80211item_uint32_tSergio Paracuellos5-120/+120
This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211item_uint32_t Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: wlan-ng: avoid new typedef: p80211itemd_tSergio Paracuellos4-7/+7
This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211itemd_t Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: wlan-ng: avoid new typedef: p80211item_tSergio Paracuellos1-2/+2
This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211item_t Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: wlan-ng: avoid new typedef: p80211macarray_tSergio Paracuellos1-2/+2
This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211macarray_t Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: wlan-ng: avoid new typedef: p80211pstr32_tSergio Paracuellos2-4/+4
This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211pstr32_t Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: wlan-ng: avoid new typedef: p80211pstr14_tSergio Paracuellos1-3/+3
This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211pstr14_t Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: wlan-ng: avoid new typedef: p80211pstr6_tSergio Paracuellos1-3/+3
This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211pstr6_t Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: wlan-ng: avoid new typedef: p80211pstr255_tSergio Paracuellos1-3/+3
This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211pstr255_t Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: wlan-ng: avoid new typedef: p80211pstrd_tSergio Paracuellos6-22/+22
This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211pstrd_t Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: dgnc: Fix comment alignmentFernando Apesteguia1-1/+1
As reported by checkpatch. Signed-off-by: Fernando Apesteguia <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: lustre: ldlm: Fix extern variable declarationImre Deak2-2/+1
Move the extern declaration to a header file common to all users of the variable. This fixes the following sparse warning: symbol 'ldlm_cancel_unused_locks_before_replay' was not declared. Should it be static? Signed-off-by: Imre Deak <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: rtl8188eu: core: rtw_security: Remove return statement from void ↵Georgiana Rodica Chelu1-1/+0
function Remove the return statement from the end of a void function to clean up the code. Issue found by checkpatch.pl script. Signed-off-by: Georgiana Rodica Chelu <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: rtl8188eu: core: rtw_mlme: Remove return statement from void functionGeorgiana Rodica Chelu1-2/+0
Remove the return statement from the end of a void function to clean up the code. Issue found by checkpatch.pl script. Signed-off-by: Georgiana Rodica Chelu <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: rts5208: fix style warnings in xd.cSergio Paracuellos1-24/+14
This patch fixes the following checkpatch.pl warning in xd.c: WARNING: else is not generally useful after a break or return It also makes code more uniform with the new changes Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: rts5208: fix style warnings in sd.cSergio Paracuellos1-112/+61
This patch fixes the following checkpatch.pl warning in sd.c: WARNING: else is not generally useful after a break or return It also makes code more uniform with the new changes Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: rts5208: fix line style warnings in spi.cSergio Paracuellos1-1/+2
This patch fixes the following checkpatch.pl warning in spi.c: WARNING: line over 80 characters Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: rts5208: remove not used typedef in rtsx_sys.hSergio Paracuellos1-2/+0
This patch fixes the following checkpatch.pl warning in rtsx_sys.h: WARNING: do not add new typedefs Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: rts5208: fix comment blocks style in rtsx.hSergio Paracuellos1-2/+4
This patch fixes the following checkpatch.pl warning in rtsx.h: WARNING: Block comments use a trailing */ on a separate line Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: rts5208: fix comment blocks style in rtsx_chip.hSergio Paracuellos1-25/+27
This patch fixes the following checkpatch.pl warning in rtsx_chip.h: WARNING: Block comments use a trailing */ on a separate line Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: rts5208: avoid symbolic permissions in rtsx.cSergio Paracuellos1-6/+6
This patch fixes the following checkpatch.pl warning in rtsx.c: WARNING: Symbolic permissions are not preferred. Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: rts5208: avoid new typedef in rtsx.h: rtsx_dev_tSergio Paracuellos2-5/+1
This patch fixes the following checkpatch.pl warning in rtsx.h: WARNING: do not add new typedefs It also remove DELAY_PARA_T because code is not using it. Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: wlan-ng: avoid new typedef: p80211pstr_tSergio Paracuellos1-2/+2
This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211pstr_t Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: wlan-ng: avoid new typedef: p80211enum_tSergio Paracuellos1-22/+22
This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211enum_t. Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: wlan-ng: avoid new typedef: p80211enumpair_tSergio Paracuellos1-3/+3
This patch fixes the following checkpatch.pl warning in p80211types.h: WARNING: do not add new typedefs It applies for typedef p80211enumpair_t. Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: ion: Align cases with switchChristopher Pezley1-9/+9
The preferred indentation for cases and switches has the cases at the same level as the switch. Signed-off-by: Christopher H. Pezley <[email protected]> Acked-by: Laura Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: ion: Fix a coding style issueAntti Keränen1-12/+12
This patch fixes the alignment of an allocation flag block comment and moves the comments before each #define. Signed-off-by: Antti Keränen <[email protected]> Acked-by: Laura Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: ks7010: ks_wlan_net: Remove return statement from void functionGeorgiana Rodica Chelu1-4/+0
Remove the return statement from the end of a void function to clean up the code. Issue found by checkpatch.pl script. Signed-off-by: Georgiana Rodica Chelu <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-25staging: ks7010: ks_wlan_net: Remove unnecessary variable used to store ↵Georgiana Rodica Chelu1-2/+1
return value Remove unneeded code in order to make clear that the function returns 0(success) in all cases. Done using returnvar.cocci script. Signed-off-by: Georgiana Rodica Chelu <[email protected]> Acked-by: Julia Lawall <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-23Staging: ks7010: remove unused function in ks_wlan_net.cBaoyou Xie1-5/+0
We get 1 warning when building kernel with W=1: drivers/staging/ks7010/ks_wlan_net.c:3520:5: warning: no previous prototype for 'ks_wlan_reset' [-Wmissing-prototypes] In fact, these functions are unused in ks_wlan_net.c, but should be removed. So this patch removes the unused function. Signed-off-by: Baoyou Xie <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-23staging: rtl8192u: remove unused functions in r8192U_core.cBaoyou Xie1-49/+0
We get 2 warnings when building kernel with W=1: drivers/staging/rtl8192u/r8192U_core.c:925:12: warning: no previous declaration for 'ieeerate2rtlrate' [-Wmissing-declarations] drivers/staging/rtl8192u/r8192U_core.c:958:12: warning: no previous declaration for 'rtl8192_rate2rate' [-Wmissing-declarations] drivers/staging/rtl8192u/r8192U_core.c:1322:11: warning: no previous declaration for 'rtl8192_IsWirelessBMode' [-Wmissing-declarations] In fact, these functions are unused in r8192U_core.c, but should be removed. So this patch removes the unused functions. Signed-off-by: Baoyou Xie <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-23staging: rtl8192u: ieee80211: ieee80211_softmac: mark symbols static where ↵Baoyou Xie1-6/+10
possible We get 5 warnings when building kernel with W=1: drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:287:13: warning: no previous declaration for 'softmac_ps_mgmt_xmit' [-Wmissing-declarations] drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:323:24: warning: no previous declaration for 'ieee80211_probe_req' [-Wmissing-declarations] drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:643:24: warning: no previous declaration for 'ieee80211_authentication_req' [-Wmissing-declarations] drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:981:24: warning: no previous declaration for 'ieee80211_association_req' [-Wmissing-declarations] drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:3094:24: warning: no previous declaration for 'ieee80211_disassociate_skb' [-Wmissing-declarations] In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. so this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-23staging: android: ion: mark symbols static where possibleBaoyou Xie2-11/+11
We get 4 warnings when building kernel with W=1: drivers/staging/android/ion/ion_carveout_heap.c:36:17: warning: no previous prototype for 'ion_carveout_allocate' [-Wmissing-prototypes] drivers/staging/android/ion/ion_carveout_heap.c:50:6: warning: no previous prototype for 'ion_carveout_free' [-Wmissing-prototypes] drivers/staging/android/ion/ion_of.c:28:5: warning: no previous prototype for 'ion_parse_dt_heap_common' [-Wmissing-prototypes] drivers/staging/android/ion/ion_of.c:54:5: warning: no previous prototype for 'ion_setup_heap_common' [-Wmissing-prototypes] In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. so this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>