id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
847ce401df392b0704369fd3f75df614ac1414b4
Analyze and fix the following issue in the Linux kernel code: HWPOISON: Add unpoisoning support
Problem Details: The unpoisoning interface is useful for stress testing tools to reclaim poisoned pages (to prevent OOM) There is no hardware level unpoisioning, so this cannot be used for real memory errors, only for software injected errors. Note that it may leak pages silently - those who have been removed from LR...
```diff diff --git a/Documentation/vm/hwpoison.txt b/Documentation/vm/hwpoison.txt index 3ffadf8da61f..f047e75acb23 100644 --- a/Documentation/vm/hwpoison.txt +++ b/Documentation/vm/hwpoison.txt @@ -98,10 +98,22 @@ madvise(MADV_POISON, ....) hwpoison-inject module through debugfs - /sys/debug/hwpoison/corrupt-pfn ...
bd1ce5f91f545730df4af492f774d9d32f5da3cb
Analyze and fix the following issue in the Linux kernel code: HWPOISON: avoid grabbing the page count multiple times during madvise injection
Problem Details: If page is double referenced in madvise_hwpoison() and __memory_failure(), remove_mapping() will fail because it expects page_count=2. Fix it by not grabbing extra page count in __memory_failure(). Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
```diff diff --git a/mm/madvise.c b/mm/madvise.c index 35b1479b7c9d..18970aec0d2f 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -238,7 +238,6 @@ static int madvise_hwpoison(unsigned long start, unsigned long end) page_to_pfn(p), start); /* Ignore return value for now */ __memory_failure(page_to_pfn(p)...
918aae42aa9b611a3663b16ae849fdedc67c2292
Analyze and fix the following issue in the Linux kernel code: ACPI: fix for lapic_timer_propagate_broadcast()
Problem Details: I got following warning on ia64 box: In function 'acpi_processor_power_verify': 642: warning: passing argument 2 of 'smp_call_function_single' from incompatible pointer type This smp_call_function_single() was introduced by a commit f833bab87fca5c3ce13778421b1365845843b976: > @@ -162,8 +162,9 ...
```diff diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index bbd066e7f854..d1676b1754d9 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -164,7 +164,7 @@ static void lapic_timer_check_state(int state, struct acpi_processor *pr, pr->power.timer_broadcast_on...
b568be627a7270eba575bc4406a606e1545f91bb
Analyze and fix the following issue in the Linux kernel code: block: temporarily disable discard granularity
Problem Details: Commit 86b37281411cf1e9bc0a6b5406c45edb7bd9ea5d adds a check for misaligned stacking offsets, but it's buggy since the defaults are 0. Hence all dm devices that pass in a non-zero starting offset will be marked as misaligned amd dm will complain. A real fix is coming, in the mean time disable the disc...
```diff diff --git a/block/blk-settings.c b/block/blk-settings.c index dd1f1e0e196f..6ae118d6e193 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -554,11 +554,18 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b, ret = -1; } + /* + * Temporarily disable discard granularity. ...
747479a3fb42849fe73b9b1f7545d751bde7d632
Analyze and fix the following issue in the Linux kernel code: ACPI: dock: minor whitespace and style cleanups
Problem Details: Removed some stray whitespaces Added whitespace when needed for legibility Removed unneeded curly braces Removed useless void casts Removed unnecessary local variable initialization Renamed variables to help out with 80-column fixes Signed-off-by: Alex Chiang <achiang@hp.com> Acked-by: Shaohua Li <sha...
```diff diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index cfcd8eeb3b2a..d4c3d82bef3f 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c @@ -238,6 +238,7 @@ static int is_battery(acpi_handle handle) static int is_ejectable_bay(acpi_handle handle) { acpi_handle phandle; + if (!is_ejectable(handle...
48617f862f9e58ca2a609fea6a76733aff55d672
Analyze and fix the following issue in the Linux kernel code: RDMA/cxgb3: Fix error paths in post_send and post_recv
Problem Details: Always set bad_wr when an immediate error is detected. Return ENOMEM for queue full instead of EINVAL to match other drivers. Signed-off-by: Frank Zago <fzago@systemfabricworks.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/cxgb3/iwch_qp.c b/drivers/infiniband/hw/cxgb3/iwch_qp.c index 1cecf98829ac..3eb8cecf81d7 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_qp.c +++ b/drivers/infiniband/hw/cxgb3/iwch_qp.c @@ -365,18 +365,19 @@ int iwch_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, spin_lo...
503914cf4a4b5dbe3f844e0a92f412ae99fde70e
Analyze and fix the following issue in the Linux kernel code: net: sh_eth alignment fix for sh7724 using NET_IP_ALIGN V2
Problem Details: Fix sh_eth for sh7724 by adding NET_IP_ALIGN support V2. Without this patch the receive data is misaligned. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index c88bc1013047..ca6285016dfd 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c @@ -84,6 +84,8 @@ static struct sh_eth_cpu_data sh_eth_my_cpu_data = { .mpr = 1, .tpauser = 1, .hw_swap = 1, + .rpadir = 1, + .rpadir_value = 0x00020000,...
734e979f25a74e0d7da4ae0498ecac644db6377d
Analyze and fix the following issue in the Linux kernel code: ixgbe: Fix 82598 premature copper PHY link indicatation
Problem Details: Modified patch with Dave's comments to replace mdelay with proper msleep. Fix 82598 copper link issue, where the phy prematurely indicates link before it is ready to process packets. The new function looks for phy link and indicates that, when it is available. If phy is not ready within few seconds of ...
```diff diff --git a/drivers/net/ixgbe/ixgbe_82598.c b/drivers/net/ixgbe/ixgbe_82598.c index e2d5343f1275..204177d78cec 100644 --- a/drivers/net/ixgbe/ixgbe_82598.c +++ b/drivers/net/ixgbe/ixgbe_82598.c @@ -509,6 +509,40 @@ static s32 ixgbe_start_mac_link_82598(struct ixgbe_hw *hw, return status; } +/** + * ixgbe...
eb985f09b2a189bde80550e410ddfc28c4276c53
Analyze and fix the following issue in the Linux kernel code: ixgbe: Fix tx_restart_queue/non_eop_desc statistics counters
Problem Details: Fix the restart_queue and non_eop_desc counters from being double-counted. They are cumulative in each ring, so we don't want to add them to the cumulative result in the adapter's master counter. Otherwise, the stats will be inaccurate Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@...
```diff diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 35ea8c93fd80..529274824931 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -4511,6 +4511,7 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter) struct ixgbe_hw *hw = &adapter->hw; u64 ...
37cb3e08852be92d94e6a65c489bd8afa2e8a15f
Analyze and fix the following issue in the Linux kernel code: drm/nouveau: fix bug causing pinned buffers to lose their NO_EVICT flag
Problem Details: Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 2f5d47021106..0cad6d834eb2 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -154,6 +154,11 @@ nouveau_bo_placement_set(struct nouveau_bo *nvbo, uint32_t memtype) nvbo->...
65ec01a9406327f22b1c740f8a42cb93eb676eb5
Analyze and fix the following issue in the Linux kernel code: drm/nv50: fix suspend/resume delays without firmware present
Problem Details: Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_grctx.c b/drivers/gpu/drm/nouveau/nouveau_grctx.c index d5d84c87f757..419f4c2b3b89 100644 --- a/drivers/gpu/drm/nouveau/nouveau_grctx.c +++ b/drivers/gpu/drm/nouveau/nouveau_grctx.c @@ -56,6 +56,9 @@ nouveau_grctx_prog_load(struct drm_device *dev) char name[32]; ...
3c8868d3dbba5110bd43b49879f12d1a6b2a28ca
Analyze and fix the following issue in the Linux kernel code: drm/nv50: fix two potential suspend/resume oopses
Problem Details: This avoids touching the dummy channel 0/127 we have on nv50. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c index 78662cc1c8d5..58c717247f26 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.c +++ b/drivers/gpu/drm/nouveau/nouveau_drv.c @@ -277,7 +277,7 @@ nouveau_pci_resume(struct pci_dev *pdev) for (i = 0; i < dev_priv->e...
22fbd53809eb7a1b00fe09159fe0a565fb6c725c
Analyze and fix the following issue in the Linux kernel code: drm/nouveau: Fix up buffer eviction, and evict them to GART, if possible.
Problem Details: Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index aa2dfbc3e351..e9f01906c52e 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -400,10 +400,16 @@ nouveau_bo_evict_flags(struct ttm_buffer_object *bo, struct ttm_placement *...
13c5443b515109f175bb9917c578a7ae973f6851
Analyze and fix the following issue in the Linux kernel code: drm/nv04: Fix NV04 set_operation software method.
Problem Details: Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net> Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nv04_graph.c b/drivers/gpu/drm/nouveau/nv04_graph.c index 396ee92118f6..d561d773c0f4 100644 --- a/drivers/gpu/drm/nouveau/nv04_graph.c +++ b/drivers/gpu/drm/nouveau/nv04_graph.c @@ -543,7 +543,7 @@ nv04_graph_mthd_set_operation(struct nouveau_channel *chan, int grclass, ...
ef2bb506687a5f1cc8ef2fef370bb168b2808106
Analyze and fix the following issue in the Linux kernel code: drm/nouveau: use drm debug levels
Problem Details: - Use driver level (0x2) for NV_DEBUG instead of all levels - Create a NV_DEBUG_KMS for KMS level (0x4) and use them in modesetting code - Remove a few odd NV_TRACE calls and replace some of them with NV_DEBUG_KMS or NV_INFO Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Ben Ske...
```diff diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index 5eec5ed69489..62fadbbd1f40 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c @@ -3854,7 +3854,7 @@ nouveau_bios_run_display_table(struct drm_device *dev, struct dcb_e...
dc4a684ae80d914b2b7fe75b2733a3296a8b92d2
Analyze and fix the following issue in the Linux kernel code: drm/i2c/ch7006: Fix load detection false positives right after system init.
Problem Details: Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/i2c/ch7006_drv.c b/drivers/gpu/drm/i2c/ch7006_drv.c index 9422a74c8b54..81681a07a806 100644 --- a/drivers/gpu/drm/i2c/ch7006_drv.c +++ b/drivers/gpu/drm/i2c/ch7006_drv.c @@ -408,6 +408,11 @@ static int ch7006_probe(struct i2c_client *client, const struct i2c_device_id *i ch7006_...
95f158eab42f971c2a6f82cc886ce657d92a25f4
Analyze and fix the following issue in the Linux kernel code: drm/nv04-nv40: Fix "conflicting memory types" when saving/restoring VGA fonts.
Problem Details: Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
```diff diff --git a/drivers/gpu/drm/nouveau/nv04_display.c b/drivers/gpu/drm/nouveau/nv04_display.c index b47c757ff48b..cdddbaa8c450 100644 --- a/drivers/gpu/drm/nouveau/nv04_display.c +++ b/drivers/gpu/drm/nouveau/nv04_display.c @@ -103,6 +103,7 @@ nv04_display_create(struct drm_device *dev) if (nv_two_heads(dev)...
b552a8c56db8a74ceffdcbb9269664009a81d536
Analyze and fix the following issue in the Linux kernel code: ACPI: remove NID_INVAL
Problem Details: NUMA_NO_NODE has been exported globally and thus it can replace NID_INVAL in the acpi code. Also removes the unused acpi_unmap_pxm_to_node() function. [akpm@linux-foundation.org: coding-style fixes] Cc: Cyrill Gorcunov <gorcunov@openvz.org> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com> Reviewed-by: ...
```diff diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index 202dd0c976a3..90f1884e8a51 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c @@ -28,6 +28,7 @@ #include <linux/types.h> #include <linux/errno.h> #include <linux/acpi.h> +#include <linux/numa.h> #include <acpi/acpi_bus.h> #define PREFIX...
1d9f26262aef6d63ff65eba0fd5f1583f342b69b
Analyze and fix the following issue in the Linux kernel code: Input: ALPS - add interleaved protocol support (Dell E6x00 series)
Problem Details: Properly handle version of the protocol where standard PS/2 packets from trackpoint are stuffed into middle (byte 3-6) of the standard ALPS packets when both the touchpad and trackpoint are used together. The patch is based on work done by Matthew Chapman and additional research done by David Kubicek ...
```diff diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index b03e7e0b4099..f93c2c0daf1f 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -5,6 +5,7 @@ * Copyright (c) 2003-2005 Peter Osterlund <petero2@telia.com> * Copyright (c) 2004 Dmitry Torokhov <dtor@mail.ru> *...
13c199c0d0cf78b27592991129fb8cbcfc5164de
Analyze and fix the following issue in the Linux kernel code: ACPI: Use the return result of ACPI lid notifier chain correctly
Problem Details: On some laptops it will return NOTIFY_OK(non-zero) when calling the ACPI LID notifier. Then it is used as the result of ACPI LID resume function, which will complain the following warning message in course of suspend/resume: >PM: Device PNP0C0D:00 failed to resume: error 1 This patch is to elimi...
```diff diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 0c9c6a9a002c..8a95e8329df7 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c @@ -282,6 +282,13 @@ static int acpi_lid_send_state(struct acpi_device *device) if (ret == NOTIFY_DONE) ret = blocking_notifier_call_chain(&acpi_lid_not...
d785d78bbdb53580b12c40e820af5a3281ce2fc8
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix r100->r500 CS checker for compressed textures. (v2)
Problem Details: This adds support for compressed textures to the r100->r500 CS checker, it lets me run openarena and the demos in mesa fine. Thanks to Maciej Cencora for initial comments. Changes since v1: fix calculations with Maciej formulas Reviewed-by: Maciej Cencora <m.cencora@gmail.com> Signed-off-by: Dave Ai...
```diff diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c index 44d599aded9a..84e5df766d3f 100644 --- a/drivers/gpu/drm/radeon/r100.c +++ b/drivers/gpu/drm/radeon/r100.c @@ -1374,7 +1374,6 @@ static int r100_packet0_check(struct radeon_cs_parser *p, case RADEON_TXFORMAT_ARGB4444: case RAD...
18f7ad59b0ef341fb9390cb79b2a39707c48257d
Analyze and fix the following issue in the Linux kernel code: Input: keyboard - don't override beep with a bell
Problem Details: The commit 66d2a5952eab875f1286e04f738ef029afdaf013 introduces a bug: for every beep requested, a bell is also generated. Reported-by: Paul Martin <pm@debian.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c index 5619007e7e05..f706b1dffdb3 100644 --- a/drivers/char/keyboard.c +++ b/drivers/char/keyboard.c @@ -233,7 +233,8 @@ int setkeycode(unsigned int scancode, unsigned int keycode) } /* - * Making beeps and bells. + * Making beeps and bells. Note...
9fb03e63511cc20d413c2896396ba77df3db8411
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: If no placement is supplied fallback to system
Problem Details: Do as we did before rework, if no placement is supplied at bo creation time, fallback to allocating bo from system ram. This will fix most of the creation failed issue report we got since the rework get merged. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redha...
```diff diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c index 544e18ffaf22..132130fcd991 100644 --- a/drivers/gpu/drm/radeon/radeon_object.c +++ b/drivers/gpu/drm/radeon/radeon_object.c @@ -71,6 +71,8 @@ void radeon_ttm_placement_from_domain(struct radeon_bo *rbo, u32 domain...
5012f5063f41ca01240e5983c3b2cceb9aafc7a4
Analyze and fix the following issue in the Linux kernel code: drm/ttm: Fix memory type manager debug information printing
Problem Details: System memory type doesn't have a drm_mm manager associated to it. This patch avoid trying to call drm_mm_debug on unitialized drm_mm when printing debug info on the system memory manager. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index e00ed6942067..2920f9a279e1 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -71,9 +71,10 @@ static inline int ttm_mem_type_from_flags(uint32_t flags, uint32_t *mem_type) return -EINVAL; } -static v...
eb6d2c39dbe46ea1c4f3da4eac5728c73f109ea1
Analyze and fix the following issue in the Linux kernel code: drm/ttm: Fix printk format & compute bo->mem.size at bo initialization
Problem Details: Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 826240d4d675..e00ed6942067 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -80,7 +80,7 @@ static void ttm_mem_type_manager_debug(struct ttm_bo_global *glob, printk(KERN_ERR TTM_PFX " gpu_offset: 0...
9c51ba1db37cab780f38b2210913959f22d7b830
Analyze and fix the following issue in the Linux kernel code: drm/ttm: Fix potential ttm_mem_evict_first races.
Problem Details: 1) The function was previously called with a potentially empty LRU list which would have lead to an OOPS or servere corruption. 2) In rare cases, after reservation has succeeded, another process may already have evicted it or even pinned it. We must revalidate the buffer status after releasing the lru ...
```diff diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 7927fe99d017..826240d4d675 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -685,19 +685,45 @@ static int ttm_mem_evict_first(struct ttm_bo_device *bdev, struct ttm_buffer_object *bo; int ret, put_c...
aaa207369436d04bb85382ddbb688a5b9461fd21
Analyze and fix the following issue in the Linux kernel code: drm/ttm: Delayed delete fixes.
Problem Details: 1) Remove from lru before reserving so we avoid competing with evicting processes. 2) Avoid calling kref_put() on bo::list_kref while spinlocked. 3) Additional refcounting bug-checking. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 4cd4007e68fa..7927fe99d017 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -465,6 +465,8 @@ static int ttm_bo_cleanup_refs(struct ttm_buffer_object *bo, bool remove_all) spin_unlock(&bo->lock); ...
b663752627e7c6b4bc414684d71c6adce5719fce
Analyze and fix the following issue in the Linux kernel code: drm/ttm: fix two bugs in new placement routines.
Problem Details: a) the loops were going to <= not <, leading to illegal memory access b) the busy placement checks were using the placement arrays not the busy placement ones. Acked-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 1fbb2eea5e88..4cd4007e68fa 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -849,7 +849,7 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo, int i, ret; mem->mm_node = NULL; - for (i = 0; i <= ...
b8ff7357da45e025c446fe0479612215fe56a249
Analyze and fix the following issue in the Linux kernel code: drm/ttm: fix incorrect logic in ttm_bo_io path
Problem Details: This path isn't used by radeon yet, but future drivers will want it, so fix it right. Reported-by: Luca Barbieri <luca@luca-barbieri.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c index 609a85a4d855..668dbe8b8dd3 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_vm.c +++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c @@ -320,7 +320,7 @@ ssize_t ttm_bo_io(struct ttm_bo_device *bdev, struct file *filp, return -EFAULT; driver = ...
a3f92eea04101d9a8e14d50f8048cc5b7bca07a8
Analyze and fix the following issue in the Linux kernel code: bcm63xx_enet: fix compilation failure after get_stats_count removal
Problem Details: This patch converts bcm63xx_enet to uset get_sset_count like the other drivers do. Signed-off-by: Florian Fainelli <ffainelli@freebox.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/bcm63xx_enet.c b/drivers/net/bcm63xx_enet.c index 1f6c5486d715..0bd47d32ec42 100644 --- a/drivers/net/bcm63xx_enet.c +++ b/drivers/net/bcm63xx_enet.c @@ -1245,9 +1245,15 @@ static void bcm_enet_get_drvinfo(struct net_device *netdev, drvinfo->n_stats = BCM_ENET_STATS_LEN; } -static ...
1a35ca80c1db7279c3c0655063f6d3490e399b17
Analyze and fix the following issue in the Linux kernel code: packet: dont call sleeping functions while holding rcu_read_lock()
Problem Details: commit 654d1f8a019dfa06d (packet: less dev_put() calls) introduced a problem, calling potentially sleeping functions from a rcu_read_lock() protected section. Fix this by releasing lock before the sock_wmalloc()/memcpy_fromiovec() calls. After skb allocation and copy from user space, we redo device l...
```diff diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 020562164b56..e0516a22be2e 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -415,7 +415,7 @@ static int packet_sendmsg_spkt(struct kiocb *iocb, struct socket *sock, { struct sock *sk = sock->sk; struct sockaddr_pkt *saddr...
2345baf4a8a0ac2e7e83f932048bb2d8ec1287e7
Analyze and fix the following issue in the Linux kernel code: battery: fix typo in comment
Problem Details: Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 3f4602b8f287..cada73ffdfa7 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -831,7 +831,7 @@ static void acpi_battery_notify(struct acpi_device *device, u32 event) dev_name(&device->dev), event, acpi_battery_presen...
edb949185210365f107ddc5efa60df105d25e1d7
Analyze and fix the following issue in the Linux kernel code: thermal: Fix test of unsigned in thermal_cooling_device_cur_state_store()
Problem Details: state is unsigned long so the test did not work. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c index 6f8d8f971212..800e0c56cc83 100644 --- a/drivers/thermal/thermal_sys.c +++ b/drivers/thermal/thermal_sys.c @@ -374,7 +374,7 @@ thermal_cooling_device_cur_state_store(struct device *dev, if (!sscanf(buf, "%ld\n", &state)) return...
13c41157096f05d5037a99152b4cf9d68ef00ef7
Analyze and fix the following issue in the Linux kernel code: ACPI: Remove repeated registered as cooling_device messages
Problem Details: This message shows up for each cpu. Print as debug messages. [ 12.893967] processor ACPI0007:00: registered as cooling_device0 [ 12.907838] processor ACPI0007:01: registered as cooling_device1 Signed-off-by: Mike Travis <travis@sgi.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: linux-acpi@vger.kernel....
```diff diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c index f419849a0d3f..acf2ab249842 100644 --- a/drivers/acpi/fan.c +++ b/drivers/acpi/fan.c @@ -267,7 +267,7 @@ static int acpi_fan_add(struct acpi_device *device) goto end; } - dev_info(&device->dev, "registered as cooling_device%d\n", cdev->id); + dev_...
d89a727aff649f6768f7a34ee57f031ebf8bab4c
Analyze and fix the following issue in the Linux kernel code: thinkpad-acpi: sync input device EV_SW initial state
Problem Details: Before we register the input device, sync the input layer EV_SW state through a call to input_report_switch(), to avoid issuing a gratuitous event for the initial state of these switches. This fixes some annoyances caused by the interaction with rfkill and EV_SW SW_RFKILL_ALL events. Reported-by: Kev...
```diff diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 53d6c3318069..3daf349ddc98 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -3186,6 +3186,8 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) int res, i; ...
204fc390d86f7087201ec4a146bc07483186c35b
Analyze and fix the following issue in the Linux kernel code: sh: Fix test of unsigned in se7722_irq_demux()
Problem Details: se7722_fpga_irq[] is unsigned so the test does not work. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/boards/mach-se/7722/irq.c b/arch/sh/boards/mach-se/7722/irq.c index 4eb31acfafef..b221b6842b0d 100644 --- a/arch/sh/boards/mach-se/7722/irq.c +++ b/arch/sh/boards/mach-se/7722/irq.c @@ -57,15 +57,16 @@ static void se7722_irq_demux(unsigned int irq, struct irq_desc *desc) */ void __init i...
d0608b54740c82b08056b7611e38a3fd73be3564
Analyze and fix the following issue in the Linux kernel code: parisc: Fixup last users of irq_chip->typename
Problem Details: The typename member of struct irq_chip was kept for migration purposes and is obsolete since more than 2 years. Fix up the leftovers. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
```diff diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c index f47465e8d040..efbcee5d2220 100644 --- a/arch/parisc/kernel/irq.c +++ b/arch/parisc/kernel/irq.c @@ -145,7 +145,7 @@ static int cpu_set_affinity_irq(unsigned int irq, const struct cpumask *dest) #endif static struct irq_chip cpu_interrupt...
217bfb5190813d97e6003f7692f8014655ffc02a
Analyze and fix the following issue in the Linux kernel code: parisc: convert /proc/pdc/{lcd,led} to seq_file
Problem Details: Convert code away from ->read_proc/->write_proc interfaces. Switch to proc_create()/proc_create_data() which make addition of proc entries reliable wrt NULL ->proc_fops, NULL ->data and so on. Problem with ->read_proc et al is described here commit 786d7e1612f0b0adb6046f19b906609e4fe8b1ba "Fix rmmod/r...
```diff diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c index 79caf1ca4a29..188bc8496a26 100644 --- a/drivers/parisc/led.c +++ b/drivers/parisc/led.c @@ -38,6 +38,7 @@ #include <linux/kernel_stat.h> #include <linux/reboot.h> #include <linux/proc_fs.h> +#include <linux/seq_file.h> #include <linux/ctype.h> ...
05920797ca4c55b3c0629bc0eeb6fe634c196952
Analyze and fix the following issue in the Linux kernel code: parisc: Convert BUG() to use unreachable()
Problem Details: Use the new unreachable() macro instead of for(;;); Signed-off-by: David Daney <ddaney@caviumnetworks.com> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
```diff diff --git a/arch/parisc/include/asm/bug.h b/arch/parisc/include/asm/bug.h index 8cfc553fc837..75e46c557a16 100644 --- a/arch/parisc/include/asm/bug.h +++ b/arch/parisc/include/asm/bug.h @@ -32,14 +32,14 @@ "\t.popsection" \ : : "i" (__FILE__), "i" (__LINE__), \ "i" (0), "i" (sizeo...
2e16cfca6e17ae37ae21feca080a6f2eca9087dc
Analyze and fix the following issue in the Linux kernel code: jffs2: Fix long-standing bug with symlink garbage collection.
Problem Details: Ever since jffs2_garbage_collect_metadata() was first half-written in February 2001, it's been broken on architectures where 'char' is signed. When garbage collecting a symlink with target length above 127, the payload length would end up negative, causing interesting and bad things to happen. Cc: sta...
```diff diff --git a/fs/jffs2/gc.c b/fs/jffs2/gc.c index 090c556ffed2..3b6f2fa12cff 100644 --- a/fs/jffs2/gc.c +++ b/fs/jffs2/gc.c @@ -700,7 +700,8 @@ static int jffs2_garbage_collect_metadata(struct jffs2_sb_info *c, struct jffs2_ struct jffs2_raw_inode ri; struct jffs2_node_frag *last_frag; union jffs2_device_n...
0a032a4df6dc4a82bcd1c401e57ee71825d30c14
Analyze and fix the following issue in the Linux kernel code: mtd: OneNAND: Fix test of unsigned in onenand_otp_walk()
Problem Details: mtd->writesize and len are unsigned so the test does not work. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
```diff diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index 3330ea06917c..f63b1db3ffb3 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c @@ -3165,10 +3165,10 @@ static int onenand_otp_walk(struct mtd_info *mtd, loff_t from, size_t len, /*...
8cef4e160d74920ad1725f58c89fd75ec4c4ac38
Analyze and fix the following issue in the Linux kernel code: Btrfs: Avoid superfluous tree-log writeout
Problem Details: We allow two log transactions at a time, but use same flag to mark dirty tree-log btree blocks. So we may flush dirty blocks belonging to newer log transaction when committing a log transaction. This patch fixes the issue by using two flags to mark dirty tree-log btree blocks. Signed-off-by: Yan Zheng...
```diff diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 02b6afbd7450..101940fab9b3 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -980,12 +980,12 @@ int btrfs_free_log_root_tree(struct btrfs_trans_handle *trans, while (1) { ret = find_first_extent_bit(&log_root_tree->dirty_log_pages, - ...
83955556669f69fccfd332b52e9b1796d60c77bd
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (13626): gspca - many subdrivers: Fix some warnings.
Problem Details: - gl860.c:332:15: warning: cast to restricted __le16 - gl860.c:333:15: warning: cast to restricted __le16 - gl860-mi1320.c:348:5: warning: symbol 'mi1320_camera_settings' was not declared. Should it be static? - gl860-mi2020.c:772:5: warning: symbol 'mi2020_camera_settings' was not declared. Should it ...
```diff diff --git a/drivers/media/video/gspca/gl860/gl860-mi1320.c b/drivers/media/video/gspca/gl860/gl860-mi1320.c index 1355e526ee84..c276a7debdec 100644 --- a/drivers/media/video/gspca/gl860/gl860-mi1320.c +++ b/drivers/media/video/gspca/gl860/gl860-mi1320.c @@ -345,7 +345,7 @@ static int mi1320_configure_alt(struc...
865fbf20bed00d456556ecd4b4c9dadc45cba759
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (13614): dib0090: Fix compilation when module is not selected
Problem Details: Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/frontends/dib0090.h b/drivers/media/dvb/frontends/dib0090.h index 83cc8ae9ba3e..24ab5bf69d50 100644 --- a/drivers/media/dvb/frontends/dib0090.h +++ b/drivers/media/dvb/frontends/dib0090.h @@ -100,11 +100,6 @@ static inline int dib0090_set_tune_state(struct dvb_frontend *fe, enum f...
4b8303747474033d6d73828607eafab77c620d96
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (13608): radio-sf16fmi: fix mute, add SF16-FMP to texts
Problem Details: Fix completely broken mute handling radio-sf16fmi. The sound was muted immediately after tuning in KRadio. Also fix typos and add SF16-FMP to the texts. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Acked-by: Petr Vandrovec <petr@vandrovec.name> Signed-off-by: Douglas Schilling Landgraf <dou...
```diff diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig index 4c2b8a246772..0fe93f2b48bd 100644 --- a/drivers/media/radio/Kconfig +++ b/drivers/media/radio/Kconfig @@ -215,7 +215,7 @@ config RADIO_MIROPCM20 module will be called radio-miropcm20. config RADIO_SF16FMI - tristate "SF16FMI Rad...
0a25f3b292c5c70de80d2b1f1cf3f5b9aae91b86
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (13602): bttv: fix MODULE_PARM_DESC for i2c_debug and i2c_hw
Problem Details: Currently, i2c_debug shows up w/o a desc in modinfo, and i2c_hw shows up with i2c_debug's desc. Fix that. [dougsland@redhat.com: fixed checkpatch.pl warning (space between MODULE_PARM_DESC arguments)] Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@r...
```diff diff --git a/drivers/media/video/bt8xx/bttv-i2c.c b/drivers/media/video/bt8xx/bttv-i2c.c index a9d9ee73b25a..63aa31a041e8 100644 --- a/drivers/media/video/bt8xx/bttv-i2c.c +++ b/drivers/media/video/bt8xx/bttv-i2c.c @@ -40,7 +40,7 @@ static int i2c_debug; static int i2c_hw; static int i2c_scan; module_param(i...
4315c414474cf43994f0c562ce8faea3628f550b
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (13593): PWC: parameter trace is only available in debug
Problem Details: This patch fixes a small issue where modinfo says the parameter "trace" is always available, while it only works if CONFIG_USB_PWC_DEBUG is enabled. Signed-off-by: Andrea Odetti <mariofutire@googlemail.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho ...
```diff diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c index d0e2b57f1747..aea7e224cef6 100644 --- a/drivers/media/video/pwc/pwc-if.c +++ b/drivers/media/video/pwc/pwc-if.c @@ -1947,7 +1947,9 @@ MODULE_PARM_DESC(size, "Initial image size. One of sqcif, qsif, qcif, sif, cif, MODULE_PAR...
38ffcd10d6831efd15ec5a223b1050eac12d4c28
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (13581): DiBUSB: fix I2c access when there is a read-access w/o write sequence
Problem Details: This patch fixes the behaviour of the dibusb-i2c-access which was previously changed to avoid accidental EEprom writes: Now it allow i2c-reads without prepended i2c-writes, but it is still not doing anything in case the EEprom is addressed. Thanks to Mario Bachmann for testing. Tested-by: Mario Bach...
```diff diff --git a/drivers/media/dvb/dvb-usb/dibusb-common.c b/drivers/media/dvb/dvb-usb/dibusb-common.c index b395e852e47f..9143b5631e88 100644 --- a/drivers/media/dvb/dvb-usb/dibusb-common.c +++ b/drivers/media/dvb/dvb-usb/dibusb-common.c @@ -142,8 +142,13 @@ static int dibusb_i2c_xfer(struct i2c_adapter *adap,stru...
d995a18733a683c1c086a4d48315976f8c25d89b
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (13591): add support for IR on FlyDVB Trio (saa7134)
Problem Details: saa7134: Add support for IR reciever on card LifeView FlyDVB Trio -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html [mchehab@redhat.com: CodingStyle fixes a...
```diff diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c index 64360d26b32d..2856e780772e 100644 --- a/drivers/media/video/ir-kbd-i2c.c +++ b/drivers/media/video/ir-kbd-i2c.c @@ -353,6 +353,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) ir_type ...
20232c4791507189d4e9499f81632a1ce434f2a4
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (13582): DiB0700: remove USB IDs of PCTV 74e from the driver
Problem Details: The PCTV 74e is not a design based on the dib0700-USB-device controller thus we should not have its USB IDs inside. This reverts partly: Add support for PCTV 74e (Pinnacle) + fix USB vendor IDs Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@...
```diff diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c index ad80b939a40f..923fa157aa51 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_devices.c +++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c @@ -1937,10 +1937,8 @@ struct usb_device_id dib0700_usb_id_table[] = ...
e414753c8ce5fb0bd81155406efaefe57f374571
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (13580): Add support for PCTV 74e (Pinnacle) + fix USB vendor IDs
Problem Details: This patch adds support for PCTV 74e (Pinnacle) and it fixes the USB vendor IDs for PCTV (f.k.a Pinnacle). For convenience all new PCTV USB product IDs are also existing with Pinnacle's USB vendor ID. Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mc...
```diff diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c index 684146f98eb7..ad80b939a40f 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_devices.c +++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c @@ -1929,14 +1929,18 @@ struct usb_device_id dib0700_usb_id_table[] =...
81afda5182667dcc89374cb5bb94fd6db01c9263
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (13578): [PATCH] fix genpix driver (no 8psk lock).
Problem Details: Genpix is demodulating DVB-S-like signal with 8PSK modulation used) - this non-standard behaviour was broken by rejecting 8PSK in a standard DVB-S tune request. This problem is fixed by simply reverting back to the drivers original behavior with this patch. Signed-off-by: Patrick Boettcher <pboettcher...
```diff diff --git a/drivers/media/dvb/dvb-usb/gp8psk-fe.c b/drivers/media/dvb/dvb-usb/gp8psk-fe.c index 20eadf9318e0..7a7f1b2b681c 100644 --- a/drivers/media/dvb/dvb-usb/gp8psk-fe.c +++ b/drivers/media/dvb/dvb-usb/gp8psk-fe.c @@ -146,8 +146,8 @@ static int gp8psk_fe_set_frontend(struct dvb_frontend* fe, switch (c-...
0e2f0d348a65b48a8af52d7fd64d77b5759413fa
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (13577): [PATCH] dvb-usb-friio: accept center-shifted frequency
Problem Details: This patch adds a fix to accept frequency with its center shifted. The driver used to accept center frequencies of the normal UHF band channels, but in ISDB-T, center frequency is shifted with 1/7MHz. It was shifted internally in the driver, but this patch enables to accept both types of frequency. S...
```diff diff --git a/drivers/media/dvb/dvb-usb/friio-fe.c b/drivers/media/dvb/dvb-usb/friio-fe.c index 9cbbe42ca44b..ebb7b9fd115b 100644 --- a/drivers/media/dvb/dvb-usb/friio-fe.c +++ b/drivers/media/dvb/dvb-usb/friio-fe.c @@ -134,11 +134,13 @@ static int jdvbt90502_pll_set_freq(struct jdvbt90502_state *state, u32 freq...
05395a3d86a928d374c970a0b35a6a711072f86c
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (13576): ir-common: fix an oops caused by the usage of an initialized drvdata
Problem Details: As reported by Sander Eikelenboom <linux@eikelemboon.it>: > Tried to update my v4l-dvb modules today, but got a bug with my pinnacle > card, seems to be related to the recent changes in the ir code. > > Dec 5 23:30:25 security kernel: [ 5.735698] BUG: unable to handle kernel NULL pointer dereferen...
```diff diff --git a/drivers/media/common/ir-keytable.c b/drivers/media/common/ir-keytable.c index 26ce5bc2fdd5..ceef0e82fb4b 100644 --- a/drivers/media/common/ir-keytable.c +++ b/drivers/media/common/ir-keytable.c @@ -419,6 +419,9 @@ void ir_input_free(struct input_dev *dev) { struct ir_scancode_table *rc_tab = inp...
327ae59757f2e56fd3fc2b11acbd0a7c4070f4e8
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (13557): v4l: Remove unneeded video_device::minor usage in drivers
Problem Details: The video_device::minor field is used where it shouldn't, either to - test for error conditions that can't happen anymore with the current v4l-dvb core, - store the value in a driver private field that isn't used anymore, - check the video device type where video_device::vfl_type should be used, o...
```diff diff --git a/drivers/media/common/saa7146_fops.c b/drivers/media/common/saa7146_fops.c index 3c11cff00475..7364b9642d00 100644 --- a/drivers/media/common/saa7146_fops.c +++ b/drivers/media/common/saa7146_fops.c @@ -1,7 +1,5 @@ #include <media/saa7146_vv.h> -#define BOARD_CAN_DO_VBI(dev) (dev->revision != 0...
50462eb065e12f45851a9959a90d46b758944552
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (13555): v4l: Use video_device_node_name() instead of the minor number
Problem Details: Instead of using the minor number in kernel log messages, use the device node name as returned by the video_device_node_name() function. This makes debug, informational and error messages easier to understand for end users. [mchehab.redhat.com: removed tm6000 changes as tm6000 is not ready yet for sub...
```diff diff --git a/drivers/media/common/saa7146_fops.c b/drivers/media/common/saa7146_fops.c index 2d9fc2435f2b..3c11cff00475 100644 --- a/drivers/media/common/saa7146_fops.c +++ b/drivers/media/common/saa7146_fops.c @@ -194,7 +194,6 @@ void saa7146_buffer_timeout(unsigned long data) static int fops_open(struct fi...
f0813b4c9f7ffbeaddcba1c08a1812f7ff30e1b7
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (13553): v4l: Use the video_is_registered function in device drivers
Problem Details: Fix all device drivers to use the video_is_registered function instead of checking video_device::minor. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index d57618319896..a2336915ca70 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c @@ -4208,21 +4208,21 @@ static struct video_device *vdev_init(struct bttv *btv, stat...
d951d4cc84e8b5ddb8e0ab81cf6a72cc73fdd668
Analyze and fix the following issue in the Linux kernel code: asus-laptop: change light sens default values.
Problem Details: The light sensor disable brightness key and /sys/class/backlight/ control. There was a lot of report from users who didn't understand why they couldn't change their brightness, including: https://bugs.launchpad.net/bugs/222171 https://bugzilla.novell.com/show_bug.cgi?id=514747 http://bugzilla.kernel.o...
```diff diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c index 3348cc6731d9..61a1c7503658 100644 --- a/drivers/platform/x86/asus-laptop.c +++ b/drivers/platform/x86/asus-laptop.c @@ -1290,8 +1290,8 @@ static int asus_hotk_add(struct acpi_device *device) hotk->ledd_status = 0xFFF; ...
380454126f1357db9270f9d1ca05dfe1a6e4ad47
Analyze and fix the following issue in the Linux kernel code: NFSv4: Fix a regression in the NFSv4 state manager
Problem Details: Commit 5601a00d671fe89f9b087513244abcd08ad67e7d (nfs: run state manager in privileged mode) introduces a regression in the NFSv4 code when compiled with CONFIG_NFS_V4_1. The calls to nfs4_end_drain_session() from the main loop in nfs4_state_manager() Oops due to the lack of an NFSv4.1 session when runn...
```diff diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 18e8b26878c5..6d263ed79e92 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -176,6 +176,7 @@ int nfs41_init_clientid(struct nfs_client *clp, struct rpc_cred *cred) { int status; + nfs4_begin_drain_session(clp); status = nfs4_proc_excha...
d4085a3ffee8828f7f1bae7fa3cf5e58f59ba627
Analyze and fix the following issue in the Linux kernel code: ACPICA: Predefined name repair: automatically remove null package elements
Problem Details: This change will automatically remove embedded and trailing NULL package elements from returned package objects that are defined to containe a variable number of sub-packages. The driver is then presented with a package with no null elements to deal with. ACPICA BZ 819. http://www.acpica.org/bugzilla/...
```diff diff --git a/drivers/acpi/acpica/acnamesp.h b/drivers/acpi/acpica/acnamesp.h index 14cef45bd6c4..61edb156e8d0 100644 --- a/drivers/acpi/acpica/acnamesp.h +++ b/drivers/acpi/acpica/acnamesp.h @@ -296,6 +296,11 @@ acpi_ns_complex_repairs(struct acpi_predefined_data *data, acpi_status validate_status, unio...
3a58176e4fa47d8232e04131b023f3f2ecd7084b
Analyze and fix the following issue in the Linux kernel code: ACPICA: Remove messages if predefined repair(s) are successful
Problem Details: Repair mechanism was considered too wordy. Now, messages are only unconditionally emitted if the return object cannot be repaired. Existing messages for successful repairs were converted to ACPI_DEBUG_PRINT messages for now. ACPICA BZ 827. http://www.acpica.org/bugzilla/show_bug.cgi?id=827 Signed-off...
```diff diff --git a/drivers/acpi/acpica/nspredef.c b/drivers/acpi/acpica/nspredef.c index c6297f57fea8..e352467413f5 100644 --- a/drivers/acpi/acpica/nspredef.c +++ b/drivers/acpi/acpica/nspredef.c @@ -462,11 +462,11 @@ acpi_ns_check_package(struct acpi_predefined_data *data, if (count < expected_count) { goto ...
d97659112044c0c77b93c6199eee7ee884eb3cca
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix mutex errors when running _REG methods
Problem Details: Fixes a problem where mutex errors can occur when running a _REG method that is in the same scope as a method-defined operation region or an operation region under a module-level IF block. This is rare, so the problem has not been seen before. ACPICA BZ 826. http://www.acpica.org/bugzilla/show_bug.cgi...
```diff diff --git a/drivers/acpi/acpica/dswload.c b/drivers/acpi/acpica/dswload.c index 9cc2289f872e..b40513dd6a6a 100644 --- a/drivers/acpi/acpica/dswload.c +++ b/drivers/acpi/acpica/dswload.c @@ -1052,9 +1052,22 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state) } /* - * If we are e...
f24b664dc44a4ab4df61db2258cea298eeb43a8e
Analyze and fix the following issue in the Linux kernel code: ACPICA: Update internal namespace node/handle interfaces
Problem Details: This change deletes the unnecessary acpi_ns_convert_entry_to_handle interface and renames the acpi_ns_map_handle_to_node interface to acpi_ns_validate_handle. ACPICA BZ 798. http://www.acpica.org/bugzilla/show_bug.cgi?id=798 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <...
```diff diff --git a/drivers/acpi/acpica/acnamesp.h b/drivers/acpi/acpica/acnamesp.h index ab83919dda61..14cef45bd6c4 100644 --- a/drivers/acpi/acpica/acnamesp.h +++ b/drivers/acpi/acpica/acnamesp.h @@ -354,9 +354,7 @@ acpi_ns_externalize_name(u32 internal_name_length, const char *internal_name, u32 * convert...
34c39c755347c1ca3d06284bad2273c6a9c3108a
Analyze and fix the following issue in the Linux kernel code: ACPICA: Add repair for bad _FDE/_GTM buffers
Problem Details: The expected return value for both names is a Buffer of 5 DWORDS. This repair fixes two possible problems (both seen in the field): A package of integers is returned, or a buffer of BYTEs is returned. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Sign...
```diff diff --git a/drivers/acpi/acpica/nspredef.c b/drivers/acpi/acpica/nspredef.c index b05f42903c86..1782c3d85ba2 100644 --- a/drivers/acpi/acpica/nspredef.c +++ b/drivers/acpi/acpica/nspredef.c @@ -222,23 +222,21 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node, status = acpi_ns_check_object_ty...
ebdca3edd5ac61e37f2f5e7c11006c1a68d3cc7e
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix two additional Scope override error messages
Problem Details: These messages were using the internal path for the message instead of using the node name. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/acpica/dswload.c b/drivers/acpi/acpica/dswload.c index 1bab934e99f8..9cc2289f872e 100644 --- a/drivers/acpi/acpica/dswload.c +++ b/drivers/acpi/acpica/dswload.c @@ -700,15 +700,16 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state, case ACPI_TYPE_BUFFER: /* - * Th...
f2cb12510836da63cf459dca452fc0770da155f1
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix two Scope type error messages
Problem Details: Both messages incorrectly used the internal Path string instead of the node name. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/acpica/dswload.c b/drivers/acpi/acpica/dswload.c index 10fc78517843..1bab934e99f8 100644 --- a/drivers/acpi/acpica/dswload.c +++ b/drivers/acpi/acpica/dswload.c @@ -212,18 +212,19 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state, case ACPI_TYPE_BUFFER: /* - * T...
583061c59ffea1ea14f6dca735ab0f99238a7a92
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix possible memory leak for module-level code execution
Problem Details: An object can be leaked for each block of executed module-level code if the interpreter slack mode is enabled. The change deletes any implicitly returned object in this case. Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len....
```diff diff --git a/drivers/acpi/acpica/nseval.c b/drivers/acpi/acpica/nseval.c index f771e978c403..65e0d1a260ea 100644 --- a/drivers/acpi/acpica/nseval.c +++ b/drivers/acpi/acpica/nseval.c @@ -415,6 +415,12 @@ acpi_ns_exec_module_code(union acpi_operand_object *method_obj, ACPI_DEBUG_PRINT((ACPI_DB_INIT, "Executed ...
656cb79322319a7bbafec7912d262142e9a38bc0
Analyze and fix the following issue in the Linux kernel code: drm/i915: In the debugfs interface, unmap our address instead of the page's.
Problem Details: Fixes a BUG_ON in kmap_atomic for the following atomic mapping with USER0 type. Signed-off-by: Eric Anholt <eric@anholt.net>
```diff diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 18476bf0b580..463e8d0155c2 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -272,7 +272,7 @@ static void i915_dump_pages(struct seq_file *m, struct page **pages, int page_co ...
72211dbe727f7c1451aa5adfcbd1197b090eb276
Analyze and fix the following issue in the Linux kernel code: NFSv4: Release the sequence id before restarting a CLOSE rpc call
Problem Details: If the CLOSE or OPEN_DOWNGRADE call triggers a state recovery, and has to be resent, then we must release the seqid. Otherwise the open recovery will wait for the close to finish, which causes a deadlock. This is mainly a NFSv4.1 problem, although it can theoretically happen with NFSv4.0 too, in a OPE...
```diff diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h index e8791d5a2f7a..865265bdca03 100644 --- a/fs/nfs/nfs4_fs.h +++ b/fs/nfs/nfs4_fs.h @@ -286,6 +286,7 @@ extern struct nfs_seqid *nfs_alloc_seqid(struct nfs_seqid_counter *counter); extern int nfs_wait_on_sequence(struct nfs_seqid *seqid, struct rpc_task *task)...
f2511774863487e61b56a97da07ebf8dd61d7836
Analyze and fix the following issue in the Linux kernel code: PM: Add initcall_debug style timing for suspend/resume
Problem Details: In order to diagnose overall suspend/resume times, we need basic instrumentation to break down the total time into per device timing, similar to initcall_debug. This patch adds the basic timing instrumentation, needed for a scritps/bootgraph.pl equivalent or humans. The bootgraph.pl program is still a...
```diff diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 8aa2443182d5..30f0ceebd36c 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -25,6 +25,7 @@ #include <linux/resume-trace.h> #include <linux/rwsem.h> #include <linux/interrupt.h> +#include <linux/sched.h> #incl...
1d531c14d2ed4b24472a4d773f00ed6d1cd34ee7
Analyze and fix the following issue in the Linux kernel code: PM: allow for usage_count > 0 in pm_runtime_get()
Problem Details: This patch (as1308c) fixes __pm_runtime_get(). Currently the routine will resume a device if the prior usage count was 0. But this isn't right; thanks to pm_runtime_get_noresume() the usage count can be positive even while the device is suspended. Signed-off-by: Alan Stern <stern@rowland.harvard.edu...
```diff diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c index 5a01ecef4af3..40d7720a4b21 100644 --- a/drivers/base/power/runtime.c +++ b/drivers/base/power/runtime.c @@ -701,15 +701,15 @@ EXPORT_SYMBOL_GPL(pm_request_resume); * @dev: Device to handle. * @sync: If set and the device is suspe...
23637568ad0c9b5ab0ad27d2f2f26d1e9282c527
Analyze and fix the following issue in the Linux kernel code: x86: Fix kprobes build with non-gawk awk
Problem Details: The instruction attribute table generator fails when run by mawk or original-awk: $ mawk -f arch/x86/tools/gen-insn-attr-x86.awk \ arch/x86/lib/x86-opcode-map.txt > /dev/null Semantic error at 240: Second IMM error $ echo $? 1 Line 240 contains "c8: ENTER Iw,Ib", which indicates that this instru...
```diff diff --git a/arch/x86/tools/gen-insn-attr-x86.awk b/arch/x86/tools/gen-insn-attr-x86.awk index e34e92a28eb6..7a6850683c34 100644 --- a/arch/x86/tools/gen-insn-attr-x86.awk +++ b/arch/x86/tools/gen-insn-attr-x86.awk @@ -226,12 +226,12 @@ function add_flags(old,new) { } # convert operands to flags. -function ...
7ef17aafc98406d01ebbf7fe98ef1332b70d20bb
Analyze and fix the following issue in the Linux kernel code: perf probe: Fix to show which probe point is not found
Problem Details: Fix perf probe to show which probe point is not found. With out this patch, it shows just "No probe point found." This doesn't help users if they specify several probes. e.g. # perf probe -f --add schedule --add test Fatal: No probe point found. This patch makes error message more helpful as below...
```diff diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index 6b0e4cf322d8..520b064b46d8 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c @@ -265,8 +265,11 @@ int cmd_probe(int argc, const char **argv, const char *prefix __used) ret = find_probepoint(fd, pp); if (ret >...
3e3405906dab00afecd5a16871850a088eba4626
Analyze and fix the following issue in the Linux kernel code: perf probe: Fix --del to update current event list
Problem Details: Fix --del option to update current existing event list after perf probe deleted an event. Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Jim Keniston <jkenisto@us.ib...
```diff diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index 1eacee6eca4b..eab25d638f21 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c @@ -540,10 +540,12 @@ static void del_trace_kprobe_event(int fd, const char *group, const char *event, struct strlist...
f6bbff77252cf12c82d480eaf6d9189129d1040a
Analyze and fix the following issue in the Linux kernel code: perf probe: Fix --del to show info instead of warning
Problem Details: Fix --del option to show info message instead of warning if failing to find specified event. Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Jim Keniston <jkenisto@us...
```diff diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index 1653a62a478e..1eacee6eca4b 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c @@ -544,7 +544,7 @@ static void del_trace_kprobe_event(int fd, const char *group, if (e_snprintf(buf, 128, "%s:%s", group, ...
411edfe5c1ef02a62ec3be56d3e234dbed71ba20
Analyze and fix the following issue in the Linux kernel code: perf probe: Show need-dwarf message only if it is really needed
Problem Details: Show need-dwarf message only if the probe is really requires debuginfo analysis. This also use pr_debug for debugging message instead of pr_warning. Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Steven Ros...
```diff diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index 919037bc9808..438a7bb101d3 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c @@ -261,15 +261,19 @@ int cmd_probe(int argc, const char **argv, const char *prefix __used) lseek(fd, SEEK_SET, 0); ret = find_pr...
7e990a51264cb0c1400155ba72d56f5158ccf919
Analyze and fix the following issue in the Linux kernel code: perf probe: Check the result of e_snprintf()
Problem Details: Fix show_perf_probe_event() to check the result of e_snprintf(). Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Jim Keniston <jkenisto@us.ibm.com> Cc: Ananth N Mavin...
```diff diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index add379c55c36..1653a62a478e 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c @@ -385,10 +385,12 @@ static void clear_probe_point(struct probe_point *pp) static void show_perf_probe_event(const char *gr...
f13c12c634e124d5d31f912b969d542a016d6105
Analyze and fix the following issue in the Linux kernel code: perf_events: Fix perf_event_attr layout
Problem Details: The miss-alignment of bp_addr created a 32bit hole, causing different structure packings on 32 and 64 bit machines. Fix that by moving __reserve_2 into that hole. Further, remove the useless struct and redundant __bp_reserve muck. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Frederic W...
```diff diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 64a53f74c9a9..5fcbf7d2712a 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -211,17 +211,11 @@ struct perf_event_attr { __u32 wakeup_watermark; /* bytes before wakeup */ }; - struct { /* Hardware brea...
eb4c86c6a5adec423c9e615d4937fdddd06a16c5
Analyze and fix the following issue in the Linux kernel code: nfsd: introduce export flag for v4 pseudoroot
Problem Details: NFSv4 differs from v2 and v3 in that it presents a single unified filesystem tree, whereas v2 and v3 exported multiple filesystem (whose roots could be found using a separate mount protocol). Our original NFSv4 server implementation asked the administrator to designate a single filesystem as the NFSv4...
```diff diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index cb3dae2fcd86..c64d55f319bd 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c @@ -1425,6 +1425,7 @@ static struct flags { { NFSEXP_CROSSMOUNT, {"crossmnt", ""}}, { NFSEXP_NOSUBTREECHECK, {"no_subtree_check", ""}}, { NFSEXP_NOAUTHNLM, {"insecure_lock...
68bf05efb7facbcf4a7b8d6b48a0800a90895511
Analyze and fix the following issue in the Linux kernel code: nfs41: fix session fore channel negotiation
Problem Details: If the rsize or wsize is not set on the mount command, negotiate the highest supported rsize and wsize in session creation. Fixes a bug where the client negotiated nfs41_maxwrite_overhead as ca_maxrequestsize and nfs41_maxread_overhead as ca_maxresponsesize resulting in NFS4ERR_REQ_TOO_BIG errors on w...
```diff diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index bd4555fbdf25..019a009e73a0 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -4935,14 +4935,22 @@ int nfs4_init_session(struct nfs_server *server) { struct nfs_client *clp = server->nfs_client; struct nfs4_session *session; + unsigned int rsi...
8bea8672edfca7ec5f661cafb218f1205863b343
Analyze and fix the following issue in the Linux kernel code: mfd: compile fix for twl4030 renaming
Problem Details: Caused by commit 0b83ddebc6e884dc0221358cf68c461520fbdd8e ("MFD: twl4030: add twl4030_codec MFD as a new child to the core") interacting with commit b07682b6056eb6701f8cb86aa5800e6f2ea7919b ("mfd: Rename twl4030* driver files to enable re-use"). This file seems to have been missed in the renaming. Si...
```diff diff --git a/drivers/mfd/twl4030-codec.c b/drivers/mfd/twl4030-codec.c index 77b914907d7c..700b149c1b91 100644 --- a/drivers/mfd/twl4030-codec.c +++ b/drivers/mfd/twl4030-codec.c @@ -26,7 +26,7 @@ #include <linux/kernel.h> #include <linux/fs.h> #include <linux/platform_device.h> -#include <linux/i2c/twl4030....
909275bc1b42b4f4505ccbe193b111e9d1c5816f
Analyze and fix the following issue in the Linux kernel code: Input: altera_ps2 - fix test of unsigned in altera_ps2_probe()
Problem Details: ps2if->irq is unsigned so the test does not work. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/serio/altera_ps2.c b/drivers/input/serio/altera_ps2.c index 457da76d4c83..320b7ca48bf8 100644 --- a/drivers/input/serio/altera_ps2.c +++ b/drivers/input/serio/altera_ps2.c @@ -83,7 +83,7 @@ static int __devinit altera_ps2_probe(struct platform_device *pdev) { struct ps2if *ps2if; ...
60214f058f44cfaa38db2abf0b42d4436c31aa58
Analyze and fix the following issue in the Linux kernel code: Input: ep93xx_keypad - update driver to new core support
Problem Details: This driver was merged before the ep93xx core support was added for the keypad clock and acquiring/releasing the necessary gpio's. Now that the proper support is in the ep93xx core this driver needs to be updated to work correctly. Summary of changes: 1) Remove some unused members from the platform ...
```diff diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx_keypad.h b/arch/arm/mach-ep93xx/include/mach/ep93xx_keypad.h index 83f31cd0a274..62d17421e48c 100644 --- a/arch/arm/mach-ep93xx/include/mach/ep93xx_keypad.h +++ b/arch/arm/mach-ep93xx/include/mach/ep93xx_keypad.h @@ -5,9 +5,6 @@ #ifndef __ASM_ARCH_EP93XX_KE...
4b5d95b3809bcd77599122494aa3f575cd6ab1b9
Analyze and fix the following issue in the Linux kernel code: lis3: fix show rate for 8 bits chips
Problem Details: Originally the driver was only targeted to 12bits sensors. When support for 8bits sensors was added, some slight difference in the registers were overlooked. This should fix it, both for initialization, and for displaying the rate. Reported-by: Kalhan Trisal <kalhan.trisal@intel.com> Reported-by: Ch...
```diff diff --git a/drivers/hwmon/lis3lv02d.c b/drivers/hwmon/lis3lv02d.c index 1c8f10817e69..b12ee359d90e 100644 --- a/drivers/hwmon/lis3lv02d.c +++ b/drivers/hwmon/lis3lv02d.c @@ -127,12 +127,14 @@ void lis3lv02d_poweron(struct lis3lv02d *lis3) /* * Common configuration - * BDU: LSB and MSB values are not up...
66c8569bf990064b3f11e0f211a81a46e0b627ff
Analyze and fix the following issue in the Linux kernel code: lis3lv02d: correct memory leak in module unload
Problem Details: polled input device itself was not free'd. Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> Tested-by: Éric Piel <eric.piel@tremplin-utc.net> Acked-by: Éric Piel <eric.piel@tremplin-utc.net> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Lin...
```diff diff --git a/drivers/hwmon/lis3lv02d.c b/drivers/hwmon/lis3lv02d.c index 7f43a3b62a24..dbd0b055d4b9 100644 --- a/drivers/hwmon/lis3lv02d.c +++ b/drivers/hwmon/lis3lv02d.c @@ -333,6 +333,7 @@ void lis3lv02d_joystick_disable(void) if (lis3_dev.irq) misc_deregister(&lis3lv02d_misc_device); input_unregister_...
41e9a062361de204d3710038925ae7f356ebb40d
Analyze and fix the following issue in the Linux kernel code: hwmon: w83627ehf updates
Problem Details: Add control of fan minimum turn-on output levels, decoupling it from the fan turn-off output level. Add control of rate of change of fan output level. These in turn allow lower turn-off rotor speed and smoother transitions for better thermal and acoustic control authority. Add support for constant f...
```diff diff --git a/Documentation/hwmon/w83627ehf b/Documentation/hwmon/w83627ehf index 02b74899edaf..b7e42ec4b26b 100644 --- a/Documentation/hwmon/w83627ehf +++ b/Documentation/hwmon/w83627ehf @@ -81,8 +81,14 @@ pwm[1-4] - this file stores PWM duty cycle or DC value (fan speed) in range: 0 (stop) to 255 (full) ...
ddcaccbc17d7d15d0f050519cfeb0e45acbd9b15
Analyze and fix the following issue in the Linux kernel code: crc32: minor optimizations and cleanup
Problem Details: Move common crc body to new function crc32_body() cleaup and micro optimize crc32_body for speed and less size. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus ...
```diff diff --git a/lib/crc32.c b/lib/crc32.c index 49d1c9e3ce38..02e3b31b3a79 100644 --- a/lib/crc32.c +++ b/lib/crc32.c @@ -42,6 +42,48 @@ MODULE_AUTHOR("Matt Domsch <Matt_Domsch@dell.com>"); MODULE_DESCRIPTION("Ethernet CRC32 calculations"); MODULE_LICENSE("GPL"); +#if CRC_LE_BITS == 8 || CRC_BE_BITS == 8 + +st...
eb962d5bb7da4f25e20e5d448ee3aac394144ff6
Analyze and fix the following issue in the Linux kernel code: mmc: Blackfin SD Host Controller Driver
Problem Details: Add SD host driver for Blackfin BF54x and BF51x. [akpm@linux-foundation.org: fix layout, c99 warning] Signed-off-by: Cliff Cai <cliffcai.sh@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew M...
```diff diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 84ec1fa46a41..9d405b181781 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -365,3 +365,22 @@ config MMC_VIA_SDMMC If you have a controller with this interface, say Y or M here. If unsure, say N. + +config SD...
c0521baf0d369074daf3623b5a112a0212012846
Analyze and fix the following issue in the Linux kernel code: mxcmmc: fix error path in mxcmci_probe
Problem Details: After a failing allocation of mmc or a failed ioremap in mxcmci_probe host was used uninitialized. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Cc: Pierre Ossman <pierre@ossman.eu> Cc: Martin Fuzzey <mfuzzey@gmail.com> Cc: Pierre Ossm...
```diff diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c index 88671529c45d..60a2b69e54f5 100644 --- a/drivers/mmc/host/mxcmmc.c +++ b/drivers/mmc/host/mxcmmc.c @@ -679,17 +679,17 @@ static int mxcmci_probe(struct platform_device *pdev) { struct mmc_host *mmc; struct mxcmci_host *host = NULL; - s...
ca54cb8c9eb38095dc420b73c6380ce1dbeb10fa
Analyze and fix the following issue in the Linux kernel code: Subject: Re: [PATCH] strstrip incorrectly marked __must_check
Problem Details: Recently, We marked strstrip() as must_check. because it was frequently misused and it should be checked. However, we found one exception. scsi/ipr.c intentionally ignore return value of strstrip. Because it wishes to keep the whitespace at the beginning. Thus we need to keep with and without check...
```diff diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 206c2fa8c1ba..8643f5089361 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -1333,7 +1333,7 @@ static void ipr_log_enhanced_dual_ioa_error(struct ipr_ioa_cfg *ioa_cfg, error = &hostrcb->hcam.u.error.u.type_17_error; error->failure_reaso...
922ac25c9f4b5dc4c48ff12bfd14a98bdeb6ff0a
Analyze and fix the following issue in the Linux kernel code: vsprintf: reuse almost identical simple_strtoulX() functions
Problem Details: The difference between simple_strtoul() and simple_strtoull() is just the size of the variable used to keep track of the sum of characters converted to numbers: unsigned long simple_strtoul() {...} unsigned long long simple_strtoull(){...} Both are same size on my Core 2/gcc 4.4.1. Overflow condition...
```diff diff --git a/lib/vsprintf.c b/lib/vsprintf.c index a315138ece55..c50733a690f0 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -47,14 +47,14 @@ static unsigned int simple_guess_base(const char *cp) } /** - * simple_strtoul - convert a string to an unsigned long + * simple_strtoull - convert a string to a...
d1f28953ca338a9af6d91d5896060179142de0d1
Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: mark cifs mailing list as "moderated for non-subscribers"
Problem Details: If non-subscribers post bug report to CIFS mailing list, they will get following messages. Your mail to 'linux-cifs-client' with the subject [PATCH x/x] cifs: xxxxxxxxxxxxx Is being held until the list moderator can review it for approval. The reason it is being held: Post by non-memb...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index 8acf149164e3..9a80011db083 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1482,8 +1482,8 @@ F: include/linux/coda*.h COMMON INTERNET FILE SYSTEM (CIFS) M: Steve French <sfrench@samba.org> -L: linux-cifs-client@lists.samba.org -L: samba-technical@lists.samba.org +...
a8af2430f3fb997951eff3d0d51cb166b399782b
Analyze and fix the following issue in the Linux kernel code: scripts/get_maintainer.pl: fix --non with --git-blame and cleanups
Problem Details: Fix email matching without name --n and --git-blame Using --non and --git-blame caused maintainer signature matching to fail. Fixed that by adding 3rd argument to sub format_email to control show/hide name portion of address Slurp -f file instead of reading line-by-line for K: pattern matchin...
```diff diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 4e11c271e613..fe91a984247b 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -182,7 +182,7 @@ if ($email_remove_duplicates) { next if ($line =~ m/^\s*$/); my ($name, $address) = parse_email($line); - $line = f...
603c4ba96be998a8dd7a6f9b23681c49acdf4b64
Analyze and fix the following issue in the Linux kernel code: err.h: add helper function to simplify pointer error checking
Problem Details: There are quite a few instances in the kernel of checks of pointers both against NULL and against the errno range, handling both cases identically. This additional helper function would simplify such code. [akpm@linux-foundation.org: build fix] Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com...
```diff diff --git a/include/linux/err.h b/include/linux/err.h index ec87f3142bf3..1b12642636c7 100644 --- a/include/linux/err.h +++ b/include/linux/err.h @@ -34,6 +34,11 @@ static inline long IS_ERR(const void *ptr) return IS_ERR_VALUE((unsigned long)ptr); } +static inline long IS_ERR_OR_NULL(const void *ptr) +{ ...
9385565e20c4acf97cd8e2fd7155750e578edcc4
Analyze and fix the following issue in the Linux kernel code: ioc3/ioc4: fix error path on driver registration
Problem Details: Two IOC3 and IOC4 drivers have broken error paths on registration. Fix them. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Pat Gefre <pfg@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/serial/ioc4_serial.c b/drivers/serial/ioc4_serial.c index 902b067d7e9c..836d9ab4f729 100644 --- a/drivers/serial/ioc4_serial.c +++ b/drivers/serial/ioc4_serial.c @@ -2913,17 +2913,27 @@ static int __init ioc4_serial_init(void) printk(KERN_WARNING "%s: Couldn't register rs232 IOC4 ser...
2ea5d35a49f5c89d1d2d677fe90c71ad5a6278b6
Analyze and fix the following issue in the Linux kernel code: ioc3/ioc4: various section fixes
Problem Details: Several IOC3 and IOC4 drivers misuse the __devinit and __devexit section markers. Use __init and __exit instead as appropriate, then add __devinit and __devexit where they really belong for PCI drivers. Also make ioc4_serial_init static. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Pat Gefre...
```diff diff --git a/drivers/misc/ioc4.c b/drivers/misc/ioc4.c index 60b0b1a4fb3a..09dcb699e667 100644 --- a/drivers/misc/ioc4.c +++ b/drivers/misc/ioc4.c @@ -138,7 +138,7 @@ ioc4_unregister_submodule(struct ioc4_submodule *is) * even though the following code utilizes external interrupt registers * to perform the ...
8a64f336bc1d4aa203b138d29d5a9c414a9fbb47
Analyze and fix the following issue in the Linux kernel code: kernel.h: add printk_ratelimited and pr_<level>_rl
Problem Details: Add a printk_ratelimited statement expression macro that uses a per-call ratelimit_state so that multiple subsystems output messages are not suppressed by a global __ratelimit state. [akpm@linux-foundation.org: coding-style fixes] [akpm@linux-foundation.org: s/_rl/_ratelimited/g] Signed-off-by: Joe Pe...
```diff diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 910db75b1a72..4d9c916d06d9 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -404,6 +404,50 @@ static inline char *pack_hex_byte(char *buf, u8 byte) ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) #endif +/*...
dfc6a736d452a8c308190b618b065c2257d370ff
Analyze and fix the following issue in the Linux kernel code: kernel/sys.c: fix "warning: do-while statement is not a compound statement" noise
Problem Details: do_each_thread/while_each_thread wrap a block of code that is in this format: for (...) do ... while If curly braces do not surround the inner loop the following warning is generated by sparse: warning: do-while statement is not a compound statement Fix the warning by adding the braces. S...
```diff diff --git a/kernel/sys.c b/kernel/sys.c index 585d6cd10040..20ccfb5da6af 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -189,10 +189,10 @@ SYSCALL_DEFINE3(setpriority, int, which, int, who, int, niceval) !(user = find_user(who))) goto out_unlock; /* No processes for this user */ - do_each_threa...
29671f22a8b6522db3b126a3fdfb208759ce46e3
Analyze and fix the following issue in the Linux kernel code: rwsem: fix rwsem_is_locked() bugs
Problem Details: rwsem_is_locked() tests ->activity without locks, so we should always keep ->activity consistent. However, the code in __rwsem_do_wake() breaks this rule, it updates ->activity after _all_ readers waken up, this may give some reader a wrong ->activity value, thus cause rwsem_is_locked() behaves wrong....
```diff diff --git a/include/linux/rwsem-spinlock.h b/include/linux/rwsem-spinlock.h index 6c3c0f6c261f..bdfcc2527970 100644 --- a/include/linux/rwsem-spinlock.h +++ b/include/linux/rwsem-spinlock.h @@ -68,11 +68,7 @@ extern int __down_write_trylock(struct rw_semaphore *sem); extern void __up_read(struct rw_semaphore ...
196a15b4ee99f627fbc2c07e58e14aab2065fa80
Analyze and fix the following issue in the Linux kernel code: init/main.c: fix symbol shadows noise
Problem Details: The symbol 'call' is a static symbol used for initcall_debug. This same symbol name is used locally by a couple functions and produces the following sparse warnings: warning: symbol 'call' shadows an earlier one Fix this noise by renaming the local symbols. Signed-off-by: H Hartley Sweeten <hsweet...
```diff diff --git a/init/main.c b/init/main.c index 4051d75dd2d6..c3db4a98b369 100644 --- a/init/main.c +++ b/init/main.c @@ -691,10 +691,10 @@ asmlinkage void __init start_kernel(void) static void __init do_ctors(void) { #ifdef CONFIG_CONSTRUCTORS - ctor_fn_t *call = (ctor_fn_t *) __ctors_start; + ctor_fn_t *fn = ...