- 15 Mar, 2015 17 commits
-
-
Somya Anand authored
Code using doubly linked list is iterated generally using list_empty and list_entry functions, but it can be better written using list_for_each_entry macro. This patch replaces the while loop containing list_empty and list_entry with list_for_each_entry and list_for_each_entry_safe. list_for_each_entry is a macro which is used to iterate over a list of given type. So while loop used to iterate over a list can be replaced with list_for_each_entry macro. However, if list_del is used in the loop, then list_for_each_entry_safe is a better choice. This transformation is done by using the following coccinelle script. @ rule1 @ expression E1; identifier I1, I2; type T; iterator name list_for_each_entry; @@ - while (list_empty(&E1) == 0) + list_for_each_entry (I1, &E1, I2) { ...when != T *I1; - I1 = list_entry(E1.next, T, I2); ...when != list_del(...); when != list_del_init(...); } @ rule2 @ expression E1; identifier I1, I2; type T; iterator name list_for_each_entry_safe; @@ T *I1; + T *tmp; ... - while (list_empty(&E1) == 0) + list_for_each_entry_safe (I1, tmp, &E1, I2) { ...when != T *I1; - I1 = list_entry(E1.next, T, I2); ... } Signed-off-by: Somya Anand <somyaanand214@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Haneen Mohammed authored
Parentheses are not needed around the right hand side of an assignment. This patch remove parenthese of such occurenses. Issue was detected and solved using the following coccinelle script: @rule1@ identifier x, y, z; expression E1, E2; @@ ( x = (y == z); | x = (E1 == E2); | x = -( ... -) ; ) Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Cristina Opriceana authored
This patch replaces the printk() function with netdev_dbg() in order to fix the following: "WARNING: printk() should include KERN_ facility level" and "WARNING: line over 80 characters". Issue found by checkpatch.pl Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Cristina Opriceana authored
This patch introduces a new function for the authentication response error check in the ieee80211_rx_frame_softmac() function to fix the indentation problem. It also adds the iotAction variable in the new function to fix the "more than 80 characters per line" warning. Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Somya Anand authored
This patch removes unnecessary return statement from a void function and hence make it more compatible. This issue is identified by checkpatch.pl Signed-off-by: Somya Anand <somyaanand214@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Somya Anand authored
This patch removes a redundant variable "val" and adds inline return statements. It also adds a default case to the switch statement which returns 0 to keep the logic intact. It also removes a redundant variable "inx" and adds inline return statements. This issue is identified by the following coccinelle script. @@ expression ret; identifier f; @@ -ret = +return f(...); -return ret; Signed-off-by: Somya Anand <somyaanand214@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Himani Agrawal authored
warning fixed: WARNING: line over 80 characters The function call containing several variables is broken to make it fit in 80 characters. Signed-off-by: Himani Agrawal <himani93@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Navya Sri Nizamkari authored
This patch uses kzalloc instead of kmalloc function. A coccinelle script was used to make this change. Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Navya Sri Nizamkari authored
This patch uses kzalloc instead of kmalloc function. A coccinelle script was used to make this change. Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Navya Sri Nizamkari authored
This patch uses kzalloc instead of kmalloc function. A coccinelle script was used to make this change. Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Navya Sri Nizamkari authored
This patch uses kcalloc instead of kzalloc function. A coccinelle script was used to make this change. Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Navya Sri Nizamkari authored
This patch uses kcalloc instead of kzalloc function. A coccinelle script was used to make this change. Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Navya Sri Nizamkari authored
This patch uses kcalloc instead of kzalloc function. A coccinelle script was used to make this change. Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Navya Sri Nizamkari authored
This patch uses kcalloc instead of kzalloc function. A coccinelle script was used to make this change. Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Navya Sri Nizamkari authored
This patch uses kcalloc instead of kzalloc function. A coccinelle script was used to make this change. Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Navya Sri Nizamkari authored
This patch uses kcalloc instead of kzalloc function. A coccinelle script was used to make this change. Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Navya Sri Nizamkari authored
This patch uses kcalloc instead of kzalloc function. A coccinelle script was used to make this change. Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 13 Mar, 2015 2 commits
-
-
Cristina Opriceana authored
This patch fixed the following checkpatch.pl warning: "WARNING: __packed is preferred over __attribute__((packed))". Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Greg Kroah-Hartman authored
This patch fixes a space issue in the workitem.c file Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 12 Mar, 2015 13 commits
-
-
Quentin Lambert authored
spin_unlock_irqrestore() is called at several different places before exiting. This patch uses a goto statement to factorize these calls. Coccinelle was used to generate this patch. Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Quentin Lambert authored
This patch introduces goto statments for error handling and in cases where a lock needs to be released. A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr) @candidates exists@ identifier f, label; statement s; position p1, p2, p3; @@ f@p1(...) { ...when any if@p2(...) { ...when any s return@p3 ...; } ...when any } @good1 exists@ identifier candidates.f, candidates.label; statement candidates.s; position candidates.p1, candidates.p2; @@ f@p1(...) { ...when any if(...) { ...when any s return ...; } ...when any if@p2(...) {...} ...when any } @depends on good1@ identifier candidates.f, candidates.label; position candidates.p1, candidates.p3; @@ f@p1(...) { ...when any * return@p3 ...; } Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Somya Anand authored
This patch removes the redundant parentheses inorder to make code simplified. While doing this, the precedence order of the operation is taken into consideration to keep the logic of the code intact. Signed-off-by: Somya Anand <somyaanand214@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Quentin Lambert authored
This function is called on the previous and the next failure branches. This patch adds the call on the branch where it seems to be missing. Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Giedrius Statkevičius authored
Remove FSF address because it's known in the past that it has changed. Also, remove the pointless "do not change the coding style" comments because it's one of the reasons why it's in staging and it's quite contradictory to what it says in TODO. Also, they contain wrong e-mails of people which are responsible for these drivers - see TODO or MAINTAINERS for that. We can preserve the original copyright at the top of the most files because it shows who originally made them. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Giedrius Statkevičius authored
Dgnc_state array of strings is never used anywhere and it seems pretty useless anyway since the board state enum names speak for themselves. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Navya Sri Nizamkari authored
This patch uses kcalloc instead of kzalloc function. A coccinelle script was used to make this change. Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Dan Carpenter authored
"dgnc_NumBoards" is the number of initialized elements in the dgnc_Board[] array so the comparison should be ">=" instead of ">" so we don't read invalid data. We can remove the special handling of the empty array now that we've fixed this bug. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Giedrius Statkevičius authored
Some of the lines are over 80 characters in dgnc_driver.c so fix them by moving the comments closer to the code, tidying the comments to make them smaller, and remove a redundant space after +. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Giedrius Statkevičius authored
Some of the lines are over 80 characters so fix that by moving the comments before the struct definition and before #define's. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Giedrius Statkevičius authored
There are a lot double of blank lines in dgnc_cls.c thus remove them to make the file follow the CodingStyle. Also, remove one blank line at the end of dgnc_cls.c. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Cass May authored
Avoid deprecated usage of EXTRA_CFLAGS by moving definition of DG_PART into dgnc_driver.h Signed-off-by: Cass May <cass@cassm.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Cass May authored
Clean up Makefile by removing unnecessary definition of DG_NAME. Signed-off-by: Cass May <cass@cassm.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 10 Mar, 2015 8 commits
-
-
Greg Kroah-Hartman authored
This provides a default path for the switch statement in hw_sm750le_setBLANK() so that the compiler will not correctly complain about undefined values being sent to the hardware. Instead, properly error out if the blank command is unknown by the driver. Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Cc: Teddy Wang <teddy.wang@siliconmotion.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Greg Kroah-Hartman authored
Fix up hw_imageblit() so that the function paramaters match up with what the driver expects them to be when using it as a function pointer. Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Cc: Teddy Wang <teddy.wang@siliconmotion.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Greg Kroah-Hartman authored
Change the return value of lynx_accel to be void, to fix the build warning, and due to the fact that the function can't seem to fail at all, and no one cares if it does or not. Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Cc: Teddy Wang <teddy.wang@siliconmotion.com> Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
-
Greg Kroah-Hartman authored
Change the options to the proc_panDisplay function pointer to match the function pointer that we want to assign to it, in order to remove the build warning. Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Cc: Teddy Wang <teddy.wang@siliconmotion.com> Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
-
Lorenzo Stoakes authored
This patch assigns the more appropriate void* type to the mmio750 variable eliminating an unnecessary volatile qualifier in the process. Additionally it updates parameter types as necessary where those parameters interact with mmio750, removes unnecessary casts and updates the type of the lynx_share->pvReg field which is passed to the ddk750_set_mmio method. As a consequence, this patch fixes the following sparse warning:- drivers/staging/sm750fb/ddk750_help.c:12:17: warning: incorrect type in assignment (different address spaces) Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Madhusudhanan Ravindran authored
The semantic patch that makes this change is available in scriptcoccinelle/api/alloc/kzalloc-simple.cocci. Signed-off-by: Madhusudhanan Ravindran <mravindran04@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sudip Mukherjee authored
fixed the build warning about comparison of pointer and integer. end of string was being compared to NULL. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sudip Mukherjee authored
we were getting build warning about mixed declaration. the variable is now declared at the beginning of the block. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-