Sudip Mukherjee [Thu, 16 Jul 2015 12:58:20 +0000 (18:28 +0530)]
staging: dgap: remove duplicate code
Remove the duplicate code of dgap_remove_one() and dgap_stop().
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Thu, 16 Jul 2015 12:58:19 +0000 (18:28 +0530)]
staging: dgap: new arguments to dgap_stop
In a later patch we will remove the duplicate codes. But the code also
needs to execute dgap_remove_driver_sysfiles() if it is being called
from dgap_remove_one() but if being called fron the error path of the
dgap_init_module() then the sysfiles should not be removed.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Thu, 16 Jul 2015 12:58:18 +0000 (18:28 +0530)]
staging: dgap: rearrange function
Relocate the function dgap_stop() so that in a later patch we can remove
the duplicate codes between dgap_stop() and dgap_remove_one().
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Thu, 16 Jul 2015 12:58:17 +0000 (18:28 +0530)]
staging: dgap: fix error path
The code in dgap_stop() is almost a duplicate of the code that will be
executed on pci_unregister_driver(). So the error code was stopping and
unregistering everything twice.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Thu, 16 Jul 2015 11:28:12 +0000 (16:58 +0530)]
staging: rtl8188eu: remove unneeded ret
The variable ret was always 0. So remove the variable and always
return 0 from the function.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Thu, 16 Jul 2015 11:28:11 +0000 (16:58 +0530)]
staging: rtl8188eu: stop using DBG_88E
Stop using DBG_88E which is a custom macro for printing debugging
messages. Instead start using pr_debug and in the process define
pr_fmt.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Thu, 16 Jul 2015 11:28:10 +0000 (16:58 +0530)]
staging: rtl8188eu: remove unneeded variable
The default value of status was _FAIL, it was only changed if kzalloc
succeeds and the check for status is immediately following kzalloc. We
can have the failure code in the else part as the failure code will be
executed only if kzalloc fails.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Thu, 16 Jul 2015 11:28:09 +0000 (16:58 +0530)]
staging: rtl8188eu: remove goto label
By checking for the success of kzalloc we were able to remove the goto
label thus making the code more readable.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Thu, 16 Jul 2015 11:28:08 +0000 (16:58 +0530)]
staging: rtl8188eu: remove redundant NULL check
The check for pstat and pdvobjpriv is not required here as we have
already checked for them before.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Thu, 16 Jul 2015 11:28:07 +0000 (16:58 +0530)]
staging: rtl8188eu: remove unused function
The inline function rtw_set_ips_deny() was only defined but was never
used.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Wed, 15 Jul 2015 08:29:46 +0000 (13:59 +0530)]
staging: sm7xxfb: usr fb_read and fb_write
Now since the Big-Endian and Little-Endian based calculations are moved
into a macro we can make fb_read() and fb_write() common for both
Little-Endian and Big-Endian.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Wed, 15 Jul 2015 08:29:45 +0000 (13:59 +0530)]
staging: sm7xxfb: define new macros
Define and use some new macros to work with different situations
based on little-endian and big-endian.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Luca Ceresoli [Tue, 14 Jul 2015 22:44:55 +0000 (00:44 +0200)]
staging: rtl8188eu: remove unused rtw_hal_write_rfreg
rtw_hal_write_rfreg() is never referenced, so remove it.
It used to be the only place where the write_rfreg callback was
called, so get rid of the function pointer as well.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Greg Kroah-Hartman <gregkh@linux.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Luca Ceresoli [Tue, 14 Jul 2015 22:44:54 +0000 (00:44 +0200)]
staging: rtl8188eu: remove unused rtw_hal_set_def_var
rtw_hal_set_def_var() is never referenced, so remove it.
It used to be the only place where the SetHalDefVarHandler callback was
called, so get rid of the function pointer as well.
Also remove the callback itself, SetHalDefVar8188EUsb(), which was not
called anywhere else.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Greg Kroah-Hartman <gregkh@linux.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Luca Ceresoli [Tue, 14 Jul 2015 22:44:53 +0000 (00:44 +0200)]
staging: rtl8188eu: remove unused {en,dis}able_interrupt
rtw_hal_enable_interrupt() and rtw_hal_disable_interrupt() are never
referenced, so remove them.
They used to be the only place where the enable_interrupt() and
disable_interrupt() callbacks were called, and the function pointer
is never set, so get rid of the function pointer as well.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Greg Kroah-Hartman <gregkh@linux.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CHANG FU CHIAO [Wed, 15 Jul 2015 07:32:21 +0000 (15:32 +0800)]
staging: ft1000: ft1000-usb: remove unnecessary out of memory warning
fixes "Possible unnecessary 'out of memory' message"
Signed-off-by: CHANG FU CHIAO <zector1030@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Pedro Marzo Perez [Thu, 16 Jul 2015 18:50:00 +0000 (20:50 +0200)]
Staging: lustre: make obd_device_cachep static
Variable obd_device_cachep is only used inside the file it is declared,
so it is better set as static
Signed-off-by: Pedro Marzo Perez <marzo.pedro@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Oleg Drokin [Wed, 15 Jul 2015 16:21:16 +0000 (12:21 -0400)]
staging/lustre/ldlm: Unregister ldlm namespace from sysfs on free
ldlm_namespace_sysfs_unregister needs to be called ldlm_namespace_free_post
so that we don't have this dangling object there after the namespace
has disappeared.
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vasiliy Korchagin [Wed, 15 Jul 2015 00:40:40 +0000 (00:40 +0000)]
staging: lustre: obdclass: simplify class_uuid_unparse
This patch simplifies uuid unparse logic by using sprintf "%pU" extension.
And eliminates the code with a coding style error:
ERROR: Macros with complex values should be enclosed in parentheses
+#define CONSUME(val, ptr) (val) = consume(sizeof(val), (ptr))
Signed-off-by: Vasiliy Korchagin <vasiliy.korchagin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Benjamin Romer [Thu, 16 Jul 2015 16:40:48 +0000 (12:40 -0400)]
staging: unisys: fix copyright statements
The copyright statements in the drivers need to be correct and
consistent; this patch fixes the year for all of them, and makes the
statement text cover just the GPL V2.
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Wed, 15 Jul 2015 19:32:09 +0000 (12:32 -0700)]
Merge tag 'iio-for-4.3a' of git://git./linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
First round of new drivers, cleanups and functionality for IIO in the 4.3 cycle.
Core and tools new stuff
* Allow explicit flush of hardware fifo by using an non blocking read.
This is needed to support some of the Android requirements for HW fifo
devices - also makes sense generally and clarifies a corner of the ABI.
* Add some missing modifier names. Mostly these exist for weird and
wonderful event types, but should still be present in the name array.
* Update iio_event_monitor to cope with new channel types.
* generic_buffer gains support for single byte scan elements (no idea
how this never got implemented before!)
New device support
* ROHM rpr0521 light and proximity sensor driver.
* bmc150 gains bmc156 support.
* ms5611 gains ms5607 temperature and pressure sensor support.
Driver functionality
* inv-mpu - add scale_available attributes to aid userspace in
configuring these devices.
* isl29125 - add scale_available attributes.
* stk8ba50 - sampling frequency control, triggered buffer support.
* stk8312 - sampling frequency control, triggered buffer support.
*
cc10001 - ensure ADC powered up at probe time if shared by non linux
running CPUs.
* bmc150-magn - decouple the buffer and trigger allowing other triggers
to be used to drive this device's sampling.
Documentation
* Add some previously missed *scale_available attributes to the ABI docs.
Cleanups
* Clarify some crazy naming in iio_triggered_buffer_setup that seems to
have somehow ended up backwards (dates back a long way). Avoid the top
half and bottom half naming entirely given we are how dealing with a
handler and a thread in all cases.
* Tools cleanup including coding style, variable naming improvements, also
a new sanity check on a full event having been read.
* stk8ba50 - replace the scale table with a struct for clarity. Also suspend
the sensor if an error occurs in init.
* hid-sensor-prox - drop uneeded line break.
* mma9551 - use size in words for word read / write avoiding accidental
sending of an odd number of bytes.
* mma9553 - fix code alignment and document the use of a mutex.
* light/Kconfig - typo fix in commment.
* cm3323 - don't eat an error value, replace an unneeded local variable with
a generic local variable with the same use, add some blank lines for clarity.
* pressure/Kconfig - typo in Measurement Specialties name.
* bmc150-accel - actually use a mask definition rather than repeating the
value inline, code style cleanup.
* adc/Kconfig - general help description cleanup.
* ssp_sensors - drop redundant spi driver bus initialization (done in the
spi core)
* tmp006 - use genmask rather than hand generated masks.
* ms5611 - drop IIO_CHAN_INFO_SCALE as this driver provides a processed
output and as such the read only scale adds nothing useful.
* kxcjk-1013,
adf4350, dummy - drop unwanted blank lines.
* Drop all owner assignments from i2c_drivers and this is done in the
i2c core.
Juston Li [Wed, 15 Jul 2015 04:14:48 +0000 (21:14 -0700)]
staging: sm750fb: add missing blank line after declarations
Fixes checkpatch.pl
WARNING: Missing a blank line after declarations
Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Juston Li [Wed, 15 Jul 2015 04:14:47 +0000 (21:14 -0700)]
staging: sm750fb: remove unnecessary braces
Fixes checkpatch.pl warning:
WARNING: braces {} are not necessary for single statement blocks
Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Juston Li [Wed, 15 Jul 2015 04:14:46 +0000 (21:14 -0700)]
staging: sm750fb: move while to follow do close brace
Fixes checkpatch.pl error:
ERROR: while should follow close brace '}'
Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Juston Li [Wed, 15 Jul 2015 04:14:45 +0000 (21:14 -0700)]
staging: sm750fb: fix brace placement
Fix brace placement errors caught by checkpatch.pl
ERROR: that open brace { should be on the previous line
Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Juston Li [Wed, 15 Jul 2015 04:14:44 +0000 (21:14 -0700)]
staging: sm750fb: remove unnecessary whitespace
Fixes checkpatch.pl warning:
WARNING: unnecessary whitespace before a quoted newline
Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Juston Li [Wed, 15 Jul 2015 04:14:43 +0000 (21:14 -0700)]
staging: sm750fb: remove trailing whitespace
Fixes checkpatch.pl error:
ERROR: trailing whitespace
Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Juston Li [Wed, 15 Jul 2015 04:14:42 +0000 (21:14 -0700)]
staging: sm750fb: add space after semicolon
Fixes checkpatch.pl error:
ERROR: space required after that ';'
Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Juston Li [Wed, 15 Jul 2015 04:14:41 +0000 (21:14 -0700)]
staging: sm750fb: add spaces around operators
Fixes checkpath.pl error:
ERROR: spaces required around that operator
Note running checkpatch.pl with '--strict' catches more
of these errors along with cases where spacing is optional
but preferred. Take care of these in a future patch.
Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Juston Li [Wed, 15 Jul 2015 04:14:40 +0000 (21:14 -0700)]
staging: sm750fb: consistent spacing around operators
Fixes checkpatch.pl error:
ERROR: need consistent spacing around operator
Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Juston Li [Wed, 15 Jul 2015 04:14:39 +0000 (21:14 -0700)]
staging: sm750fb: add space after return type
Fixes checkpatch.pl warning:
WARNING: missing space after return type
Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Juston Li [Wed, 15 Jul 2015 04:14:38 +0000 (21:14 -0700)]
staging: sm750fb: add space after struct definition
Fixes checkpatch.pl warning:
WARNING: missing space after struct definition
Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Juston Li [Wed, 15 Jul 2015 04:14:37 +0000 (21:14 -0700)]
staging: sm750fb: add space after enum definition
Fixes checkpatch.pl warning:
WARNING: missing space after enum definition
Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Juston Li [Wed, 15 Jul 2015 04:14:36 +0000 (21:14 -0700)]
staging: sm750fb: add space after close brace
Fixes checkpatch.pl error:
ERROR: space required after that close brace '}'
Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Juston Li [Wed, 15 Jul 2015 04:14:35 +0000 (21:14 -0700)]
staging: sm750fb: add space before open brace
Fixes checkpatch.pl error:
ERROR: space required before the open brace '{'
Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Juston Li [Wed, 15 Jul 2015 04:14:34 +0000 (21:14 -0700)]
staging: sm750fb: remove space between function name and parenthesis
Fixes checkpatch.pl warning:
WARNING: space prohibited between function name and open parenthesis '('
Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Juston Li [Wed, 15 Jul 2015 04:14:33 +0000 (21:14 -0700)]
staging: sm750fb: add space before open parenthesis
Fixes checkpatch.pl error:
ERROR: space required before the open parenthesis '('
Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Juston Li [Wed, 15 Jul 2015 04:14:32 +0000 (21:14 -0700)]
staging: sm750fb: remove space before close parenthesis
Fixes checkpatch.pl error:
ERROR: space prohibited before that close parenthesis ')'
Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Juston Li [Wed, 15 Jul 2015 04:14:31 +0000 (21:14 -0700)]
staging: sm750fb: remove spacing after open parenthesis
Fixes checkpatch.pl warning:
ERROR: space prohibited after that open parenthesis '('
Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Juston Li [Wed, 15 Jul 2015 04:14:30 +0000 (21:14 -0700)]
staging: sm750fb: use tabs for indentation
Replace spaces with tabs for indentation to fix the checkpatch.pl error
ERROR: code indent should use tabs where possible
WARNING: please, no spaces at the start of a line
Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dmitry Kalinkin [Fri, 26 Jun 2015 20:39:44 +0000 (23:39 +0300)]
staging: vme_user: remove okcount variable
Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dmitry Kalinkin [Fri, 26 Jun 2015 20:39:43 +0000 (23:39 +0300)]
staging: vme_user: remove distracting comment
Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dmitry Kalinkin [Fri, 26 Jun 2015 20:39:42 +0000 (23:39 +0300)]
staging: vme_user: remove unused variable
Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dmitry Kalinkin [Fri, 26 Jun 2015 20:39:41 +0000 (23:39 +0300)]
staging: vme_user: switch to returning -EFAULT on __copy_*_user errors
Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dmitry Kalinkin [Fri, 26 Jun 2015 20:39:40 +0000 (23:39 +0300)]
staging: vme_user: allow large read()/write()
This changes large master transfers to do shorter read/write rather than
return -EINVAL. User space will now be able to optimistically request a
large transfer and get at least some data.
This also removes comments suggesting on how to implement large
transfers. Current vme_master_* read and write implementations use CPU
copies that don't produce burst PCI accesses and subsequently no block
transfer on VME bus. In the end overall performance is quiet low and it
can't be fixed by doing direct copy to user space. Much easier solution
would be to just reuse kernel buffer.
Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dmitry Kalinkin [Fri, 26 Jun 2015 20:39:39 +0000 (23:39 +0300)]
staging: vme_user: fix kmalloc style
Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dmitry Kalinkin [Fri, 26 Jun 2015 20:39:38 +0000 (23:39 +0300)]
staging: vme_user: fix NULL comparison style
Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dmitry Kalinkin [Fri, 26 Jun 2015 20:39:37 +0000 (23:39 +0300)]
staging: vme_user: fix blank lines
Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dmitry Kalinkin [Fri, 26 Jun 2015 20:39:36 +0000 (23:39 +0300)]
staging: vme_user: fix code alignment
Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Maninder Singh [Wed, 15 Jul 2015 03:22:51 +0000 (08:52 +0530)]
staging:vt6655: remove checks around dev_kfree_skb
dev_kfree_skb checks for NULL pointer itself,
Thus no need of explicit NULL check.
Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gioh Kim [Mon, 6 Jul 2015 06:14:41 +0000 (15:14 +0900)]
staging: ion: debugfs to shrink pool
This patch enables debugfs file /sys/kernel/debug/ion/heaps/system_shrink
to shrink pool and get pool size. This technically enables debugfs
shrinking for all heaps, not just the system heap although the system heap
is the only one with a shrinker right now. It is already implemented
but not complete. This patch completes and enables it.
Reading the file returns pool size
in page unit and writing the number of pages shrinks pool.
It flushes all pages to write zero at the file.
Signed-off-by: Gioh Kim <gioh.kim@lge.com>
Reviewed-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gioh Kim [Mon, 6 Jul 2015 06:14:40 +0000 (15:14 +0900)]
staging: ion: shrink page-pool by page unit
This patch shrink page-pool by page unit.
The system shrinker calls ion_heap_shrink_count() to get nr_to_scan,
and pass it to ion_heap_shrink_scan().
The problem is the return value of ion_heap_shrink_count() is the number
of pages but ion_system_heap_shrink(), which is called by
ion_heap_shrink_scan(), gets the number of chunk.
The main root of this is that ion_page_pool_shrink() returns page count
via ion_page_pool_total() if it have to check pool size. But it frees
chunks of pages if it have to free pools.
This patch first fix ion_page_pool_shrink() to count only pages,
not chunks. And then ion_system_heap_shrink() to work on pages.
Signed-off-by: Gioh Kim <gioh.kim@lge.com>
Reviewed-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vaishali Thakkar [Fri, 26 Jun 2015 04:07:25 +0000 (09:37 +0530)]
Staging: rtl8192e: Replace memset with eth_zero_addr
Use eth_zero_addr to assign the zero address to the given address
array instead of memset when second argument is address of zero.
Note that the 6 in the third argument of memset appears to represent
an ethernet address size (ETH_ALEN).
The Coccinelle semantic patch that makes this change is as follows:
// <smpl>
@eth_zero_addr@
expression e;
@@
-memset(e,0x00,6);
+eth_zero_addr(e);
// </smpl>
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 14 Jul 2015 20:04:26 +0000 (22:04 +0200)]
staging: rtl8192e: rtllib_softmac: Make functions static
Make as many functions as possible static in rtllib_softmac.c.
The following functions were affected:
- rtllib_sta_wakeup
- rtllib_TURBO_Info
- rtllib_get_beacon_
- rtllib_send_probe_requests
- rtllib_update_active_chan_map
- rtllib_softmac_scan_syncro
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 14 Jul 2015 20:04:25 +0000 (22:04 +0200)]
staging: rtl8192e: Make rtllib_rx_mgt() static
Function is not referenced outside of rtllib_rx.c
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 14 Jul 2015 20:04:24 +0000 (22:04 +0200)]
staging: rtl8192e: rtllib_tx: Make functions static
Make as many functions as possible static in rtllib_tx.c.
The following functions were affected:
- rtllib_xmit_inter
- rtllib_query_seqnum
- rtllib_put_snap
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 14 Jul 2015 20:04:23 +0000 (22:04 +0200)]
staging: rtl8192e: Make rtl8192_QueryIsShort() static
Relocate function within file to avoid unnecessary fw decl.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 14 Jul 2015 20:04:22 +0000 (22:04 +0200)]
staging: rtl8192e: r8192e_phy: Make functions static
Make as many functions as possible static in r8192E_phy.c.
The following functions were affected:
- rtl8192_phyConfigBB
- rtl8192_SwChnl_WorkItem
- rtl8192_SetBWModeWorkItem
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 14 Jul 2015 20:04:21 +0000 (22:04 +0200)]
staging: rtl8192e: rtl_core: Make functions static
Make as many functions as possible static in rtl_core.c.
If needed - move fw declaration from header.
The following functions were affected:
- rtl8192_is_tx_queue_empty
- rtl819x_watchdog_wqcallback
- watch_dog_timer_callback
- rtl8192_data_hard_stop
- rtl8192_data_hard_resume
- rtl8192_hard_data_xmit
- rtl8192_hard_start_xmit
- rtl8192_tx_cmd
- rtl8192_tx
- rtl8192_pci_initdescring
- rtl8192_irq_tx_tasklet
- rtl8192_irq_rx_tasklet
- rtl8192_cancel_deferred_work
- _rtl8192_up
- rtl8192_up
- rtl8192_down
- rtl8192_restart
- rtl8192_update_cap
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 14 Jul 2015 20:04:20 +0000 (22:04 +0200)]
staging: rtl8192e: Make phy_RF8256_Config_ParaFile() static
Relocate function in driver to avoid adding unnecessary fw decl.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 14 Jul 2015 20:04:19 +0000 (22:04 +0200)]
staging: rtl8192e: rtllib_HTProc: Make functions static
Make as many functions as possible static in rtllib_HTProc.c.
The following functions were affected:
- HTMcsToDataRate
- HTFilterMCSRate
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 14 Jul 2015 20:04:18 +0000 (22:04 +0200)]
staging: rtl8192e: rtl_dm: Make functions static
Make as many functions as possible static in rtllib_dm.c.
The following functions were affected:
- dm_check_fsync
- dm_CheckRfCtrlGPIO
- dm_fsync_timer_callback
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 14 Jul 2015 20:04:17 +0000 (22:04 +0200)]
staging: rtl8192e: Remove rtl8192_rx_cmd()
Function is empty.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 14 Jul 2015 20:04:16 +0000 (22:04 +0200)]
staging: rtl8192e: probe: Remove bdma64 check
It is always false.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 14 Jul 2015 20:04:15 +0000 (22:04 +0200)]
staging: rtl8192e: Remove rtl819x_process_cck_rxpathsel()
Function is empty.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 14 Jul 2015 20:04:14 +0000 (22:04 +0200)]
staging: rtl8192e: Remove DMESG macro
It is used in several places, but expands to nothing.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 14 Jul 2015 20:04:13 +0000 (22:04 +0200)]
staging: rtl8192e: Remove read|write_nic_io_(d)word|byte()
None of this functions was used.
Also remove PlatformIOCheckPageLegalAndGetRegMask() used by them.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 14 Jul 2015 20:04:12 +0000 (22:04 +0200)]
staging: rtl8192e: Remove DOT11D_GetMaxTxPwrInDbm()
Function is not used.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 14 Jul 2015 20:04:11 +0000 (22:04 +0200)]
staging: rtl8192e: Remove unused rtllib_device::freq_band
Member is never referenced.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 14 Jul 2015 20:04:10 +0000 (22:04 +0200)]
staging: rtl8192e: Remove unused ether_header structure
Structure is not used in the driver.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 14 Jul 2015 20:04:09 +0000 (22:04 +0200)]
staging: rtl8192e: Remove rtllib_stats structure
Two remaining fields of rtllib_stats are only incremented, but
never read.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 14 Jul 2015 20:04:08 +0000 (22:04 +0200)]
staging: rtl8192e: Remove unused fields from rtllib_stats
None of them are used in the driver.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 14 Jul 2015 20:04:07 +0000 (22:04 +0200)]
staging: rtl8192e: Remove unused enums
Remove ack_policy enum and some unused RTL_DEBUG enums.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 14 Jul 2015 20:04:06 +0000 (22:04 +0200)]
staging: rtl8192e: Remove undefs
They relate to macros that are not used in the driver.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 14 Jul 2015 20:04:05 +0000 (22:04 +0200)]
staging: rtl8192e: Remove unused defines
Remove most of unused defines (excluding phyreg/hw registers).
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Tue, 14 Jul 2015 20:04:04 +0000 (22:04 +0200)]
staging: rtl8192e: Remove ToLegalChannel()
Function is not used.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Krzysztof Kozlowski [Fri, 10 Jul 2015 06:34:28 +0000 (15:34 +0900)]
staging: Drop owner assignment from i2c_driver
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jacob Kiefer [Fri, 10 Jul 2015 05:26:30 +0000 (01:26 -0400)]
staging: style fix for octeon/ethernet-tx.c
Broke line with greater than 80 characters into two lines and
improved logical operator readability in hardware checksum if statement.
Signed-off-by: Jacob Kiefer <jtk54@cornell.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leung Timothy Chi King [Wed, 1 Jul 2015 16:44:13 +0000 (09:44 -0700)]
Staging: rts5208: Fix checkpatch warning: else is not generally useful
The following checkpatch warning was fixed:
WARNING: else is not generally useful after a break or return
Signed-off-by: Leung Timothy Chi King <contact@timothyleung.co>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Johannes Postma [Wed, 8 Jul 2015 12:41:46 +0000 (13:41 +0100)]
Staging: ozwpan: ozusbsvc1.c: Fix missing blank line after declarations
This patch fixes a missing line after declarations issue.
Signed-off-by: Johannes Postma <jgmpostma@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jakub Sitnicki [Fri, 10 Jul 2015 16:52:21 +0000 (18:52 +0200)]
staging: rtl8188eu: fold rtl8188e_read_chip_version() into rtl8188e_SetHalODMVar()
Both rtl8188e_read_chip_version() and ReadChipVersion8188E() are used
only in one place. Make ReadChipVersion8188E() a void function and
eliminate its wrapper - rtl8188e_read_chip_version().
Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jakub Sitnicki [Fri, 10 Jul 2015 16:52:20 +0000 (18:52 +0200)]
staging: rtl8188eu: remove ROMVer from struct HAL_VERSION
ROM version on RTL8188EU is always 0.
Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jakub Sitnicki [Fri, 10 Jul 2015 16:52:19 +0000 (18:52 +0200)]
staging: rtl8188eu: remove RFtype from struct HAL_VERSION
RFtype in struct HAL_VERSION duplicates rf_type in struct
hal_data_8188e, and does not change. Remove it and the macros that test
it.
Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jakub Sitnicki [Fri, 10 Jul 2015 16:52:18 +0000 (18:52 +0200)]
staging: rtl8188eu: remove ICtype from struct HAL_VERSION
IC type on RTL8188EU is always 8188E. Remove it and all the macros that
check it.
Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jakub Sitnicki [Fri, 10 Jul 2015 16:52:17 +0000 (18:52 +0200)]
staging: rtl8188eu: remove RegulatorMode from struct hal_data_8188e
This field is not used anywhere. Also, kill the rt_regulator_mode enum
which exists just for this field.
Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sreenath Madasu [Wed, 8 Jul 2015 22:43:00 +0000 (18:43 -0400)]
staging: rtl8188eu: core: Fixed 80 character length warning
When the checkpatch.pl script was run, it showed lines with length
more than 80 characters in rtw_ap.c file. Fixed line number 382 by
breaking it up into two lines within 80 characters.
Signed-off-by: Sreenath Madasu <Sreenath.Madasu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sunil Shahu [Tue, 7 Jul 2015 09:25:44 +0000 (14:55 +0530)]
staging: rtl8188eu: core: rtw_mlme: remove space before ','
Fix coding style error by removing spaces before ',' as suggested by
checkpatch.pl script.
Signed-off-by: Sunil Shahu <shshahu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Prasanna Karthik [Mon, 29 Jun 2015 12:57:35 +0000 (12:57 +0000)]
staging:rtl8188eu: Code cleanup fix reported by coccinelle
bool check modified
Signed-off-by: Prasanna Karthik <mkarthi3@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jakub Sitnicki [Fri, 26 Jun 2015 05:50:34 +0000 (07:50 +0200)]
staging: rtl8188eu: don't duplicate ieee80211 WLAN_CAPABILITY_* constants
linux/ieee80211.h already defines constants for capability bits.
Include it where needed, resolve discrepancies in naming, and remove the
duplicated definitions.
Also, make use of WLAN_CAPABILITY_IS_STA_BSS() macro to check if neither
ESS nor IBSS capability bits are set.
Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Tue, 7 Jul 2015 08:14:35 +0000 (13:44 +0530)]
staging: sm7xxfb: use kernel commandline
We were only using the kernel commandline to set the mode if this driver
is builtin, but when it is built as a module we were not having any way
to set the mode. Start using commandline even if it is built as a
module.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Tue, 7 Jul 2015 08:14:34 +0000 (13:44 +0530)]
staging: sm7xxfb: fix error handling
We were checking smtc_regbaseaddress and that too at a place where it
can never be NULL. Real check should be on sfb->lfb immediately after
we do ioremap.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Tue, 7 Jul 2015 08:14:33 +0000 (13:44 +0530)]
staging: sm7xxfb: remove unused macros
These macros were only defined but not used anywhere.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Luis de Bethencourt [Thu, 25 Jun 2015 12:56:13 +0000 (14:56 +0200)]
staging: speakup: fix indentation
Signed-off-by: Luis de Bethencourt <luis@debethencourt.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Antonio Borneo [Tue, 23 Jun 2015 14:52:39 +0000 (22:52 +0800)]
staging: mt29f_spinand: Remove redundant spi driver bus initialization
In ancient times it was necessary to manually initialize the bus
field of an spi_driver to spi_bus_type. These days this is done in
spi_register_driver(), so we can drop the manual assignment.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: devel@driverdev.osuosl.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Huewe [Mon, 13 Jul 2015 22:44:09 +0000 (00:44 +0200)]
staging/xgifb: Move register helper functions to header
and mark them as static inline.
This shrinks the compiled module from 137442 to 117732 bytes and we also
get rid of vb_util.c
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Hari Prasath Gujulan Elango [Thu, 9 Jul 2015 06:05:09 +0000 (06:05 +0000)]
staging: xgifb: prefer using the BIT macro
This patch uses the BIT macro for bit shift operation.
Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ravi Teja Darbha [Mon, 29 Jun 2015 20:48:56 +0000 (02:18 +0530)]
rtl8712:Fix checkpatch warning
Fix line over 80 characters warning.
Signed-off-by: Ravi Teja Darbha <ravi2j@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sunil Shahu [Fri, 26 Jun 2015 14:12:24 +0000 (19:42 +0530)]
staging: rtl8712: rtl871x_security.c: remove unnecessary variable initialization
Variable "u32 c" always re-initialize in for loop.
Initialized value of "u32 c" is not used in function
and is redundant, hence removed.
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sunil Shahu <shshahu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sunil Shahu [Mon, 22 Jun 2015 11:28:41 +0000 (16:58 +0530)]
drivers: staging: rtl8712: remove unnecessary else statement
"else" statement after "if" is unnecessary, hence removed.
Signed-off-by: Sunil Shahu <shshahu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Giedrius Statkevičius [Thu, 25 Jun 2015 17:34:43 +0000 (20:34 +0300)]
staging: ft1000: convert pack pragma to __packed
Convert a Microsoft compiler specific directive "#pragma pack(1)" to a
GCC equivalent __packed. Also, by doing this we save
ourselves from trouble if any other struct definitions are added after
the #pragma because it will be applied to all of the definitions
following it.
Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>