The last two lines of these functions are compressed into one.
Also removed the variable ret as it is now not used.
Found using coccinelle:
@@
expression e, ret;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Allignment matched to the open parenthesis to avoid the
check detected by the checkpatch.pl.
CHECK: Alignment should match open parenthesis
Signed-off-by: Anjali Menon <cse.anjalimenon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
In routine rtl8192_tx_isr(), pointer skb is dereferenced before it is
checked for NULL. This patch has only been compile-tested, as I do not
have the hardware. This problem was reported at
https://bugzilla.kernel.org/show_bug.cgi?id=109951.
Fixes: bugzilla.kernel.org: #109951
Reported-by: Yong Shi <brave_shi@163.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Yong Shi <brave_shi@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fix the following checkpatch.pl warning:
WARNING: void function return statements are not generally useful
Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The existing kerneldoc blocs had a few issues:
- some of them didn't start with /**
- some used -- instead of - to separate the short description
- some descriptions had text looking like section headers
- some descriptions started with "to" while some used the imperative: use the
imperative everywhere
- some had a "with:" at the end of the shortdesc that didn't make sense once
formatted by kernel-docs
- two argument names where out of sync with the prototype
Signed-off-by: Manuel Pégourié-Gonnard <mpg@elzevir.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Using the coma operator for multiple assignments is unnecessary and just looks
weird here.
Signed-off-by: Manuel Pégourié-Gonnard <mpg@elzevir.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The pointer is unconditionally dereferenced a few lines later, we need to make
sure it isn't NULL.
Signed-off-by: Manuel Pégourié-Gonnard <mpg@elzevir.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace bit shifting on 1 with the BIT(x) macro
Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Remove extra blank line which is not necessary. Warning detected using
checkpatch.
Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fix the checkpatch warning "No space is necessary after cast"
Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This is a patch to gs_fpgaboot.c to convert data types to kernel types
as identified by checkpatch.pl.
Signed-off-by: Ben Marsh <bmarsh94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This is a patch for gs_fpgaboot.c that fixes a memory allocation problem
identified by checkpatch.pl.
Signed-off-by: Ben Marsh <bmarsh94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch fixes the checkpatch.pl issue:
CHECK: Please use a blank line after function/struct/union/enum declarations
Signed-off-by: SirnamSwetha <theonly.ultimate@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Calling synchronize_irq() right before free_irq() is quite useless. On one
hand the IRQ can easily fire again before free_irq() is entered, on the
other hand free_irq() itself calls synchronize_irq() internally (in a race
condition free way), before any state associated with the IRQ is freed.
Patch was generated using the following semantic patch:
// <smpl>
@@
expression irq;
@@
-synchronize_irq(irq);
free_irq(irq, ...);
// </smpl>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The rmi4 touchscreen driver encloses the power-management
functions in #ifdef CONFIG_PM, but the smtcfb_pci_suspend/resume
functions are only really used when CONFIG_PM_SLEEP is also
set, as a frequent gcc warning shows:
ste_rmi4/synaptics_i2c_rmi4.c:1050:12: warning: 'synaptics_rmi4_suspend' defined but not used
ste_rmi4/synaptics_i2c_rmi4.c:1084:12: warning: 'synaptics_rmi4_resume' defined but not used
This changes the driver to remove the #ifdef and instead mark
the functions as __maybe_unused, which is a nicer anyway, as it
provides build testing for all the code in all configurations
and is harder to get wrong.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This synaptics_rmi4_platform_data structure is never modified, so declare
it as const. Others are already const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Use to_delayed_work() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fixes a couple of issues detected by checkpatch with regard to blank lines.
Signed-off-by: Amadeusz Pawlik <potrzebye@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The rtllib driver is not calling try_module_get() when loading the
encryption modules. Because of this, you can never remove the module
once you have used it one (i.e. bring up the wireless interface).
Signed-off-by: Sean MacLennan <seanm@seanm.ca>
Tested-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace the led_classdev_register() with the platform managed version
devm_led_classdev_register() & henceforth remove the redundant
nvec_paz00_remove() function.
Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Acked-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch fixes a couple of checkpatch warnings about block comments.
Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
clean up checkpatch warning:
WARNING: Block comments use * on subsequent lines
Signed-off-by: Byeoungwook Kim <quddnr145@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Use to_delayed_work() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch fixes following compiler warning:
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c: In function
‘RxReorderIndicatePacket’:
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c:758:1: warning: the
frame size of 1064 bytes is larger than 1024 bytes
[-Wframe-larger-than=]
It replaces the statically allocated array prxbIndicateArray with
a kmalloc'd one.
Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Use list_first_entry_or_null() instead of list_empty() + LIST_CONTAINOR()
to simplify the code.
Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Warning:Comparisons should place the constant on the right side of the test
Fixed by placing the comparisions constant on right side of the test.
Signed-off-by: Rakhi Sharma <rakhish1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
->KeyMaterial is declared as a 16 byte array, but we only ever allocate
either 5 or 13 bytes of it. The problem is that we memset() all 16
bytes to zero so we're memsetting past the end of the allocated memory.
I fixed this in slightly lazy way, by just allocating 16 bytes. This
works but there is a lot more cleanup you could do to this code if you
wanted. Which is why this code is in staging.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The conversion from void pointer to any other pointer type is guaranteed
by the C programming language.
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: Lucas Tanure <tanure@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This is an API consolidation only. The use of kmalloc + memset to 0
here is equivalent to kzalloc.
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cancel pending URBs during suspend operation to avoid receiving ESHUTDOWN
in read/write completion callbacks while the device is suspended.
Receiving ESHUTDOWN in read/write completion callbacks will cause the
driver to enter a non-functioning "stopped" state from which the driver is
unable to recover without reloading the module.
Signed-off-by: Hemmo Nieminen <hemmo.nieminen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Remove unused CamelCase in order to get rid of the corresponding
checkpatch.pl "CHECK: Avoid CamelCase: <IEEE80211_QoS_DATAGRP>"
Signed-off-by: Michael Hornung <mhornung.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Fix alignment which did not match open parenthesis
Signed-off-by: Michael Hornung <mhornung.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Fix checkpatch.pl output about not including the paragraph
about writing to the Free Software Foundation's mailing address
Signed-off-by: Michael Hornung <mhornung.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Add missing spaces around bitwise OR operation in order to get
rid of checkpatch.pl's "CHECK: spaces preferred around that '|'"
Signed-off-by: Michael Hornung <mhornung.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Replace all occurences of (1<<x) by BIT(x) in order to get rid
of checkpatch.pl "CHECK" output "Prefer using the BIT macro"
Signed-off-by: Michael Hornung <mhornung.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Remove multiple blank lines in order to get rid of checkpatch.pl
"CHECK" output
Signed-off-by: Michael Hornung <mhornung.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Remove wrapper function mfree_sta_priv_lock() that can be replaced by a
direct call to mfree_all_stainfo().
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch fixes checkpatch.pl warning in rtw_mlme_ext.c file.
WARNING: void function return statements are not generally useful
Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>