- 12 6月, 2012 1 次提交
-
-
由 Minchan Kim 提交于
xvmalloc can't handle PAGE_SIZE page so that zram have to handle it specially but zsmalloc can do it so let's remove unnecessary special handling code. Quote from Nitin "I think page vs handle distinction was added since xvmalloc could not handle full page allocation. Now that zsmalloc allows full page allocation, we can just use it for both cases. This would also allow removing the ZRAM_UNCOMPRESSED flag. The only downside will be slightly slower code path for full page allocation but this event is anyways supposed to be rare, so should be fine." 1. This patch reduces code very much. drivers/staging/zram/zram_drv.c | 104 +++++-------------------------------- drivers/staging/zram/zram_drv.h | 17 +----- drivers/staging/zram/zram_sysfs.c | 6 +-- 3 files changed, 15 insertions(+), 112 deletions(-) 2. change pages_expand with bad_compress so it can count bad compression(above 75%) ratio. 3. remove zobj_header which is for back-reference for defragmentation because firstly, it's not used at the moment and zsmalloc can't handle bigger size than PAGE_SIZE so zram can't do it any more without redesign. Cc: Seth Jennings <sjenning@linux.vnet.ibm.com> Signed-off-by: NMinchan Kim <minchan@kernel.org> Acked-by: NNitin Gupta <ngupta@vflare.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 11 6月, 2012 5 次提交
-
-
由 Minchan Kim 提交于
fd1a30de makes a bug that it uses (struct page *) as zsmalloc's handle although it's a uncompressed page so that it can access random page, return random data or even crashed by get_first_page in zs_map_object. Cc: Seth Jennings <sjenning@linux.vnet.ibm.com> Cc: Jerome Marchand <jmarchan@redhat.com> Signed-off-by: NMinchan Kim <minchan@kernel.org> Acked-by: NNitin Gupta <ngupta@vflare.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Minchan Kim 提交于
We should use unsigned long as handle instead of void * to avoid any confusion. Without this, users may just treat zs_malloc return value as a pointer and try to deference it. This patch passed compile test(zram, zcache and ramster) and zram is tested on qemu. changelog * from v2 - remove hval pointed out by Nitin - based on next-20120607 * from v1 - change zcache's zv_create return value - baesd on next-20120604 Cc: Dan Magenheimer <dan.magenheimer@oracle.com> Acked-by: NSeth Jennings <sjenning@linux.vnet.ibm.com> Acked-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: NMinchan Kim <minchan@kernel.org> Acked-by: NNitin Gupta <ngupta@vflare.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Dan Carpenter 提交于
These two places seem like they should be using bitwise OR instead of bitwise AND. The first one is a noop which is equivalent to: imr |= (0x0100 & 0x0004 & 0x0001); The second is sets lcr2 to zero instead of just clearing the high bits. lcr2 &= (0x00F0 & 0x000F); Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Adnan Ali 提交于
This commit fixes coding style issues including braces position and line wrapping. Signed-off-by: NAdnan Ali <adnan.ali@codethink.co.uk> Reviewed-by: NJannis Pohlmann <jannis.pohlmann@codethink.co.uk> Acked-by: NMark Einon <mark.einon@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Andy Gross 提交于
Failures during the dmm probe can cause the kernel to crash. Moved the spinlock to a global and moved list initializations immediately after the allocation of the dmm private structure. Signed-off-by: NAndy Gross <andy.gross@ti.com> Reviewed-by: NRob Clark <rob.clark@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 09 6月, 2012 9 次提交
-
-
由 Miguel Gómez 提交于
Use DEFINE_PCI_DEVICE_TABLE() to create the device table and add MODULE_DEVICE_TABLE() to export it. Signed-off-by: NMiguel Gómez <magomez@igalia.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Miguel Gómez 提交于
Signed-off-by: NMiguel Gómez <magomez@igalia.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Miguel Gómez 提交于
Remove the error_flag field from the ipoctal structure, as the error code is handled through the tty abstraction. Remove the values definition as well. Signed-off-by: NMiguel Gómez <magomez@igalia.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Miguel Gómez 提交于
The configuration of the communication channel is handled by the tty abstraction, so the ipoctal_config structure has become useless and it's only used to store values that are never accesed. Remove it. Signed-off-by: NMiguel Gómez <magomez@igalia.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Miguel Gómez 提交于
Remove the gotos when handling error conditions, as the code gets clearer and the gotos are not really avoiding code replication. Signed-off-by: NMiguel Gómez <magomez@igalia.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Miguel Gómez 提交于
Remove the "out" label from tpci200_request_irq(), as it can directly return the error code instead of jumping. Signed-off-by: NMiguel Gómez <magomez@igalia.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Miguel Gómez 提交于
Signed-off-by: NMiguel Gómez <magomez@igalia.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Miguel Gómez 提交于
Remove the "out" label from tpci200_slot_map_space(), as it can directly return the error code instead of jumping. Signed-off-by: NMiguel Gómez <magomez@igalia.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Miguel Gómez 提交于
Handle error conditions with simple returns instead of usig gotos. Signed-off-by: NMiguel Gómez <magomez@igalia.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 07 6月, 2012 21 次提交
-
-
由 Leed Aguilar 提交于
The raw data reading process (ak8975_read_axis) sets the single measurement mode to take a sample and once the conversion is completed the device enters into power-down mode automatically, therefore there is no need to enable a flag for this to happen. Signed-off-by: NLeed Aguilar <leed.aguilar@ti.com> Acked-by: NJonathan Cameron <jic23@kernel.org> Acked-by: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Leed Aguilar 提交于
Use gpio_request_one api, it looks cleaner. Signed-off-by: NLeed Aguilar <leed.aguilar@ti.com> Acked-by: NJonathan Cameron <jic23@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Leed Aguilar 提交于
Fuse ROM data access mode is the only mode which does not transition to power-down mode automatically. As per the AK8975 data sheet, it is recomended to set the power-down mode first before attempting to change into another mode. Signed-off-by: NLeed Aguilar <leed.aguilar@ti.com> Acked-by: NLaxman Dewangan <ldewangan@nvidia.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Lars-Peter Clausen 提交于
Use scnprint instead of snprintf, because snprintf returns the number of bytes that would have been written to the buffer if there was enough space, and as a result writing to buf[len-1] might cause a access beyond the buffers limits. Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Acked-by: NJonathan Cameron <jic23@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Michael Hennerich 提交于
drivers/iio/frequency/adf4350.c:316:32: warning: ‘val’ may be used uninitialized in this function [-Wuninitialized] Signed-off-by: NMichael Hennerich <michael.hennerich@analog.com> Reported-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Signed-off-by: NSamuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Signed-off-by: NSamuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
When uninstalling a device, the call to the ipack_bus_ops remove() frees resources in the ipack device driver but without unregistering the device. It generates a kernel oops when somebody wants to unregister the device. Signed-off-by: NSamuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
tpci200->info is used later when uninstalling the module. As there is another kfree in the proper place, this patch removes the wrong one. Signed-off-by: NSamuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
When uninstalling a device, there is a loop of calls that produces, at the end, two calls to __ipoctal_remove() function with the same ipack_device argument. The first time works fine, but the second will fail in tty_unregister_driver() To avoid this situation, the call to __ipoctal_remove() it is done only from the ipack bus driver and not from the ipack device driver. Signed-off-by: NSamuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
When a bus driver calls ipack_driver_register(), it should manages the returning NULL value to undo all the operations it did before this call, and print the corresponding trace. It is not a task for the ipack driver to call the remove() function here. Signed-off-by: NSamuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Use idr interface to give the bus number. That way, we remove the limitation of 64 buses. The mutex is removed because the ida interface uses spinlocks inside, so it is not needed an extra lock. Signed-off-by: NSamuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
When ipack_device_register() is called, the variable tpci200->slots[dev->slot].dev has not assigned a value and it gives an error when the mezzanine driver is reading a register from the board for the match() function, as all the I/O functions call check_slot(). Signed-off-by: NSamuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
This field is not needed at all, as the IRQ is registered for the carrier not for the mezzanine. Signed-off-by: NSamuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Signed-off-by: NSamuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
To avoid a dereference of a NULL pointer, the availability of the function is checked before its use. Signed-off-by: NSamuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
tpci200_slot_map_space() should return 0 if the operation was properly done. If not, the caller will think that something wrong happened. This patch establish the returned value to 0. It is overwritten in case of error. Signed-off-by: NSamuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
tpci200_slot_unmap_space() should return 0 if the operation was properly done. If not, the caller will think that something wrong happened. Signed-off-by: NSamuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
It should return the same value given by the match function of the ipack_driver that has been called. Returning 0 here, means that the match has failed and it could be succeed. Signed-off-by: NSamuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
To perform the installation of a mezzanine it was needed to write on these files, now it is not needed at all as the device model is properly implemented. Signed-off-by: NSamuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Sachin Kamat 提交于
version.h header file is no longer required. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 05 6月, 2012 4 次提交
-
-
由 Shubhrajyoti D 提交于
The memory regions of the probe and remove are move to __devinit and __devexit respectively. Acked-by: NJonathan Cameron <jic23@kernel.org> Signed-off-by: NShubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Shubhrajyoti D 提交于
The memory regions of the probe and remove are move to __devinit and __devexit respectively. Acked-by: NJonathan Cameron <jic23@kernel.org> Signed-off-by: NShubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Lars-Peter Clausen 提交于
The IIO DAC drivers are in a reasonably good shape. They all make use of channel spec and non of them provides non-documented sysfs attributes. Code style should be OK as well, both checkpatch and coccicheck only report trivial issues. So lets move the whole folder out of staging. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Acked-by: NJonathan Cameron <jic23@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Lars-Peter Clausen 提交于
The header for this driver contains some private structs and defines, which do not have to be shared between multiple source files, as well as the platform data struct for this driver, which has to be shared with other source files. Since there is no need to expose those private structs and defines move them to the source file. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Acked-by: NJonathan Cameron <jic23@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-