- 17 10月, 2015 40 次提交
-
-
由 Ioana Ciornei 提交于
Add spaces around binary operators like -, +, * etc in order to improve readability Signed-off-by: NIoana Ciornei <ciorneiioana@gmail.com> Reviewed-by: NDaniel Baluta <daniel.baluta@intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ioana Ciornei 提交于
Remove the space after an explicit cast because there is no point in having it Signed-off-by: NIoana Ciornei <ciorneiioana@gmail.com> Reviewed-by: NDaniel Baluta <daniel.baluta@intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ioana Ciornei 提交于
Use !condition instead off condition == NULL when comparing with NULL Signed-off-by: NIoana Ciornei <ciorneiioana@gmail.com> Reviewed-by: NDaniel Baluta <daniel.baluta@intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ioana Ciornei 提交于
Indent parameters and arguments passed to function calls to match open paranthesis Signed-off-by: NIoana Ciornei <ciorneiioana@gmail.com> Reviewed-by: NDaniel Baluta <daniel.baluta@intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ioana Ciornei 提交于
Convert uint32_t to u32 and uint64_t to u64 in order to follow the kernel best practice Signed-off-by: NIoana Ciornei <ciorneiioana@gmail.com> Reviewed-by: NDaniel Baluta <daniel.baluta@intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ioana Ciornei 提交于
Simplify return flow ad7150_write_event_params in order to reduce code length. Since i2c_smbus_write_word_data only returns a negative value or 0 the change is safe. This patch fixes the following coccicheck warning: drivers/staging/iio/cdc/ad7150.c:182:2-5: WARNING: end returns can be simpified if negative or 0 value Signed-off-by: NIoana Ciornei <ciorneiioana@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Shivani Bhardwaj 提交于
Explicit type conversion is not required to remove it. Semantic patch used: @@ type T; T e; identifier x; @@ * T x = (T)e; Signed-off-by: NShivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Shivani Bhardwaj 提交于
The variable inst is a __u32 type and hence the function used should be simple_strtoul. Semantic patch used: @@ typedef __u32; __u32 e; @@ e = - simple_strtol + simple_strtoul (...) Signed-off-by: NShivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Shivani Bhardwaj 提交于
The variable rc is supposed to hold the value returned by function kstrtoul which can either be 0, -EINVAL (-22) or -ERANGE (-34). Therefore, the check must be performed on rc instead of val for error values. Also, rc can never be greater than 0. Signed-off-by: NShivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Shraddha Barke 提交于
Remove macro OBD_SLAB_FREE_RTN0 since it is defined but not used Signed-off-by: NShraddha Barke <shraddha.6596@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Shivani Bhardwaj 提交于
struct it is already NULL tested before so, it should be removed from the if test expression. Signed-off-by: NShivani Bhardwaj <shivanib134@gmail.com> Reviewed-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Shivani Bhardwaj 提交于
Variable op_data is already tested for NULL value and therefore any further checks should be removed. Semantic patch used: @@ expression E;@@ if(E==NULL) {... return ...;} - if(E){ ... - } Signed-off-by: NShivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Shraddha Barke 提交于
Remove macro OBD_CHECK_MD_OP since it is defined but not used Signed-off-by: NShraddha Barke <shraddha.6596@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Amitoj Kaur Chawla 提交于
Remove intialisation of a variable that is immediately reassigned. The semantic patch used to find this is: // <smpl> @@ type T; identifier x; constant C; expression e; @@ T x - = C ; x = e; // </smpl> Signed-off-by: NAmitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Shraddha Barke 提交于
void pointers do not need to be cast to other pointer types. Semantic patch used to find this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Signed-off-by: NShraddha Barke <shraddha.6596@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Shraddha Barke 提交于
void pointers do not need to be cast to other pointer types. The semantic patch used to find this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Signed-off-by: NShraddha Barke <shraddha.6596@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Shraddha Barke 提交于
void pointers do not need to be cast to other pointer types. The semantic patch used to find this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Signed-off-by: NShraddha Barke <shraddha.6596@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Amitoj Kaur Chawla 提交于
The semantic patch used to find this is: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Signed-off-by: NAmitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Amitoj Kaur Chawla 提交于
The semantic patch used to find this is: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Signed-off-by: NAmitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Amitoj Kaur Chawla 提交于
The semantic patch used to find this is: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Signed-off-by: NAmitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Amitoj Kaur Chawla 提交于
The semantic patch used to find this is: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Signed-off-by: NAmitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Amitoj Kaur Chawla 提交于
The semantic patch used to find this is: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Signed-off-by: NAmitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Amitoj Kaur Chawla 提交于
The semantic patch used to find this is: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Signed-off-by: NAmitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Shivani Bhardwaj 提交于
The variable frame_authorized is declared and mentioned in the code but is not used anywhere so, it should be removed. Also, two case statements are merged by removing an extra break. Semantic patch used: @@ type T; identifier i; constant C; position p != e.p; @@ - T i@p; <+... when != i - i = C; ...+> Signed-off-by: NShivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Shivani Bhardwaj 提交于
Remove NULL check on a variable as it is already preceded by one. Signed-off-by: NShivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Punit Vara 提交于
This patch is to the rtl871x_ioctl_linux.c file that fixes up following warnings reported by checkpatch.pl : -Block comments use * on subsequent lines -Block comments use a trailing */ on a separate line Signed-off-by: NPunit Vara <punitvara@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Punit Vara 提交于
This patch is to the rtl871x_ioctl_linux.c file that fixes up following warning reported by checkpatch.pl : -Prefer ether_addr_equal() or ether_addr_equal_unaligned() over memcmp() bssid and pnetwork->network.MacAddress both are 6 byte array which aligned with u16 Signed-off-by: NPunit Vara <punitvara@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Punit Vara 提交于
This patch is to the rtl871x_ioctl_linux.c that fixes up following warning by checkpatch.pl: -Prefer eth_broadcast_addr() over memset() Signed-off-by: NPunit Vara <punitvara@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Amitoj Kaur Chawla 提交于
Remove intialisation of a variable that is immediately reassigned. The semantic patch used to find this is: // <smpl> @@ type T; identifier x; constant C; expression e; @@ T x - = C ; x = e; // </smpl> Signed-off-by: NAmitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Shivani Bhardwaj 提交于
Explicit type conversion is not required and should be removed. Semantic patch used: @@ type T; T e; identifier x; @@ * T x = (T)e; Signed-off-by: NShivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Shivani Bhardwaj 提交于
Explicit typecasting is not required and should be removed. Semantic patch used: @@ type T; T e; identifier x; @@ * T x = (T)e; Signed-off-by: NShivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Shivani Bhardwaj 提交于
Explicit typecasting of variables is not required and should be removed. Semantic patch used: @@ type T; T e; identifier x; @@ * T x = (T)e; Signed-off-by: NShivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Shivani Bhardwaj 提交于
Typecasting should be removed from variables as it is not required. Semantic patch used: @@ type T; T e; identifier x; @@ * T x = (T)e; Signed-off-by: NShivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Shivani Bhardwaj 提交于
Explicit type conversions are not required so, remove them. Semantic patch used: @@ type T; T e; identifier x; @@ * T x = (T)e; Signed-off-by: NShivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Shivani Bhardwaj 提交于
Explicit type conversions are not required and so, they should be removed. Semantic patch used: @@ type T; T e; identifier x; @@ * T x = (T)e; Signed-off-by: NShivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Amitoj Kaur Chawla 提交于
Remove intialisation of a variable that is immediately reassigned. The semantic patch used to find this is: // <smpl> @@ type T; identifier x; constant C; expression e; @@ T x - = C ; x = e; // </smpl> Signed-off-by: NAmitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Amitoj Kaur Chawla 提交于
Remove intialisation of a variable that is immediately reassigned. The semantic patch used to find this is: // <smpl> @@ type T; identifier x; constant C; expression e; @@ T x - = C ; x = e; // </smpl> Signed-off-by: NAmitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Amitoj Kaur Chawla 提交于
Remove intialisation of a variable that is immediately reassigned. The semantic patch used to find this is: // <smpl> @@ type T; identifier x; constant C; expression e; @@ T x - = C ; x = e; // </smpl> Signed-off-by: NAmitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Amitoj Kaur Chawla 提交于
Remove intialisation of a variable that is immediately reassigned. The problem was found using coccinelle semantic patch and further opportunities were identified by hand. The semantic patch used to find this is: // <smpl> @@ type T; identifier x; constant C; expression e; @@ T x - = C ; x = e; // </smpl> Signed-off-by: NAmitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Shivani Bhardwaj 提交于
Logical and-ing of a struct and its member should be replaced by the member only as the struct has already been NULL tested before. Signed-off-by: NShivani Bhardwaj <shivanib134@gmail.com> Reviewed-by: NDaniel Baluta <daniel.baluta@intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-