Nipun Gupta [Wed, 29 Jun 2016 17:14:39 +0000 (22:44 +0530)]
fsl-mc: add helper macro to determine if a device is of fsl_mc type
Add a helper macro to return if a device has a bus type of fsl_mc.
This makes the bus driver code more readable and provides a way for
drivers like the SMMU driver to easily check the bus type.
Binoy Jayan [Wed, 8 Jun 2016 07:40:55 +0000 (13:10 +0530)]
staging: r8723au: Remove unused semaphores
The semaphores xmit_sema, terminate_xmitthread_sema, tx_retevt and
io_req have no users, hence remove all references to them.
Semaphores are going away in the future.
Larry Finger [Sun, 5 Jun 2016 19:11:19 +0000 (14:11 -0500)]
staging: r8188eu: Fix scheduling while atomic splat
Commit fadbe0cd5292851608e2e01b91d9295fa287b9fe ("staging: rtl8188eu:
Remove rtw_zmalloc(), wrapper for kzalloc()") changed all allocation
calls to be GFP_KERNEL even though the original wrapper was testing
to determine if the caller was in atomic mode. Most of the mistakes
were corrected with commit 33dc85c3c667209c930b2dac5ccbc2a365e06b7a
("staging: r8188eu: Fix scheduling while atomic error introduced in
commit fadbe0cd"); however, two kzalloc calls were missed as the
call only happens when the driver is shutting down.
Larry Finger [Sun, 5 Jun 2016 15:20:59 +0000 (10:20 -0500)]
staging: r8188eu: Remove some false positives from kmemleak
When this driver preallocates some SKBs, kmemleak is unable to find that
allocated memory when it scans. When the driver is unloaded, that memory
is released; therefore, the report is a false positive.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Sat, 4 Jun 2016 01:17:37 +0000 (20:17 -0500)]
staging: r8712u: Handle some false positives from kmemleak
When this driver preallocates some URBs, kmemleak is unable to find that
allocated memory when it scans. When the driver is unloaded, that memory
is reclaimed, therefore, the report is a false positive.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Sat, 4 Jun 2016 01:17:36 +0000 (20:17 -0500)]
staging: r8712u: Fix leak of skb
There are two types of messages queued for RX. The major type, which does
I/O on the device, was being handled properly. The skbs that communicated
with the firmware were being leaked.
While rewriting the code that sets up the skb, it was possible to remove
the private variable indicating that the old skb could be reused.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Compiling the rtlwifi drivers for ARM with gcc -Wextra warns about lots of
incorrect code that results from 'char' being unsigned here, e.g.
staging/rtl8192e/rtl8192e/r8192E_phy.c:1072:36: error: comparison is always false due to limited range of data type [-Werror=type-limits]
staging/rtl8192e/rtl8192e/r8192E_phy.c:1104:36: error: comparison is always false due to limited range of data type [-Werror=type-limits]
staging/rtl8192e/rtl8192e/rtl_core.c:1987:16: error: comparison is always false due to limited range of data type [-Werror=type-limits]
staging/rtl8192e/rtl8192e/rtl_dm.c:782:37: error: comparison is always false due to limited range of data type [-Werror=type-limits]
staging/rtl8192e/rtllib_softmac_wx.c:465:16: error: comparison is always false due to limited range of data type [-Werror=type-limits]
This patch changes all uses of 'char' in this driver that refer to
8-bit integers to use 's8' instead, which is signed on all architectures.
Compiling the rtlwifi drivers for ARM with gcc -Wextra warns about lots of
incorrect code that results from 'char' being unsigned here, e.g.
staging/rtl8192u/r8192U_core.c:4150:16: error: comparison is always false due to limited range of data type [-Werror=type-limits]
staging/rtl8192u/r8192U_dm.c:646:50: error: comparison is always false due to limited range of data type [-Werror=type-limits]
This patch changes all uses of 'char' in this driver that refer to
8-bit integers to use 's8' instead, which is signed on all architectures.
Binoy Jayan [Mon, 6 Jun 2016 04:38:06 +0000 (10:08 +0530)]
rtl8188eu: pwrctrl_priv: Replace semaphore 'lock' with mutex
The semaphore 'lock' in pwrctrl_priv is a simple mutex, so it should
be written as one. Semaphores are going away in the future.
_enter_pwrlock was using down_interruptible(), so the lock could be broken
by sending a signal. This could be a bug, because nothing checks the return
code here. Hence, using mutex_lock instead of the interruptible version.
Also, remove the now unused wrappers _init_pwrlock, _enter_pwrlock,
_exit_pwrlock and _rtw_down_sema.
Colin Ian King [Mon, 15 Aug 2016 14:45:04 +0000 (15:45 +0100)]
staging: ks7010: don't print skb->dev->name if skb is null
A null pointer dereference will occur when skb is null and
skb->dev->name is printed. Replace the skb->dev->name with
plain text "ks_wlan" to fix this.
Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
wait_for_completion_interruptible_timeout return 0 on timeout and
-ERESTARTSYS if interrupted. The check for
!wait_for_completion_interruptible_timeout() would report an interrupt
as timeout. Further, while HZ/50 will work most of the time it could
fail for HZ < 50, so this is switched to msecs_to_jiffies(20).
Fixes: 13a9930d15b4 ("staging: ks7010: add driver from Nanonote extra-repository") Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
yeongjun Kim [Tue, 14 Jun 2016 15:36:07 +0000 (00:36 +0900)]
staging: sm750fb: fix block comments errors in ddk750_display.c
WARNING: Block comments use * on subsequent lines
WARNING: Block comments use a trailing */ on a separate line
WARNING: Block comments use * on subsequent lines
WARNING: Block comments use a trailing */ on a separate line
Signed-off-by: yeongjun Kim <iam.yeongjunkim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philippe Reynes [Fri, 15 Jul 2016 23:13:35 +0000 (01:13 +0200)]
net: ethernet: octeon: use phy_ethtool_{get|set}_link_ksettings
There are two generics functions phy_ethtool_{get|set}_link_ksettings,
so we can use them instead of defining the same code in the driver.
There was a check on CAP_NET_ADMIN in cvm_oct_set_settings, but this
check is already done in dev_ethtool, so no need to repeat it before
calling the generic function.
Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Philippe Reynes [Fri, 15 Jul 2016 23:13:34 +0000 (01:13 +0200)]
net: ethernet: octeon: use phydev from struct net_device
The private structure contain a pointer to phydev, but the structure
net_device already contain such pointer. So we can remove the pointer
phydev in the private structure, and update the driver to use the
one contained in struct net_device.
Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: slicoss: improve implementation concerning the shared memory
Remove the volatile specifiers of struct slic_shmem. Furthermore store the
bus addresses for the isr pointer, link status and statistics separately
and access the upper and lower word of these addresses by means of
[lower|upper]_32_bits(). By doing this take the endianness into account.
staging: slicoss: dont use a structure but offsets for register accesses
Use the new register accessors that use offsets instead of the slic_regs
structure to read/write registers. Since not longer needed remove the
structure completley.
Introduce the function slic_flush_write() which reads from the HOSTID
register and can be used to avoid PCI write posting. Use the function at
several critical places in the code.
staging: slicoss: introduce register accessors that use register offsets
Introduce accessor functions that read and write registers by using a
register offset.
This is in preparation to replace the register addressing by means of the
slic_regs struct with an addressing by means of offsets.
staging: slicoss: start tx queue when interface is brought up
There is no reason to delay tx queue activation until a link is detected.
So start the queue when the interface is brought up and stop it when the
interface is brought down.
staging: slicoss: handle allocation failure in slic_init_adapter
The memory allocation in slic_init_adapter() can fail. Return an error in
this case and unwind properly. Also make sure that the allocated memory is
properly freed in case of an error in the calling probe() function.
By doing this also replace the alloc() followed by memset to zero the
memory with a zalloc() version.
Chen Feng [Thu, 19 May 2016 03:03:16 +0000 (11:03 +0800)]
ION: Sys_heap: Add cached pool to spead up cached buffer alloc
Add ion cached pool in system heap. This patch add a cached pool
in system heap. It has a great improvement of alloc for cached
buffer.
With memory pressue alloc test 800MB in userspace used iontest.
The result avg is 577ms. Without patch it's avg is about 883ms.
v1: Makes the cached buffer zeroed before going to pool
v2: Add cached param in pool to distinguish wheather need to flush
cache at a fresh alloc.
Rework the shrink function.
Signed-off-by: Chen Feng <puck.chen@hisilicon.com> Signed-off-by: Xia Qing <saberlily.xia@hisilicon.com> Reviewed-by: Fu Jun <oliver.fu@hisilicon.com> Acked-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: wilc1000: fix error handling in wilc_debugfs_init()
We can just ignore the return value from debugfs_create_dir() and
debugfs_create_file(). The second one already interanlly checks the dentry
created by the first before creating the file.
debugfs was written so it would be easy to use, no need for error checking.
Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: i4l: icn: use setup_timer() and mod_timer().
Use setup_timer() instead of init_timer(), being the preferred/standard
way to set a timer up.
Also, quoting the mod_timer() function comment:
-> mod_timer() is a more efficient way to update the expire field of an
active timer (if the timer is inactive it will be activated).
Use setup_timer and mod_timer to setup and arm a timer, to make the code
cleaner and easier to read.
Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: i4l: pcbit: layer2: use setup_timer() and mod_timer().
Use setup_timer() instead of init_timer(), being the preferred/standard
way to set a timer up.
Also, quoting the mod_timer() function comment:
-> mod_timer() is a more efficient way to update the expire field of an
active timer (if the timer is inactive it will be activated).
Use setup_timer and mod_timer to setup and arm a timer, to make the code
cleaner and easier to read.
Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: i4l: pcbit: edss1: use setup_timer() and mod_timer().
Use setup_timer() instead of init_timer(), being the preferred/standard
way to set a timer up.
Also, quoting the mod_timer() function comment:
-> mod_timer() is a more efficient way to update the expire field of an
active timer (if the timer is inactive it will be activated).
Use setup_timer and mod_timer to setup and arm a timer, to make the code
cleaner and easier to read.
Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: i4l: pcbit: drv: use setup_timer() and mod_timer().
Use setup_timer() instead of init_timer(), being the preferred/standard
way to set a timer up.
Also, quoting the mod_timer() function comment:
-> mod_timer() is a more efficient way to update the expire field of an
active timer (if the timer is inactive it will be activated).
Use setup_timer and mod_timer to setup and arm a timer, to make the code
cleaner and easier to read.
Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fixed below sparse warnings in dt2811.c
warning: symbol 'dt2811_clk_dividers' was not declared. Should it be static?
warning: symbol 'dt2811_clk_multipliers' was not declared. Should it be static?