staging: vme: fix section mismatches in linux-next 20120314
pio2_gpio_init() annotated with __init, but called by pio2_probe()
which is annotated __devinit. pio2_gpio_exit() is annotated __exit,
but is called by pio2_probe() and by pio2_remove() which is annotated
__devexit.
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Acked-by: Chris Kelly <ckelly@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tomas Winkler [Wed, 14 Mar 2012 12:39:42 +0000 (14:39 +0200)]
staging/mei: propagate error codes up in the write flow
Change mei_write_message's return type from bool to int
to enable propagation of the error code up to caller functions.
The function now returns -EIO when low level write fails and 0
on success.
A similar change is done in intermediate caller functions:
mei_send_flow_control, mei_connect, and mei_disconnect
This makes code more alike to typical Linux kernel error
handling.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rob Clark [Mon, 12 Mar 2012 02:11:22 +0000 (21:11 -0500)]
staging: drm/omap: use current time for page-flip event
Because we don't have vblank hooked up via drm_irq (which is a bit
awkward due to separation between omapdss (which knows the irq #)
and omapdrm, for now use gettimeofday to have a semi-sane timestamp
in the page-flip event. Otherwise apps like weston drm compositor,
which use the timestamp in it's animations, get highly confused.
Signed-off-by: Rob Clark <rob@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rob Clark [Mon, 12 Mar 2012 02:11:21 +0000 (21:11 -0500)]
staging: drm/omap: send page-flip event after endwin
The endwin irq indicates that DSS has finished scanning out a buffer.
Use this to trigger page-flip event to userspace, so this happens
only *after* the previous buffer is finished.
Signed-off-by: Rob Clark <rob@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arve Hjønnevåg [Thu, 8 Mar 2012 23:43:36 +0000 (15:43 -0800)]
Staging: android: binder: Fix use-after-free bug
binder_update_page_range could read freed memory if the vma of the
selected process was freed right before the check that the vma
belongs to the mm struct it just locked.
If the vm_mm pointer in that freed vma struct had also been rewritten
with a value that matched the locked mm struct, then the code would
proceed and possibly modify the freed vma.
Stephen Boyd [Thu, 8 Mar 2012 19:41:14 +0000 (11:41 -0800)]
staging: ram_console: Fix section mismatches
WARNING: vmlinux.o(.text+0xfcf6e): Section mismatch in reference
from the function ram_console_driver_probe() to the function
.init.text:persistent_ram_init_ringbuffer()
The function ram_console_driver_probe() references
the function __init persistent_ram_init_ringbuffer().
This is often because ram_console_driver_probe lacks a __init
annotation or the annotation of persistent_ram_init_ringbuffer is
wrong.
Move this driver to platform_driver_probe() because ram console
devices aren't going to be added and removed at runtime. Also
shorten the probe function name since driver is redundant and
makes the function name long.
Cc: Android Kernel Team <kernel-team@android.com> Cc: John Stultz <john.stultz@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The Linux kernel has a setting called dmesg_restrict. When true,
only processes with CAP_SYSLOG can view the kernel dmesg logs. This
helps prevent leaking of kernel information into user space.
On Android, it's possible to bypass these restrictions by viewing
/proc/last_kmsg.
This change makes /proc/last_kmsg require the same permissions as
dmesg.
CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Nick Kralevich <nnk@google.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Cross [Thu, 8 Mar 2012 01:34:37 +0000 (17:34 -0800)]
staging: android: ram_console: fix crash in ram_console_late_init
If the persistent ram buffer is not available, ram_console_late_init
would crash when dereferencing ram_console_zone. Return early if
ram console was not initialized.
CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Cross [Thu, 8 Mar 2012 01:34:36 +0000 (17:34 -0800)]
staging: android: persistent_ram: add notrace to persistent_ram_write
Add the notrace attribute to persistent_ram_write and the
non-ecc functions that it calls to allow persistent_ram to
be used for ftracing (only when ecc is disabled).
CC: Greg KH <gregkh@linuxfoundation.org> CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Cross [Thu, 8 Mar 2012 01:34:35 +0000 (17:34 -0800)]
staging: android: persistent_ram: make persistent_ram_write atomic
Allow persistent_ram_write to be called on multiple cpus at
the same time, as long as ecc is not in use. Uses atomics
for the buffer->start and buffer->size counters.
[jstultz: Fix up some pr_info casting issues on 64bit] CC: Greg KH <gregkh@linuxfoundation.org> CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Cross [Thu, 8 Mar 2012 01:34:34 +0000 (17:34 -0800)]
staging: android: persistent_ram: handle reserving and mapping memory
Replace the ioremapped memory passed in from the drivers with
a memblock_reserve and vmap. Adds a new function,
persistent_ram_early_init, designed to be called from the machine
init_early callback, that calls memblock_remove and saves the
provided persistent ram area layout.
Drivers only pass in their struct device * and ecc settings.
Locating and mapping the memory is now handled entirely within
persistent_ram.
Also, convert ram_console to the new persistent_ram_init
parameters that only take a struct device * and ecc settings.
[jstultz: Fix pr_info casting issues on 64bit, folded two
patches as the build breaks if they are apart. Also replaced
phys_to_page() w/ pfn_to_page(addr>>PAGE_SHIFT), as phys_to_page
is only on a few arches.] CC: Greg KH <gregkh@linuxfoundation.org> CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Cross [Thu, 8 Mar 2012 01:34:33 +0000 (17:34 -0800)]
staging: android: persistent_ram: refactor ecc support
Remove CONFIG_ANDROID_RAM_CONSOLE_ERROR_CORRECTION and related
#ifdefs. Also allow persistent ram zones without ecc enabled.
For some use cases, like the data portion of the upcoming
persistent_vars patches, or a persistent ftrace ringbuffer,
ecc on every update is too expensive.
CC: Greg KH <gregkh@linuxfoundation.org> CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Cross [Thu, 8 Mar 2012 01:34:32 +0000 (17:34 -0800)]
staging: android: ram_console: split out persistent ram
Split ram_console into two halves.
persistent_ram is a set of apis that handle a block of memory
that does not get erased across a reboot. It provides functions
to fill it as a single buffer or a ring buffer, and to extract
the old data after a reboot. It handles ecc on the data to
correct bit errors introduced during reboot.
ram_console is now a small wrapper around persistent_ram that
feeds console data into the ringbuffer, and exports the old
data to /proc/last_kmsg after a reboot.
[jstultz: Moved persistent_ram.h to staging dir] CC: Greg KH <gregkh@linuxfoundation.org> CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Cross [Thu, 8 Mar 2012 01:34:30 +0000 (17:34 -0800)]
staging: android: ram_console: drop early buffer support
Early ramconsole is not very useful, an early crash will prevent
getting the logged data out on the next boot, and CONFIG_DEBUG_LL=y
will get the same information. Drop it to simplify a future
refactoring.
CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Don't store the bootinfo string and the ecc status string with
the recovered old log data. This will simplify refactoring the
persistent ram code out of the ram console code later.
CC: Android Kernel Team <kernel-team@android.com> Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tomas Winkler [Tue, 6 Mar 2012 20:34:32 +0000 (22:34 +0200)]
staging/mei: don't use read buffer for writing
In mei_irq_thread_read_bus_message we reused mei_hdr
allocated on read buffer to write the stop message.
There is no bug associated with this but for code
clarity we use write buffer also for message header.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andy Gross [Mon, 5 Mar 2012 16:48:39 +0000 (10:48 -0600)]
staging: drm/omap: Get DMM resources from hwmod
This patch splits the DMM off into a separate sub-device, in order to
utilize the platform device information that was created as part of
the OMAP hwmod entry for the DMM.
The driver probe function queries the iomem resource and IRQ using
standard platform_get functions.
The OMAP DRM driver now calls the platform_driver_register() function
for the subordinate DMM driver inside its probe function. This
guarantees the required order for the DMM and ensures the DMM resources
are available for use by the DRM driver.
Signed-off-by: Andy Gross <andy.gross@ti.com> Signed-off-by: Rob Clark <rob@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rob Clark [Mon, 5 Mar 2012 16:48:35 +0000 (10:48 -0600)]
staging: drm/omap: defer unpin until scanout completes
When flipping, defer unpinning until scanout completes, as indicated
by the appropriate END_WIN irq.
This also re-organizes things a bit, in replacing omap_fb_{pin,unpin}
with omap_fb_replace(), to make it easier to add support for scanout
synchronized DMM refill mode (flipping by just reprogramming DMM
synchronized with DSS scanout).
Signed-off-by: Rob Clark <rob@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rob Clark [Mon, 5 Mar 2012 16:48:32 +0000 (10:48 -0600)]
staging: drm/omap: add a workqueue
Add a workqueue for omapdrm driver, which is needed for at least a
couple things currently: (1) moving omap_gem_roll() to a non-atomic
context, (2) synchronizing page flips w/ DSS scanout related irq's
(in particular not unmapping previous buffer until DSS finishes
scanout).
Signed-off-by: Rob Clark <rob@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Grant Grundler [Mon, 5 Mar 2012 17:15:59 +0000 (09:15 -0800)]
staging:iio:tsl2563 rewrite probe error handling
tsl2563 probe function has two minor issues with it's error handling paths:
1) it is silent (did not report errors to dmesg)
2) did not return failure code (mixed up use of ret and err)
and two major issues:
3) goto fail2 would corrupt a free memory pool ("double free")
4) device registration failure did NOT cancel/flush delayed work.
(and thus dereference a freed data structure later)
The "double free" is subtle and was introduced with this change:
Author: Jonathan Cameron <jic23@cam.ac.uk>
Date: Mon Apr 18 12:58:55 2011 +0100
staging:iio:tsl2563 take advantage of new iio_device_allocate private data.
Originally, chip was allocated seperately. Now it's appended to the
indio_dev by iio_allocate_device(sizeof(*chip)). So we only need one
kfree call as well (in iio_free_device()).
Gory details of tracking this down are here:
http://crosbug.com/26819
Despite iio_device_registration failing, system can at least now boot.
Will follow up with a fix to "double register : in_intensity_both_raw"
error that is included in the bug report.
Signed-off-by: Grant Grundler <grundler@chromium.org> Acked-by: Jonathan Cameron <jic23@kernel.org> Reviewed-by: Bryan Freed <bfreed@chromium.org> Reviewed-by: Benson Leung <bleung@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Seth Jennings [Mon, 5 Mar 2012 17:33:23 +0000 (11:33 -0600)]
staging: zsmalloc: change ZS_MIN_ALLOC_SIZE
This patch ensures that the value of ZS_MIN_ALLOC_SIZE, for the
PAGE_SIZE and MAX_PHYSMEM_BITS on the system, allows for all
possible object ids in the lowest storage class to be encoded
in the object handle.
Seth Jennings [Mon, 5 Mar 2012 17:33:21 +0000 (11:33 -0600)]
staging: zsmalloc: add ZS_MAX_PAGES_PER_ZSPAGE
This patch moves where max_zspage_order is declared and
changes its meaning. "Order" typically implies 2^order
of something; however, it is currently being used as the
"maximum number of single pages in a zspage". To add clarity,
ZS_MAX_ZSPAGE_ORDER is now used to calculate ZS_MAX_PAGES_PER_ZSPAGE,
which is 2^ZS_MAX_ZSPAGE_ORDER and is the upper bound on the number
of pages in a zspage.
Seth Jennings [Mon, 5 Mar 2012 16:46:38 +0000 (10:46 -0600)]
staging: zcache: make zcache builtin only
zcache cannot currently be loaded as a module. However
the Kconfig allows it to be built as a module; something that
the user probably does not intend since the module is not
loadable.
This patch switches zcache from a tristate to a bool in the Kconfig
staging:iio: Fix compile error without CONFIG_DEBUG_FS
commit e553f182d ("staging: iio: core: Introduce debugfs support, add support
for direct register access") added a '#if defined(CONFIG_DEBUG_FS)' around
iio_read_channel_ext_info and iio_write_channel_ext_info causing the following
compile error if CONFIG_DEBUG_FS is not defined.
drivers/staging/iio/industrialio-core.c:621:11: error: 'iio_read_channel_ext_info' undeclared (first use in this function)
drivers/staging/iio/industrialio-core.c:623:11: error: 'iio_write_channel_ext_info' undeclared (first use in this function)
This patch fixes the issue by moving the functions out of the '#if
defined(CONFIG_DEBUG_FS)' section again.
Reported-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: android/lowmemorykiller: Don't unregister notifier from atomic context
The lowmemorykiller registers an atomic notifier for notfication of when
the task is freed. From this atomic notifier callback, it removes the
atomic notifier via task_free_unregister(). This is incorrect because
atomic_notifier_chain_unregister() calls syncronize_rcu(), which can
sleep, which shouldn't be done from an atomic notifier.
Fix this by registering the notifier during init, and only unregister it
if the lowmemorykiller is unloaded.
Rebased to -next by Paul E. McKenney.
Rebased to -next again by Anton Vorontsov.
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Christian Bejram <christian.bejram@stericsson.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reported-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Zhengwang Ruan [Wed, 7 Mar 2012 02:36:57 +0000 (10:36 +0800)]
Staging:android: Change type for binder_debug_no_lock switch to bool
GCC warns that module_param_named() indirectly returns a bool type value
which is different from 'int' type binder_debug_no_lock declared. Change
it to bool because it is a internal switch for debugging.
The kernel already has a debug allocator, no need to have one unique to
a single driver. So delete it, replace with kfree, kmalloc, and, in a
few places that need it, kzalloc().
Cc: Chris Kelly <ckelly@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Fri, 2 Mar 2012 05:17:04 +0000 (00:17 -0500)]
Staging: bcm: fix possible memory leak of 'pstAddIndication' in CmHost.c and removes a whitespace
Memory is being allocated by kmalloc and stored in
variable pstAddIndication. However, this memory is
not being freed in all cases. Therefore, this patch
frees it on several exit paths. This patch also
removes a whitespace.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Krause [Fri, 2 Mar 2012 12:01:40 +0000 (13:01 +0100)]
Staging: rtl8712/rtl8192u: move USB device ID within staging drivers.
It seems the USB device ID 0bda:8192 is wrongly assigned to the
RTL8192SU chip and not to the RTL8191SU chip in the USB database.
So this patch moves this device ID from the rtl8192u staging
driver to the rtl8712 staging driver.
This patch was tested with a Radicom WIFIHU embedded wireless
module with a RTL8191SU chip and the USB device ID 0bda:8192.
Without the patch the rtl8192u driver claims this device, but
it does not work. With the patch the rtl8712 driver services
this device and it works.
Signed-off-by: Martin Krause <martin.krause@tqs.de> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Fri, 2 Mar 2012 06:59:55 +0000 (09:59 +0300)]
Staging: ozwpan: prevent bogus dereference
app_id comes from the network and can't be trusted. If it's zero then
it will lead to a kernel crash.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Chris Kelly <ckelly@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Mon, 27 Feb 2012 04:08:36 +0000 (22:08 -0600)]
staging: r8712u: Fix regression in signal level after commit c6dc001
In commit c6dc001 "staging: r8712u: Merging Realtek's latest (v2.6.6).
Various fixes", the returned qual.qual member of the iw_statistics
struct was changed. For strong signals, this change made no difference;
however for medium and weak signals it results in a low signal that
shows considerable fluctuation, When using wicd for a medium-strength
AP, the value reported in the status line is reduced from 100% to 60% by
this bug.
This problem is reported in https://bugzilla.kernel.org/show_bug.cgi?id=42826.
Reported-and-tested-by: Robert Crawford <wrc1944@gmail.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Sun, 26 Feb 2012 00:10:21 +0000 (18:10 -0600)]
staging: r8712u: Fix regression caused by commit 8c213fa
In commit 8c213fa "staging: r8712u: Use asynchronous firmware loading",
the command to release the firmware was placed in the wrong routine.
In combination with the bug introduced in commit a5ee652 "staging: r8712u:
Interface-state not fully tracked", the driver attempts to upload firmware
that had already been released. This bug is the source of one of the
problems in https://bugs.archlinux.org/task/27996#comment89833.
Tested-by: Alberto Lago Ballesteros <saniukeokusainaya@gmail.com> Tested-by: Adrian <agib@gmx.de> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Larry Finger [Sun, 26 Feb 2012 00:10:20 +0000 (18:10 -0600)]
staging: r8712u: Fix regression introduced by commit a5ee652
In commit a5ee652 "staging: r8712u: Interface-state not fully tracked",
the private boolean "bup" was set false when the interface was brought down,
as that seemed appropriate. This change has not caused any problems when
using NetworkManager or manual control of the device; however, when wicd
control is used, there is a locking problem in wpa_supplicant, as shown in
https://bugzilla.kernel.org/show_bug.cgi?id=42818.
This fix reverts the only code change in commit a5ee652. My
analysis is that "bup" is badly named. In its present form, it
seems to indicate the up/down state of the device, but its usage
is more consistent with an initialized/uninitialized state. That
problem will be addressed in a later patch.
Note: Commit 8c213fa, which introdued asynchronous firmware loading
for this driver, exposed this bug to a greater extent. That bug
is addressed in the next patch in this series.
This bug is also responsible for the bug in
https://bugzilla.kernel.org/show_bug.cgi?id=42815. and this bug is
also part of the problems discussed at https://bugs.archlinux.org/task/27996#comment89950.
Tested-by: Alberto Lago Ballesteros <saniukeokusainaya@gmail.com> Tested-by: Adrian <agib@gmx.de> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> [3.2+] Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Tue, 28 Feb 2012 08:21:46 +0000 (11:21 +0300)]
Staging: wlan-ng: still setting wrong data
In commit 1ca1a92cc6 "Staging: wlan-ng: memsetting the wrong amount of
data" I changed the code so we didn't memset() past the end of the
msg1.bssid.data[] array. Walter Harms noticed that it was weird that
we were setting the len to 6 when there were 7 elements in the array.
Pavel Roskin pointed out that the intent of the code was actually to
memset() msg1.bssid.data.data[] which is a 6 character array.
Reported-by: Walter Harms <wharms@bfs.de> Reported-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jorgyano Vieira [Sat, 25 Feb 2012 23:55:10 +0000 (21:55 -0200)]
Staging: crystalhd: Add global header
In the crystalhd_cmds.h there was a struct dependence bug:
the struct crystalhd_adp (which is declared on crystalhd_lnx.h)
is used on the crystalhd_cmd struct, however the crystalhd_lnx.h is
never included on crystalhd_cmds.h at all. Including the
crystalhd_lnx.h on crystalhd_cmds.h breaks the build,
many dependencies error occurrs, most of the type
"error: 'struct bar' has no member named 'foo'",
so I decided to reorganize the headers by adding a global header.
The gobal header crystalhd.h includes all the local headers.
The idea is that the crystalhd header will be the only included
by the others files, this will avoid the mess of many #include levels.
The order of the headers included by crystalhd.h considers the
dependencies among the headers.
Peter Huewe [Sat, 25 Feb 2012 00:19:41 +0000 (01:19 +0100)]
staging: asus_oled: Remove superfluous loop
This patch removes a superfluous loop in asus_oled.c
The code is equivalent to do{...} while (0) and thus executes the code
exactly once -> so we can simply remove the loop.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tomas Winkler [Sun, 26 Feb 2012 21:18:57 +0000 (23:18 +0200)]
staging: mei: kill struct hbm_cmd bit fields
Replace bitfield struct hbm_cmd with simple u8 as we
always access the value as whole. This allows us to remove
few ugly type casts
For possible further uses and documentation purposes we add
corresponding bitmask defines
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Seth Jennings [Tue, 28 Feb 2012 22:02:23 +0000 (16:02 -0600)]
staging: zcache: fix memory corruption bug
This patch fixes a bug where the zv code writes before the allocated
buffer, resulting in system memory corruption. This was introduced
during the switch from xvmalloc to zsmalloc.
Seth Jennings [Tue, 28 Feb 2012 22:01:37 +0000 (16:01 -0600)]
staging: zcache: fix length type mismatch
This fixes a type mismatch in the compression code where
a size_t pointer was cast to a unsigned int pointer. On
little endian archs, there is no issue. However on big
endian archs, the value is incorrect, taking the high
order bits and truncating the lower order bits.
Chris Kelly [Wed, 29 Feb 2012 16:39:57 +0000 (16:39 +0000)]
staging: ozwpan: Reduced size of oz_evtlist structure.
This structure is used in an ioctl definition and was causing the
64-bit PowerPC build to fail. The size of the array in the structure
has been reduced to fix this.
Signed-off-by: Chris Kelly <ckelly@ozmodevices.com> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The core must not modify available_scan_mask, because it causes problems
with drivers where multiple instances of the driver share the same mask set.
So make this explicit by marking available scan masks as const.
The max1363 driver needs some minor adjustment to accommodate this change.
Pull scan mask allocation into a separate function.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>