- Oct 04, 2017
-
-
Colin Ian King authored
The structures created from macros RTL_DEBUG_IMPL_MAC_SERIES, RTL_DEBUG_IMPL_BB_SERIES, RTL_DEBUG_IMPL_RF_SERIES and RTL_DEBUG_IMPL_CAM_SERIES are all local to the source and do not need to be in global scope, so make them static. Cleans up 37 sparse warnings of the form: symbol 'rtl_debug_priv_mac_0' was not declared. Should it be static? Signed-off-by:
Colin Ian King <colin.king@canonical.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Dan Carpenter authored
I'm not totally certain that it's necessary to put an upper limit here. I think it happens at lower levels. But if we are going to do that then we should have a lower bound as well. Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christophe JAILLET authored
If 'rtl8192_usb_initendpoints()' fails, it may have allocated some resources that need to be freed. The corresponding is propagated up to 'rtl8192_usb_prob()'. So, in this function if an error code is returned by 'rtl8192_init()' we should call 'rtl8192_usb_deleteendpoints()'. Some error handling code is also duplicated in 'rtl8192_init()' and in 'rtl8192_usb_prob()'. This looks harmless because the freed pointers are set to NULL but it looks confusing. Fix all that by just moving the 'fail' label and removing duplicated error handling code from 'rtl8192_ini()'. All this resources freeing will be handled by 'rtl8192_usb_prob()' directly. The calling graph is: rtl8192_usb_probe --> rtl8192_init --> rtl8192_usb_initendpoints Signed-off-by:Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christophe JAILLET authored
If one of these memory allocations fail, a NULL pointer dereference will occur later on. Return -ENOMEM instead. There is no need to free the resources already allocated, this is done by the caller (i.e. 'rtl8192_usb_probe()') which calls 'rtl8192_usb_deleteendpoints()'. The calling graph is: rtl8192_usb_probe --> rtl8192_init --> rtl8192_usb_initendpoints Signed-off-by:Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Colin Ian King authored
Don't populate const array broadcast_addr on the stack, instead make it static. Makes the object code smaller by over 40 bytes: Before: text data bss dec hex filename 63906 8248 1216 73370 11e9a rtllib_softmac.o After: text data bss dec hex filename 63806 8304 1216 73326 11e6e rtllib_softmac.o (gcc 6.3.0, x86-64) Signed-off-by:
Colin Ian King <colin.king@canonical.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Bhumika Goyal authored
Make this const as it is only stored in a const field of a pci_dev structure. Make the declaration in the header const too. Structure found using Coccinelle and changes done by hand. Signed-off-by:
Bhumika Goyal <bhumirks@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérémy Lefaure authored
Using the ARRAY_SIZE macro improves the readability of the code. Also, it is not always useful to use a variable to store this constant calculated at compile time. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by:
Jérémy Lefaure <jeremy.lefaure@lse.epita.fr> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérémy Lefaure authored
Using the ARRAY_SIZE macro improves the readability of the code. Also, it is useless to use a variable to store this constant calculated at compile time. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by:
Jérémy Lefaure <jeremy.lefaure@lse.epita.fr> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ioana Radulescu authored
For some dpio functions, a cpu id parameter value of -1 is valid and means "any". But when trying to validate this param value against an upper limit, in this case num_possible_cpus(), we risk obtaining the wrong result due to an implicit cast. Avoid an incorrect check result by explicitly comparing the cpu id with the "any" value before verifying the upper bound. Signed-off-by:
Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Suniel Mahesh authored
Fixes checkpatch warnings: WARNING: else is not generally useful after a break or return Signed-off-by:
Suniel Mahesh <sunil.m@techveda.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gilad Ben-Yossef authored
Simplify handling of memory allocation failures and remove redundant log messages Signed-off-by:
Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gilad Ben-Yossef authored
Move over from using macro wrappers around to printk to dev_err, dev_dbg and friends and clean up resulting fallout. Signed-off-by:
Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gilad Ben-Yossef authored
Introduce a function to retrieve struct device from private data structure in preparation to replacing custom logging macros with proper dev_dbg and friends which require struct device. Signed-off-by:
Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gilad Ben-Yossef authored
The ccree cycle count mechanism was removed in commit 7f821f0c ("staging: ccree: remove cycle count debug support") but the sysfs interface lingered on. Remove it now. Signed-off-by:
Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Srishti Sharma authored
For variables that have type struct list_head* use list_entry to access current list element instead of using container_of. Done using the following semantic patch by coccinelle. @r@ identifier e; struct list_head* l; @@ <... when != l == NULL l; ...> ( e= -container_of +list_entry ( ...) ) Signed-off-by:Srishti Sharma <srishtishar@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mihaela Muraru authored
Move constant to the right side of comparison operator. Issue found by checkpatch.pl Signed-off-by:
Mihaela Muraru <mihaela.muraru21@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mihaela Muraru authored
This patch fix a coding style issue, by removing braces {} from single statement blocks. Issue found by checkpatch.pl. Signed-off-by:Mihaela Muraru <mihaela.muraru21@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Keerthi Reddy authored
This commit changes changes left shift operator to use BIT macro Signed-off-by:
Keerthi Reddy <keerthigd4990@gmail.com> Acked-by:
Julia Lawall <julia.lawall@lip6.fr> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Shreeya Patel authored
Remove unnecessary comments which are there to explain why call to memset is in comments. Both of the comments are not needed as they are not very useful. Signed-off-by:
Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mihaela Muraru authored
This patch removes typedef from struct and renames it from "_dvi_ctrl_device_t" to "dvi_ctrl_device" as per kernel coding standards. Issue found by checpatch.pl Signed-off-by:
Mihaela Muraru <mihaela.muraru21@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Keerthi Reddy authored
Removing this will make sure that we are actually working with enum. Also it is not a good coding style to use typedef. In this commit remove typedef and also drop '_t' which traditionally means typedef Signed-off-by:
Keerthi Reddy <keerthigd4990@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Keerthi Reddy authored
Using typedef will hide that 'DPMS_t' is enum. Removing this will make sure that we are actually working with enum. Also it is not a good coding style to use typedef In this commit remove typedef and lowercaser the name 'DPMS_t'. And also drop '_t' which traditionally means typedef. Signed-off-by:
Keerthi Reddy <keerthigd4990@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- Sep 29, 2017
-
-
Arvind Yadav authored
It is not necessary to check return value of gb_lights_channel_flash_config. gb_lights_channel_config returns both successful and error value. Signed-off-by:
Arvind Yadav <arvind.yadav.cs@gmail.com> Reviewed-by:
Rui Miguel Silva <rmfrfs@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Arvind Yadav authored
Free memory region, if gb_lights_channel_config is not successful. Signed-off-by:
Arvind Yadav <arvind.yadav.cs@gmail.com> Reviewed-by:
Rui Miguel Silva <rmfrfs@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Georgiana Chelu authored
Prefer kmalloc_array over kmalloc with multiply because kmalloc_array performs additional checks before memory allocation. Fix the following issue reported by checkpatch.pl: * WARNING: Prefer kmalloc_array over kmalloc with multiply Signed-off-by:
Georgiana Chelu <georgiana.chelu93@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Aishwarya Pant authored
Patch removes the following warning issued was coccicheck: WARNING: casting value returned by memory allocation function to (char *) is useless. Signed-off-by:
Aishwarya Pant <aishpant@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Georgiana Chelu authored
Fix issue found by checkpatch.pl script. WARNING: Comparisons should place the constant on the right side of the test Signed-off-by:
Georgiana Chelu <georgiana.chelu93@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Georgiana Chelu authored
Fix the following issue found by checkpatch.pl: ERROR: open brace '{' following function definitions go on the next line Signed-off-by:Georgiana Chelu <georgiana.chelu93@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Georgiana Chelu authored
This patch adds a blank line after declarations to improve code readability. Issue find by checkpatch.pl script. WARNING: Missing a blank line after declarations Signed-off-by:
Georgiana Chelu <georgiana.chelu93@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Georgiana Chelu authored
Fix the checkpatch.pl issue: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by:
Georgiana Chelu <georgiana.chelu93@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Georgiana Chelu authored
Fix warning reported by checkpatch.pl script: WARNING: line over 80 characters Signed-off-by:
Georgiana Chelu <georgiana.chelu93@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Georgiana Chelu authored
Improve the coding style by adding spaces around arithmetic operation. Issue reported by checkpatch.pl script. Signed-off-by:
Georgiana Chelu <georgiana.chelu93@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Georgiana Chelu authored
Replace the function name from format string with the constant __func__ to avoid multiple changes in case the name of the function will be modified. Issue reported by checkpatch.pl script. Signed-off-by:
Georgiana Chelu <georgiana.chelu93@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Aishwarya Pant authored
Perform cleanup for all function declarations in core/rtw_mlme_ext wherever checkpatch complains about lines being over 80 characters long. Signed-off-by:
Aishwarya Pant <aishpant@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Aishwarya Pant authored
Implicit type conversions are bad; they hinder readability of code and have potential to cause bugs. Here the variable wait_ack is always supplied a bool value while in function declarations it is defined as an int type. Fix it by defining wait_ack a bool type in all usages. Signed-off-by:
Aishwarya Pant <aishpant@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Aishwarya Pant authored
Patch suppresses the following warning issued by coccicheck: WARNING: conversion to bool not needed here Signed-off-by:
Aishwarya Pant <aishpant@gmail.com> Acked-by:
Julia Lawall <julia.lawall@lip6.fr> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mihaela Muraru authored
This patch removes typedef from struct and renames it from "typedef struct vchiq_2835_state_struct" to "struct vchiq_2835_state" as per kernel coding standards. Signed-off-by:
Mihaela Muraru <mihaela.muraru21@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mihaela Muraru authored
This patch removes extern variable vchiq_arm_log_level, because it is already declared in vchiq_arm.h Issue found by checkpatch.pl Signed-off-by:
Mihaela Muraru <mihaela.muraru21@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Keerthi Reddy authored
the volatile fields of bcm2835_alsa_stream - control and status are not used. $ grep bcm2835_alsa_stream >From the above command all instances we see that all variables of 'bcm2835_alsa_stream' are declared as 'alsa_stream' So search for 'control' wherever we have 'alsa_stream' $ grep -l 'alsa_stream' | xargs grep "control" The above command returns where we don't any usage of 'control' field. which means that there is no usage of these fields. similarly for 'status' we see no usages. Signed-off-by:
Keerthi Reddy <keerthigd4990@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Keerthi Reddy authored
Use BIT macro instead of left shift Signed-off-by:
Keerthi Reddy <keerthigd4990@gmail.com> Acked-by:
Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-