id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
d1f9cbd78841f1a797c77e9117e4882f932c2ef6 | Analyze and fix the following issue in the Linux kernel code: tracing/function-graph-tracer: fix traces weirdness while absolute time printing | Problem Details:
Impact: trace output cleanup/reordering
When an interrupt occurs and and the abstime option is selected:
echo funcgraph-abstime > /debug/tracing/trace_options
then we observe broken traces:
30581.025422 | 0) Xorg-4291 | 0.503 us | idle_cpu();
30581.025424 | 0) Xorg-4291 | ... | ```diff
diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c
index 6c7738e4f98b..8f4004a00b4e 100644
--- a/kernel/trace/trace_functions_graph.c
+++ b/kernel/trace/trace_functions_graph.c
@@ -351,16 +351,35 @@ print_graph_overhead(unsigned long long duration, struct trace_seq *s)
re... |
60f793de891ea06fa870546336a88df543ec56ae | Analyze and fix the following issue in the Linux kernel code: [ARM] 5377/1: S3C2410-Framebuffer: Fix resume path in S3C2410 framebuffer driver. | Problem Details:
Ensure that the LCD engine is correctly re-initialised
and the correct parameters passed ot s3c2410fb_init_registers.
Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ```diff
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c
index 79cf0b1976aa..b0b4513ba537 100644
--- a/drivers/video/s3c2410fb.c
+++ b/drivers/video/s3c2410fb.c
@@ -1017,6 +1017,10 @@ static int s3c2410fb_resume(struct platform_device *dev)
s3c2410fb_init_registers(fbinfo);
+ /* re-activate our ... |
1144d6535fdea5133875dab4a0be5515ae5cb681 | Analyze and fix the following issue in the Linux kernel code: [ARM] 5376/1: S3C24XX: Fix sparse errors in platform uncompress.h | Problem Details:
Ensure __iomem attribute is __force 'd off in the minimal
__raw_writel() implementation.
Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ```diff
diff --git a/arch/arm/plat-s3c/include/plat/uncompress.h b/arch/arm/plat-s3c/include/plat/uncompress.h
index 6061de87f225..dc66a477f62e 100644
--- a/arch/arm/plat-s3c/include/plat/uncompress.h
+++ b/arch/arm/plat-s3c/include/plat/uncompress.h
@@ -90,7 +90,10 @@ static inline void flush(void)
{
}
-#define __... |
3fd9825c42c784a59b3b90bdf073f49d4bb42a8d | Analyze and fix the following issue in the Linux kernel code: [ARM] 5402/1: fix a case of wrap-around in sanity_check_meminfo() | Problem Details:
In the non highmem case, if two memory banks of 1GB each are provided,
the second bank would evade suppression since its virtual base would
be 0. Fix this by disallowing any memory bank which virtual base
address is found to be lower than PAGE_OFFSET.
Reported-by: Lennert Buytenhek <buytenh@marvell.c... | ```diff
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 9b36c5cb5e9f..d4d082c5c2d4 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -693,7 +693,8 @@ static void __init sanity_check_meminfo(void)
* Check whether this memory bank would entirely overlap
* the vmalloc area.
*/
- if (__va(bank... |
6ce6c473a7fd742fdb0db95841e2c4c6b37337c5 | Analyze and fix the following issue in the Linux kernel code: sound: virtuoso: revert "do not overwrite EEPROM on Xonar D2/D2X" | Problem Details:
This reverts commit 7e86c0e6850504ec9516b953f316a47277825e33 ("do not
overwrite EEPROM on Xonar D2/D2X") because it did not actually help with
the problem.
More user reports show that the overwriting of the EEPROM is not
triggered by using this driver but by installing Linux, and that the
installation... | ```diff
diff --git a/sound/pci/oxygen/virtuoso.c b/sound/pci/oxygen/virtuoso.c
index 18c7c91786bc..6c870c12a177 100644
--- a/sound/pci/oxygen/virtuoso.c
+++ b/sound/pci/oxygen/virtuoso.c
@@ -26,7 +26,7 @@
* SPI 0 -> 1st PCM1796 (front)
* SPI 1 -> 2nd PCM1796 (surround)
* SPI 2 -> 3rd PCM1796 (center/LFE)
- * SPI ... |
fdcedf7b75808dd72c3cc0b931be11b04d75c60a | Analyze and fix the following issue in the Linux kernel code: time: apply NTP frequency/tick changes immediately | Problem Details:
Since the GENERIC_TIME changes landed, the adjtimex behavior changed
for struct timex.tick and .freq changed. When the tick or freq value
is set, we adjust the tick_length_base in ntp_update_frequency().
However, this new value doesn't get applied to tick_length until the
next second (via second_overfl... | ```diff
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index f5f793d92415..e1fa3689a903 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -51,6 +51,7 @@ static long ntp_tick_adj;
static void ntp_update_frequency(void)
{
+ u64 old_tick_length_base = tick_length_base;
u64 second_length = (u64)(tick_usec... |
bb402f16ecf9bcdb944b8fa730f0e43cae519673 | Analyze and fix the following issue in the Linux kernel code: crypto: ahash - Fix digest size in /proc/crypto | Problem Details:
crypto_ahash_show changed to use cra_ahash for digestsize reference.
Signed-off-by: Lee Nipper <lee.nipper@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> | ```diff
diff --git a/crypto/ahash.c b/crypto/ahash.c
index ba5292d69ebd..b2d1ee32cfe8 100644
--- a/crypto/ahash.c
+++ b/crypto/ahash.c
@@ -214,7 +214,7 @@ static void crypto_ahash_show(struct seq_file *m, struct crypto_alg *alg)
seq_printf(m, "async : %s\n", alg->cra_flags & CRYPTO_ALG_ASYNC ?
"yes"... |
251a2a958b0455d11b711aeeb57cabad66259461 | Analyze and fix the following issue in the Linux kernel code: smack: fix lots of kernel-doc notation | Problem Details:
Fix/add kernel-doc notation and fix typos in security/smack/.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: James Morris <jmorris@namei.org> | ```diff
diff --git a/security/smack/smack_access.c b/security/smack/smack_access.c
index 2e0b83e77ffe..cfa19ca125e3 100644
--- a/security/smack/smack_access.c
+++ b/security/smack/smack_access.c
@@ -162,8 +162,8 @@ int smk_access(char *subject_label, char *object_label, int request)
/**
* smk_curacc - determine if... |
4b3e3d228429c75d398f1aa24532e468d3220c49 | Analyze and fix the following issue in the Linux kernel code: tracing: limit the number of loops the ring buffer self test can make | Problem Details:
Impact: prevent deadlock if ring buffer gets corrupted
This patch adds a paranoid check to make sure the ring buffer consumer
does not go into an infinite loop. Since the ring buffer has been set
to read only, the consumer should not loop for more than the ring buffer
size. A check is added to make su... | ```diff
diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c
index a7e0ef662f9f..bc8e80a86bca 100644
--- a/kernel/trace/trace_selftest.c
+++ b/kernel/trace/trace_selftest.c
@@ -23,10 +23,20 @@ static int trace_test_buffer_cpu(struct trace_array *tr, int cpu)
{
struct ring_buffer_event *event;
... |
9107584ecdda31981557034cccf5185afced3e0e | Analyze and fix the following issue in the Linux kernel code: drivers/net/igb: fix sparse warning: symbol shadows an earlier one | Problem Details:
Impact: Move variable declaration as far inner as possible.
Fix this sparse warning:
drivers/net/igb/igb_main.c:1895:21: warning: symbol 'j' shadows an earlier one
drivers/net/igb/igb_main.c:1855:16: originally declared here
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David ... | ```diff
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 457f12e345ca..87eed88d9586 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -1971,7 +1971,7 @@ static void igb_configure_rx(struct igb_adapter *adapter)
struct e1000_hw *hw = &adapter->hw;
u32 rctl, rxcsum;... |
4d7a077c0c7bfdba04cf0aa0b79053cf4ebaacf8 | Analyze and fix the following issue in the Linux kernel code: tracing: have function trace select kallsyms | Problem Details:
Impact: fix output of function tracer to be useful
The function tracer is pretty useless if KALLSYMS is not configured.
Unless you are good at reading hex values, the function tracer should
select the KALLSYMS configuration.
Also, the dynamic function tracer will fail its self test if KALLSYMS
is not... | ```diff
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 58a93fbd68aa..34e707e5ab87 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -52,6 +52,7 @@ config FUNCTION_TRACER
depends on HAVE_FUNCTION_TRACER
depends on DEBUG_KERNEL
select FRAME_POINTER
+ select KALLSYMS
select TRACING
... |
0c5119c1e655e0719a69601b1049acdd5ec1c125 | Analyze and fix the following issue in the Linux kernel code: tracing: disable tracing while testing ring buffer | Problem Details:
Impact: fix to prevent hard lockup on self tests
If one of the tracers are broken and is constantly filling the ring
buffer while the test of the ring buffer is running, it will hang
the box. The reason is that the test is a consumer that will not
stop till the ring buffer is empty. But if the tracer ... | ```diff
diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c
index 88c8eb70f54a..a7e0ef662f9f 100644
--- a/kernel/trace/trace_selftest.c
+++ b/kernel/trace/trace_selftest.c
@@ -57,11 +57,20 @@ static int trace_test_buffer(struct trace_array *tr, unsigned long *count)
cnt = ring_buffer_entries(... |
38bb045d493cc166920834087acd934dedc1b5d5 | Analyze and fix the following issue in the Linux kernel code: niu: improve ethtool support for gigabit copper cards | Problem Details:
Introduced support for link speed and duplex setting (ethtool -s),
link advertising parameters and autonegotiation (ethtool -r):
- struct niu_link_config: split advertising and autoneg
fields into active and target values (similar to speed
and duplex fields)
- mii_init_common(): rewrite function to... | ```diff
diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index 47fc58657890..75991eb761cf 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -1115,6 +1115,130 @@ static int link_status_10g_serdes(struct niu *np, int *link_up_p)
return 0;
}
+static int link_status_mii(struct niu *np, int *link_up_p)
+{
+ s... |
e0d8496a66de9eca13a88d93a5642db47e5a2b60 | Analyze and fix the following issue in the Linux kernel code: niu: fix PHY template choice for 10G copper | Problem Details:
Fixed a typo in niu_determine_phy_disposition() which resulted in
phy_template_1g_copper being selected for 10G/copper configuration.
Signed-off-by: Constantin Baranov <baranov@mercdev.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index 32374a1c123b..47fc58657890 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -2456,7 +2456,7 @@ static int niu_determine_phy_disposition(struct niu *np)
case NIU_FLAGS_10G:
/* 10G copper */
- tp = &phy_template_1g_copper;
+ tp = &phy_... |
ff2ef9021ea16188dbb355707fd31f6cf1a42ef7 | Analyze and fix the following issue in the Linux kernel code: drivers/net/sfc: fix sparse warnings: Should it be static? | Problem Details:
Impact: Include the header file. If CONFIG_SFC_MTD is not defined
then the functions 'efx_mtd_remove' and 'efx_mtd_rename' are defined
'static inline' with an empty function body in the header file, but
the the whole file mtd.c is not built in this case.
Fix this sparse warnings:
drivers/net/sfc/mt... | ```diff
diff --git a/drivers/net/sfc/mtd.c b/drivers/net/sfc/mtd.c
index 665cafb88d6a..820c233c3ea0 100644
--- a/drivers/net/sfc/mtd.c
+++ b/drivers/net/sfc/mtd.c
@@ -15,6 +15,7 @@
#define EFX_DRIVER_NAME "sfc_mtd"
#include "net_driver.h"
#include "spi.h"
+#include "efx.h"
#define EFX_SPI_VERIFY_BUF_LEN 16
``` |
82a5bd6a7b1b60b5d357e2e4b93b914f57314016 | Analyze and fix the following issue in the Linux kernel code: net/mv643xx: use GFP_ATOMIC while atomic | Problem Details:
dev_set_rx_mode() grabs netif_addr_lock_bh():
|BUG: sleeping function called from invalid context at /home/bigeasy/git/cryptodev-2.6/mm/slub.c:1599
|in_atomic(): 1, irqs_disabled(): 0, pid: 859, name: ifconfig
|2 locks held by ifconfig/859:
| #0: (rtnl_mutex){--..}, at: [<c0239ccc>] rtnl_lock+0x18/0x... | ```diff
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index 5f31bbb614af..b6ab46942b98 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -1575,7 +1575,7 @@ oom:
return;
}
- mc_spec = kmalloc(0x200, GFP_KERNEL);
+ mc_spec = kmalloc(0x200, GFP_ATOMIC);
if (mc_spec == ... |
f04b30de3c82528f1ab4c58b3dd4c975f5341901 | Analyze and fix the following issue in the Linux kernel code: inotify: fix GFP_KERNEL related deadlock | Problem Details:
Enhanced lockdep coverage of __GFP_NOFS turned up this new lockdep
assert:
[ 1093.677775]
[ 1093.677781] =================================
[ 1093.680031] [ INFO: inconsistent lock state ]
[ 1093.680031] 2.6.29-rc5-tip-01504-gb49eca1-dirty #1
[ 1093.680031] ---------------------------------
[ 1093.6800... | ```diff
diff --git a/fs/notify/inotify/inotify.c b/fs/notify/inotify/inotify.c
index dae3f28f30d4..331f2e88e284 100644
--- a/fs/notify/inotify/inotify.c
+++ b/fs/notify/inotify/inotify.c
@@ -156,7 +156,7 @@ static int inotify_handle_get_wd(struct inotify_handle *ih,
int ret;
do {
- if (unlikely(!idr_pre_get(&ih-... |
a1a5c3b9237662f326cc730e167e7524b5d05a36 | Analyze and fix the following issue in the Linux kernel code: fbdev/drm: fix Kconfig submenu mess in "Graphics support" | Problem Details:
Submenus of the graphics support "Support for frame buffer devices" and
"Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)" are
broken in half after latest changes for Intel 915 mode setting support.
The DRM subsection is broken because one option is put outside the choice
section it dep... | ```diff
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 4be3acbaaf9a..3a22eb9be378 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -80,18 +80,17 @@ config DRM_I915
XFree86 4.4 and above. If unsure, build this and i830 as modules and
the X server will load the correct o... |
cc2559bccc72767cb446f79b071d96c30c26439b | Analyze and fix the following issue in the Linux kernel code: mm: fix memmap init for handling memory hole | Problem Details:
Now, early_pfn_in_nid(PFN, NID) may returns false if PFN is a hole.
and memmap initialization was not done. This was a trouble for
sparc boot.
To fix this, the PFN should be initialized and marked as PG_reserved.
This patch changes early_pfn_in_nid() return true if PFN is a hole.
Signed-off-by: KAMEZ... | ```diff
diff --git a/arch/ia64/mm/numa.c b/arch/ia64/mm/numa.c
index 5061c3fb6796..3efea7d0a351 100644
--- a/arch/ia64/mm/numa.c
+++ b/arch/ia64/mm/numa.c
@@ -70,7 +70,7 @@ int __meminit __early_pfn_to_nid(unsigned long pfn)
return node_memblk[i].nid;
}
- return 0;
+ return -1;
}
#ifdef CONFIG_MEMORY_HOTPLU... |
f2dbcfa738368c8a40d4a5f0b65dc9879577cb21 | Analyze and fix the following issue in the Linux kernel code: mm: clean up for early_pfn_to_nid() | Problem Details:
What's happening is that the assertion in mm/page_alloc.c:move_freepages()
is triggering:
BUG_ON(page_zone(start_page) != page_zone(end_page));
Once I knew this is what was happening, I added some annotations:
if (unlikely(page_zone(start_page) != page_zone(end_page))) {
printk(KERN_ERR "move_fr... | ```diff
diff --git a/arch/ia64/include/asm/mmzone.h b/arch/ia64/include/asm/mmzone.h
index 34efe88eb849..f2ca32069b3f 100644
--- a/arch/ia64/include/asm/mmzone.h
+++ b/arch/ia64/include/asm/mmzone.h
@@ -31,10 +31,6 @@ static inline int pfn_to_nid(unsigned long pfn)
#endif
}
-#ifdef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID... |
ada723dcd681e2dffd7d73345cc8fda0eb0df9bd | Analyze and fix the following issue in the Linux kernel code: fs/super.c: add lockdep annotation to s_umount | Problem Details:
Li Zefan said:
Thread 1:
for ((; ;))
{
mount -t cpuset xxx /mnt > /dev/null 2>&1
cat /mnt/cpus > /dev/null 2>&1
umount /mnt > /dev/null 2>&1
}
Thread 2:
for ((; ;))
{
mount -t cpuset xxx /mnt > /dev/null 2>&1
umount /mnt > /dev/null 2>&1
}
(Note: It is irrel... | ```diff
diff --git a/fs/super.c b/fs/super.c
index 61dce001dd57..8349ed6b1412 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -82,7 +82,22 @@ static struct super_block *alloc_super(struct file_system_type *type)
* lock ordering than usbfs:
*/
lockdep_set_class(&s->s_lock, &type->s_lock_key);
- down_write(&s->s_... |
287d859222e0adbc67666a6154aaf42d7d5bbb54 | Analyze and fix the following issue in the Linux kernel code: atmel-mci: fix initialization of dma slave data | Problem Details:
The conversion of atmel-mci to dma_request_channel missed the
initialization of the channel dma_slave information. The filter_fn passed
to dma_request_channel is responsible for initializing the channel's
private data. This implementation has the additional benefit of enabling
a generic client-channe... | ```diff
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index a58993011edb..280a9d263eb3 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -518,6 +518,7 @@ struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, v
dma_chan_name(chan), err);
else
... |
137bad32342a613586347341d1307c2b9812ef44 | Analyze and fix the following issue in the Linux kernel code: lis3lv02d: support both one- and two-byte sensors | Problem Details:
Sensors responding with 0x3B to WHO_AM_I only have one data register per
direction, thus returning a signed byte from the position which is
occupied by the MSB in sensors responding with 0x3A.
Since multiple sensors share the reply to WHO_AM_I, we rename the defines
to better indicate what they identi... | ```diff
diff --git a/drivers/hwmon/hp_accel.c b/drivers/hwmon/hp_accel.c
index dcefe1d2adbd..6b16566c4e6c 100644
--- a/drivers/hwmon/hp_accel.c
+++ b/drivers/hwmon/hp_accel.c
@@ -237,9 +237,25 @@ static void lis3lv02d_enum_resources(struct acpi_device *device)
printk(KERN_DEBUG DRIVER_NAME ": Error getting resources... |
42f5e039c3f6512271636928ddc4e7f7a0371672 | Analyze and fix the following issue in the Linux kernel code: pm: fix build for CONFIG_PM unset | Problem Details:
Compilation of kprobes.c with CONFIG_PM unset is broken due to some broken
config dependncies. Fix that.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-by: Ingo Molnar <mingo@elte.hu>
Tested-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Len Brown <lenb@kernel.org>
Acked-by: Pavel Machek <pa... | ```diff
diff --git a/kernel/Makefile b/kernel/Makefile
index 170a9213c1b6..e4791b3ba55d 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -51,6 +51,7 @@ obj-$(CONFIG_UID16) += uid16.o
obj-$(CONFIG_MODULES) += module.o
obj-$(CONFIG_KALLSYMS) += kallsyms.o
obj-$(CONFIG_PM) += power/
+obj-$(CONFIG_FREEZER) += power... |
67e055d144c5b2acdc1c63811fde031263bf92c5 | Analyze and fix the following issue in the Linux kernel code: cgroups: fix possible use after free | Problem Details:
In cgroup_kill_sb(), root is freed before sb is detached from the list, so
another sget() may find this sb and call cgroup_test_super(), which will
access the root that has been freed.
Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Paul Menage <m... | ```diff
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index e14db9c089b9..9edb5c4b79b4 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -1122,8 +1122,8 @@ static void cgroup_kill_sb(struct super_block *sb) {
mutex_unlock(&cgroup_mutex);
- kfree(root);
kill_litter_super(sb);
+ kfree(root);
}
static str... |
1cf6e7d83bf334cc5916137862c920a97aabc018 | Analyze and fix the following issue in the Linux kernel code: mm: task dirty accounting fix | Problem Details:
YAMAMOTO-san noticed that task_dirty_inc doesn't seem to be called properly for
cases where set_page_dirty is not used to dirty a page (eg. mark_buffer_dirty).
Additionally, there is some inconsistency about when task_dirty_inc is
called. It is used for dirty balancing, however it even gets called fo... | ```diff
diff --git a/fs/buffer.c b/fs/buffer.c
index 665d446b25bc..ff4d1cdd779b 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -777,6 +777,7 @@ static int __set_page_dirty(struct page *page,
__inc_zone_page_state(page, NR_FILE_DIRTY);
__inc_bdi_stat(mapping->backing_dev_info,
BDI_RECLAIMABLE);
+ task_dir... |
55ec82176eca52e4e0530a82a0eb59160a1a95a1 | Analyze and fix the following issue in the Linux kernel code: vfs: separate FMODE_PREAD/FMODE_PWRITE into separate flags | Problem Details:
Separate FMODE_PREAD and FMODE_PWRITE into separate flags to reflect the
reality that the read and write paths may have independent restrictions.
A git grep verifies that these flags are always cleared together so this
new behavior will only apply to interfaces that change to clear flags
individually.... | ```diff
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 6022f44043f2..5852bd6afbe4 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -54,24 +54,30 @@ struct inodes_stat_t {
#define MAY_ACCESS 16
#define MAY_OPEN 32
+/*
+ * flags in file.f_mode. Note that FMODE_READ and FMODE_WRITE must corresp... |
c296861291669f305deef19b78042330d7135017 | Analyze and fix the following issue in the Linux kernel code: vmalloc: add __get_vm_area_caller() | Problem Details:
We have get_vm_area_caller() and __get_vm_area() but not
__get_vm_area_caller()
On powerpc, I use __get_vm_area() to separate the ranges of addresses
given to vmalloc vs. ioremap (various good reasons for that) so in order
to be able to implement the new caller tracking in /proc/vmallocinfo, I
need a... | ```diff
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index 506e7620a986..9c0890c7a06a 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -84,6 +84,10 @@ extern struct vm_struct *get_vm_area_caller(unsigned long size,
unsigned long flags, void *caller);
extern struct vm_struct... |
3a011a171906a3a51a43bb860fb7c66a64cab140 | Analyze and fix the following issue in the Linux kernel code: Revert "[XFS] remove old vmap cache" | Problem Details:
This reverts commit d2859751cd0bf586941ffa7308635a293f943c17.
This commit caused regression. We'll try to fix use of new
vmap API for next release.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Felix Blyakher <felixb@sgi.com> | ```diff
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c
index 0b2177a9fbdc..cb329edc925b 100644
--- a/fs/xfs/linux-2.6/xfs_buf.c
+++ b/fs/xfs/linux-2.6/xfs_buf.c
@@ -165,6 +165,75 @@ test_page_region(
return (mask && (page_private(page) & mask) == mask);
}
+/*
+ * Mapping of multi-page buffers... |
cf7dab801796b9ee52a6dc99888a66bf476538ec | Analyze and fix the following issue in the Linux kernel code: Revert "[XFS] use scalable vmap API" | Problem Details:
This reverts commit 95f8e302c04c0b0c6de35ab399a5551605eeb006.
This commit caused regression. We'll try to fix use of new
vmap API for next release.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Felix Blyakher <felixb@sgi.com> | ```diff
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c
index d71dc44e21ed..0b2177a9fbdc 100644
--- a/fs/xfs/linux-2.6/xfs_buf.c
+++ b/fs/xfs/linux-2.6/xfs_buf.c
@@ -264,7 +264,7 @@ xfs_buf_free(
uint i;
if ((bp->b_flags & XBF_MAPPED) && (bp->b_page_count > 1))
- vm_u... |
c232f457e409b34417166596ea3daf298ace95c9 | Analyze and fix the following issue in the Linux kernel code: omap_hsmmc: recover from transfer failures | Problem Details:
Timeouts during a command that has a data phase can result in the next
command issued after the command that failed not being processed, i.e. no
interrupt ever occurs to indicate the command has completed. This failure
can result in a deadlock.
This patch resets the data state machine to clear the e... | ```diff
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 3bfd0facb794..8d21a07f63de 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -417,8 +417,15 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id)
}
end_cmd = 1;
}
- if (host->data... |
eb25082657be3e7639e349fc926afdcbb0a4dc65 | Analyze and fix the following issue in the Linux kernel code: omap_hsmmc: only MMC1 allows HCTL.SDVS != 1.8V | Problem Details:
Based on a patch from Tony Lindgren ... after initialization,
never change HCTL.SDVS except for MMC1. The other controller
instances only support 1.8V in that field, although they can
suport other card/SDIO/eMMC/... voltages with level shifting
solutions such as external transceivers.
MMC2 behavior s... | ```diff
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 4dba48642e60..3bfd0facb794 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -55,6 +55,7 @@
#define VS30 (1 << 25)
#define SDVS18 (0x5 << 9)
#define SDVS30 (0x6 << 9)
+#define SDVS33 (0x7 ... |
249d0fa9d59b6165ecc224720d9ce9b7267cf1b8 | Analyze and fix the following issue in the Linux kernel code: omap_hsmmc: card detect irq bugfix | Problem Details:
Work around lockdep issue when card detect IRQ handlers run in
thread context ... it forces IRQF_DISABLED, which prevents all
access to twl4030 card detect signals.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Pierre Ossman <... | ```diff
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index db37490f67ec..4dba48642e60 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -517,6 +517,9 @@ static void mmc_omap_detect(struct work_struct *work)
{
struct mmc_omap_host *host = container_of(work... |
5dbace0c9ba110c1a3810a89fa6bf12b7574b5a3 | Analyze and fix the following issue in the Linux kernel code: sdhci: fix led naming | Problem Details:
Fix the led device naming for the sdhci driver.
The led class documentation defines the led name to have the
form "devicename:colour:function" while not applicable sections
should be left blank.
To comply with the documentation the led device name is changed
from "mmc*" to "mmc*::".
Signed-off-by: H... | ```diff
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 24d7414a3315..f52f3053ed92 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1722,7 +1722,9 @@ int sdhci_add_host(struct sdhci_host *host)
#endif
#ifdef SDHCI_USE_LEDS_CLASS
- host->led.name = mmc_hostname(mmc);
+ ... |
58a5dd3e0e77029d3db1f8fa75d0b54b38169d5d | Analyze and fix the following issue in the Linux kernel code: mmc_test: fix basic read test | Problem Details:
Due to a typo in the Basic Read test, it's currently identical to the
Basic Write test. Fix this.
Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> | ```diff
diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c
index b92b172074ee..b9f1e84897cc 100644
--- a/drivers/mmc/card/mmc_test.c
+++ b/drivers/mmc/card/mmc_test.c
@@ -494,7 +494,7 @@ static int mmc_test_basic_read(struct mmc_test_card *test)
sg_init_one(&sg, test->buffer, 512);
- ret = mmc... |
994244883739e4044bef76d4e5d7a9b66dc6c7b6 | Analyze and fix the following issue in the Linux kernel code: s3cmci: Fix hangup in do_pio_write() | Problem Details:
This commit fixes the regression what was added by commit
088a78af978d0c8e339071a9b2bca1f4cb368f30 "s3cmci: Support transfers
which are not multiple of 32 bits."
fifo_free() now returns amount of available space in FIFO buffer in
bytes. But do_pio_write() writes to FIFO 32-bit words. Condition for
r... | ```diff
diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
index 35a98eec7414..f4a67c65d301 100644
--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -329,7 +329,7 @@ static void do_pio_write(struct s3cmci_host *host)
to_ptr = host->base + host->sdidata;
- while ((fifo = fifo_free(... |
74019224ac34b044b44a31dd89a54e3477db4896 | Analyze and fix the following issue in the Linux kernel code: timers: add mod_timer_pending() | Problem Details:
Impact: new timer API
Based on an idea from Martin Josefsson with the help of
Patrick McHardy and Stephen Hemminger:
introduce the mod_timer_pending() API which is a mod_timer()
offspring that is an invariant on already removed timers.
(regular mod_timer() re-activates non-pending timers.)
This is ... | ```diff
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index 6a0ad196aeb3..f085369301b1 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -508,7 +508,7 @@ static void __spu_add_to_rq(struct spu_context *ctx)
l... |
4f1c3b7e7ee4d841c8af3a074dc361d6a7a77803 | Analyze and fix the following issue in the Linux kernel code: netfilter: xt_physdev fixes | Problem Details:
1) physdev_mt() incorrectly assumes nulldevname[] is aligned on an int
2) It also uses word comparisons, while it could use long word ones.
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Patrick McHardy <kaber@trash.net> | ```diff
diff --git a/net/netfilter/xt_physdev.c b/net/netfilter/xt_physdev.c
index 1bcdfc12cf59..4b13ef7ce145 100644
--- a/net/netfilter/xt_physdev.c
+++ b/net/netfilter/xt_physdev.c
@@ -24,9 +24,9 @@ static bool
physdev_mt(const struct sk_buff *skb, const struct xt_match_param *par)
{
int i;
- static const char nu... |
fc9967576829a01c98e5388410dc12c61006f79f | Analyze and fix the following issue in the Linux kernel code: ASoC: Fix build for corgi and poodle | Problem Details:
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ```diff
diff --git a/sound/soc/pxa/corgi.c b/sound/soc/pxa/corgi.c
index eaa66915a324..146973ae0974 100644
--- a/sound/soc/pxa/corgi.c
+++ b/sound/soc/pxa/corgi.c
@@ -16,6 +16,7 @@
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/timer.h>
+#include <linux/i2c.h>
#include <linux/interrupt.h>
... |
2c6764b743f9d25dd0806a417f06920dcbd0f599 | Analyze and fix the following issue in the Linux kernel code: netfilter: nfnetlink_log: fix timeout handling | Problem Details:
NFLOG timeout was computed in timer by doing:
flushtimeout*HZ/100
Default value of flushtimeout was HZ (for 1 second delay). This was
wrong for non 100HZ computer. This patch modify the default delay by
using 100 instead of HZ.
Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Patrick McH... | ```diff
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
index 580b837e44dd..c712e9fc6bba 100644
--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -39,7 +39,7 @@
#endif
#define NFULNL_NLBUFSIZ_DEFAULT NLMSG_GOODSIZE
-#define NFULNL_TIMEOUT_DEFAULT HZ /* every seco... |
5ca431f9ae8db8c6edb9c64bebe6d6521077afd6 | Analyze and fix the following issue in the Linux kernel code: netfilter: nfnetlink_log: fix per-rule qthreshold override | Problem Details:
In NFLOG the per-rule qthreshold should overrides per-instance only
it is set. With current code, the per-rule qthreshold is 1 if not set
and it overrides the per-instance qthreshold.
This patch modifies the default xt_NFLOG threshold from 1 to
0. Thus a value of 0 means there is no per-rule setting a... | ```diff
diff --git a/include/linux/netfilter/xt_NFLOG.h b/include/linux/netfilter/xt_NFLOG.h
index cdcd0ed58f7a..4b36aeb46a10 100644
--- a/include/linux/netfilter/xt_NFLOG.h
+++ b/include/linux/netfilter/xt_NFLOG.h
@@ -2,7 +2,7 @@
#define _XT_NFLOG_TARGET
#define XT_NFLOG_DEFAULT_GROUP 0x1
-#define XT_NFLOG_DEFAUL... |
4aa3b2ee1945ed082430ae1fb988d60eef64ca07 | Analyze and fix the following issue in the Linux kernel code: netfilter: nf_conntrack_ipv6: fix nf_log_packet message in icmpv6 conntrack | Problem Details:
This patch fixes a trivial typo that was adding a new line at end of
the nf_log_packet() prefix. It also make the logging conditionnal by
adding a LOG_INVALID test.
Signed-off-by: Eric Leblond <eric@inl.fr>
Signed-off-by: Patrick McHardy <kaber@trash.net> | ```diff
diff --git a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
index c323643ffcf9..72dbb6d1a6b3 100644
--- a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
+++ b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
@@ -201,8 +201,9 @@ icmpv6_error(struct net *net, struct ... |
6fe4a28d8855e072036f36ee22f0a8f43f44918f | Analyze and fix the following issue in the Linux kernel code: crypto: testmgr - Test skciphers with no IVs | Problem Details:
As it is an skcipher with no IV escapes testing altogether because
we only test givcipher objects. This patch fixes the bypass logic
to test these algorithms.
Conversely, we're currently testing nivaead algorithms with IVs,
which would have deadlocked had it not been for the fact that no
nivaead algo... | ```diff
diff --git a/crypto/algboss.c b/crypto/algboss.c
index 4601e4267c88..6906f92aeac0 100644
--- a/crypto/algboss.c
+++ b/crypto/algboss.c
@@ -10,7 +10,7 @@
*
*/
-#include <linux/crypto.h>
+#include <crypto/internal/aead.h>
#include <linux/ctype.h>
#include <linux/err.h>
#include <linux/init.h>
@@ -206,8 +... |
5852ae42424e3ddba2d3bdf594f72189497f17ee | Analyze and fix the following issue in the Linux kernel code: crypto: aead - Avoid infinite loop when nivaead fails selftest | Problem Details:
When an aead constructed through crypto_nivaead_default fails
its selftest, we'll loop forever trying to construct new aead
objects but failing because it already exists.
The crux of the issue is that once an aead fails the selftest,
we'll ignore it on the next run through crypto_aead_lookup and
attem... | ```diff
diff --git a/crypto/aead.c b/crypto/aead.c
index 3a6f3f52c7c7..d9aa733db164 100644
--- a/crypto/aead.c
+++ b/crypto/aead.c
@@ -422,6 +422,22 @@ static struct crypto_alg *crypto_lookup_aead(const char *name, u32 type,
if (!alg->cra_aead.ivsize)
return alg;
+ crypto_mod_put(alg);
+ alg = crypto_alg_mod_loo... |
b3bdb30b6d1989129e297641fec791e9e555e4d8 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Add quirk for Acer X3200 | Problem Details:
Acer X3200 needs model=auto, otherwise model=acer is pre-selected.
Reference: Novell bnc#476268
https://bugzilla.novell.com/show_bug.cgi?id=476268
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 244de597c5be..192c92a5af38 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -8545,6 +8545,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = {
ALC888_ACER_ASPIRE_4930G),
SND_PCI_QUIRK(0x1025, ... |
4dd3a29f295799295eac819bbf540690fbe30c16 | Analyze and fix the following issue in the Linux kernel code: sound: fix opensound URL in oss Introduction | Problem Details:
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/Documentation/sound/oss/Introduction b/Documentation/sound/oss/Introduction
index f04ba6bb7395..75d967ff9266 100644
--- a/Documentation/sound/oss/Introduction
+++ b/Documentation/sound/oss/Introduction
@@ -80,7 +80,7 @@ Notes:
additional features.
2. The commercial OSS driver may be obtain... |
be987fdb55a4726e2fcbab7501f89276bdb57288 | Analyze and fix the following issue in the Linux kernel code: block: fix deadlock in blk_abort_queue() for drivers that readd to timeout list | Problem Details:
blk_abort_queue() iterates the timeout list and aborts each request on the
list, but if the driver error handling readds a request to the timeout list
during this processing, we could be looping forever. Fix this by splicing
current entries to a local list and run over that list instead.
Signed-off-by... | ```diff
diff --git a/block/blk-timeout.c b/block/blk-timeout.c
index a09535377a94..bbbdc4b8ccf2 100644
--- a/block/blk-timeout.c
+++ b/block/blk-timeout.c
@@ -209,12 +209,19 @@ void blk_abort_queue(struct request_queue *q)
{
unsigned long flags;
struct request *rq, *tmp;
+ LIST_HEAD(list);
spin_lock_irqsave(q-... |
41b8c853a495438208faa5be03bbb0050859163b | Analyze and fix the following issue in the Linux kernel code: block: fix booting from partitioned md array | Problem Details:
Hi Tejun,
it looks like your commit:
block: don't depend on consecutive minor space
f331c0296f2a9fee0d396a70598b954062603015
broke a particular case for booting from partitioned md/raid devices.
That is the second time this has been broken recently. The previous
time was fixed by
bloc... | ```diff
diff --git a/block/genhd.c b/block/genhd.c
index 397960cf26af..e1eadcc9546a 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -1087,6 +1087,14 @@ dev_t blk_lookup_devt(const char *name, int partno)
if (strcmp(dev_name(dev), name))
continue;
+ if (partno < disk->minors) {
+ /* We need to return the r... |
93dbb393503d53cd226e5e1f0088fe8f4dbaa2b8 | Analyze and fix the following issue in the Linux kernel code: block: fix bad definition of BIO_RW_SYNC | Problem Details:
We can't OR shift values, so get rid of BIO_RW_SYNC and use BIO_RW_SYNCIO
and BIO_RW_UNPLUG explicitly. This brings back the behaviour from before
213d9417fec62ef4c3675621b9364a667954d4dd.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com> | ```diff
diff --git a/block/blktrace.c b/block/blktrace.c
index 39cc3bfe56e4..7cf9d1ff45a0 100644
--- a/block/blktrace.c
+++ b/block/blktrace.c
@@ -142,7 +142,7 @@ static void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes,
what |= ddir_act[rw & WRITE];
what |= MASK_TC_BIT(rw, BARRIER);
- what |=... |
c1c201200a359cf3b6e2e36a4236cdca77a3cd8e | Analyze and fix the following issue in the Linux kernel code: bsg: Fix sense buffer bug in SG_IO | Problem Details:
When submitting requests via SG_IO, which does a sync io, a
bsg_command is not allocated. So an in-Kernel sense_buffer was not
set. However when calling blk_execute_rq() with no sense buffer
one is provided from the stack. Now bsg at blk_complete_sgv4_hdr_rq()
would check if rq->sense_len and a sense w... | ```diff
diff --git a/block/bsg.c b/block/bsg.c
index d414bb5607e8..0ce8806dd0c1 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -244,7 +244,8 @@ bsg_validate_sgv4_hdr(struct request_queue *q, struct sg_io_v4 *hdr, int *rw)
* map sg_io_v4 to a request.
*/
static struct request *
-bsg_map_hdr(struct bsg_device *bd, st... |
3f683d6175748ef9daf4698d9ef5a488dd037063 | Analyze and fix the following issue in the Linux kernel code: crypto: api - Fix crypto_alloc_tfm/create_create_tfm return convention | Problem Details:
This is based on a report and patch by Geert Uytterhoeven.
The functions crypto_alloc_tfm and create_create_tfm return a
pointer that needs to be adjusted by the caller when successful
and otherwise an error value. This means that the caller has
to check for the error and only perform the adjustment ... | ```diff
diff --git a/crypto/api.c b/crypto/api.c
index 56b6e0e66311..22385cac90bb 100644
--- a/crypto/api.c
+++ b/crypto/api.c
@@ -453,8 +453,8 @@ err:
}
EXPORT_SYMBOL_GPL(crypto_alloc_base);
-struct crypto_tfm *crypto_create_tfm(struct crypto_alg *alg,
- const struct crypto_type *frontend)
+void *crypto_cr... |
563f346d04e8373739240604a51ce8529dd9f07e | Analyze and fix the following issue in the Linux kernel code: crypto: sha-s390 - Switch to shash | Problem Details:
This patch converts the S390 sha algorithms to the new shash interface.
With fixes by Jan Glauber.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> | ```diff
diff --git a/arch/s390/crypto/sha.h b/arch/s390/crypto/sha.h
index 1ceafa571eab..f4e9dc71675f 100644
--- a/arch/s390/crypto/sha.h
+++ b/arch/s390/crypto/sha.h
@@ -29,7 +29,9 @@ struct s390_sha_ctx {
int func; /* KIMD function to use */
};
-void s390_sha_update(struct crypto_tfm *tfm, const u8 *data, unsig... |
444122fd58fdc83c96877a92b3f6288cafddb08d | Analyze and fix the following issue in the Linux kernel code: MMC: fix bug - SDHC card capacity not correct | Problem Details:
Signed-off-by: Yi Li <yi.li@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> | ```diff
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 45b1f430685f..513eb09a638f 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -584,7 +584,7 @@ static int mmc_blk_probe(struct mmc_card *card)
if (err)
goto out;
- string_get_size(get_capacity(md->disk) << 9, STRI... |
d8313ce0f148e648d4e515db5d2c65bbd44fe29e | Analyze and fix the following issue in the Linux kernel code: netxen: fix sparse warnings | Problem Details:
Fix following sparse warnings (multiple instances)
warning: restricted degrades to integer
warning: cast to restricted type
warning: incorrect type in argument 3 (different signedness)
warning: context imbalance in 'netxen_nic_hw_write_wx_2M' - different
lock contexts for basic block
Signed-off-by: D... | ```diff
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c
index 821cff68b3f3..81f55e1a34d9 100644
--- a/drivers/net/netxen/netxen_nic_hw.c
+++ b/drivers/net/netxen/netxen_nic_hw.c
@@ -936,13 +936,12 @@ netxen_nic_pci_set_crbwindow_2M(struct netxen_adapter *adapter, ulong *off)
u32 w... |
ad7bf428328d360b54e0d5f5fc7a9c0a6cf3b7fe | Analyze and fix the following issue in the Linux kernel code: drivers/net/tokenring: fix sparse warning: cast truncates bits from const value | Problem Details:
Impact: Remove the write-only field 'current_ring_status' completely.
Fix this sparse warnings:
drivers/net/tokenring/smctr.c:4410:52: warning: cast truncates bits from constant value (100 becomes 0)
drivers/net/tokenring/smctr.c:4415:52: warning: cast truncates bits from constant value (400 becom... | ```diff
diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c
index a8a5b4c4bd4d..9d7db2c8d661 100644
--- a/drivers/net/tokenring/smctr.c
+++ b/drivers/net/tokenring/smctr.c
@@ -4393,52 +4393,42 @@ static int smctr_ring_status_chg(struct net_device *dev)
{
case RING_RECOVE... |
7f50ca07fffdfa8f74ff62e54bf569c745e906e5 | Analyze and fix the following issue in the Linux kernel code: drivers/net/wireless/prism54: fix sparse warning: fix signedness | Problem Details:
Fix sparse warning:
drivers/net/wireless/prism54/isl_ioctl.c:2997:32: warning: incorrect type in argument 2 (different signedness)
drivers/net/wireless/prism54/oid_mgt.c:712:42: warning: incorrect type in argument 2 (different signedness)
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-o... | ```diff
diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c
index 57a150a22de5..4c97c6ad6f5d 100644
--- a/drivers/net/wireless/prism54/isl_ioctl.c
+++ b/drivers/net/wireless/prism54/isl_ioctl.c
@@ -2981,7 +2981,8 @@ prism54_set_spy(struct net_device *ndev,
union iwreq_dat... |
b9da9e9544724ee25af493bf117e2a8413be34a8 | Analyze and fix the following issue in the Linux kernel code: drivers/net/wireless/ipw2x00: fix sparse warnings: fix signedness | Problem Details:
Fix this sparse warnings:
drivers/net/wireless/ipw2x00/ipw2100.c:1930:43: warning: incorrect type in argument 4 (different signedness)
drivers/net/wireless/ipw2x00/ipw2100.c:1938:76: warning: incorrect type in argument 4 (different signedness)
drivers/net/wireless/ipw2x00/ipw2100.c:1946:67: warni... | ```diff
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c
index 823c2bf5e31e..52b1cf5160f7 100644
--- a/drivers/net/wireless/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/ipw2x00/ipw2100.c
@@ -1910,7 +1910,8 @@ static void isr_indicate_associated(struct ipw2100_priv *priv, u32 ... |
fc68ed4fd7fdfafbefb270cf44194096156c7943 | Analyze and fix the following issue in the Linux kernel code: drivers/net/wireless/b43: fix warning: format not a string literal and no ... | Problem Details:
Fix this compilation warning:
drivers/net/wireless/b43/main.c: In function 'b43_print_fw_helptext':
drivers/net/wireless/b43/main.c:1971: warning: format not a string literal and no format arguments
drivers/net/wireless/b43/main.c:1973: warning: format not a string literal and no format arguments... | ```diff
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index dbb8765506e8..7116ab6eccfa 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -1961,12 +1961,12 @@ static void b43_release_firmware(struct b43_wldev *dev)
static void b43_print_fw_helptext(... |
93f726a90d1446c9e5a40fe8f88086542b273e7c | Analyze and fix the following issue in the Linux kernel code: drivers/net/wireless/ath9k: fix sparse warnings: Should it be static? | Problem Details:
Impact: Make symbols static.
Fix this sparse warnings:
drivers/net/wireless/ath9k/eeprom.c:1343:5: warning: symbol 'ath9k_hw_4k_get_spur_channel' was not declared. Should it be static?
drivers/net/wireless/ath9k/eeprom.c:1372:19: warning: symbol 'eep_4k_ops' was not declared. Should it be static?
... | ```diff
diff --git a/drivers/net/wireless/ath9k/eeprom.c b/drivers/net/wireless/ath9k/eeprom.c
index c0359ad2bc7b..b55e9920a5d4 100644
--- a/drivers/net/wireless/ath9k/eeprom.c
+++ b/drivers/net/wireless/ath9k/eeprom.c
@@ -1340,7 +1340,7 @@ static u8 ath9k_hw_4k_get_num_ant_config(struct ath_hw *ah,
return 1;
}
-u... |
9e05a2df09e91bfe50d16ff96cc208708599185c | Analyze and fix the following issue in the Linux kernel code: drivers/net/wireless: fix sparse warnings: fix signedness | Problem Details:
Fix this sparse warnings:
drivers/net/wireless/airo.c:2102:21: warning: incorrect type in initializer (different signedness)
drivers/net/wireless/airo.c:2126:21: warning: incorrect type in initializer (different signedness)
drivers/net/wireless/airo.c:2167:21: warning: incorrect type in initializ... | ```diff
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 7e5cd15e59ad..c44f38895fbe 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -1161,7 +1161,7 @@ struct airo_info {
use the high bit to mark whether it is in use. */
#define MAX_FIDS 6
#define MPI_MAX_... |
49c4a5dceaff63c3080b3c9d311c1c023c3003af | Analyze and fix the following issue in the Linux kernel code: drivers/net/wireless: fix sparse warnings: symbol shadows an earlier one | Problem Details:
Impact:
Move variable closer to usage resp.
remove redundant variables resp.
rename function scope variable.
Fix this sparse warnings:
drivers/net/wireless/airo.c:3840:29: warning: symbol 'i' shadows an earlier one
drivers/net/wireless/airo.c:3751:13: originally declared here
drivers/net/w... | ```diff
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index acda45838e98..7e5cd15e59ad 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -3748,7 +3748,6 @@ static u16 setup_card(struct airo_info *ai, u8 *mac, int lock)
Cmd cmd;
Resp rsp;
int status;
- int i;
... |
b1ae1e99bd9f611f16a09c1bca2a0a38e67b88c3 | Analyze and fix the following issue in the Linux kernel code: drivers/net/wireless: fix sparse warning: context imbalance | Problem Details:
Impact: Attribute function with __acquires(...) resp. __releases(...).
Fix this sparse warnings:
drivers/net/wireless/strip.c:955:21: warning: context imbalance in 'strip_seq_start' - wrong count at exit
drivers/net/wireless/strip.c:975:13: warning: context imbalance in 'strip_seq_stop' - unexpect... | ```diff
diff --git a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c
index d6bf8d2ef8ea..39f525efdc8d 100644
--- a/drivers/net/wireless/strip.c
+++ b/drivers/net/wireless/strip.c
@@ -950,6 +950,7 @@ static struct strip *strip_get_idx(loff_t pos)
}
static void *strip_seq_start(struct seq_file *seq, loff_... |
5ed1e981bd243d78f95738a355bd117cf1f6daa1 | Analyze and fix the following issue in the Linux kernel code: drivers/net/wan: fix sparse warning: symbol shadows an earlier one | Problem Details:
Impact: Rename function scope variable and while being at it fix some
coding style issues.
Fix this sparse warning:
drivers/net/wan/sbni.c:1526:14: warning: symbol 'num' shadows an earlier one
drivers/net/wan/sbni.c:160:13: originally declared here
Signed-off-by: Hannes Eder <hannes@hanneseder.ne... | ```diff
diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c
index 0aa28e1d4366..78f7bc92cbe8 100644
--- a/drivers/net/wan/sbni.c
+++ b/drivers/net/wan/sbni.c
@@ -1520,17 +1520,18 @@ int __init init_module( void )
}
void
-cleanup_module( void )
+cleanup_module(void)
{
- struct net_device *dev;
- int num;... |
5ee0d59335c551b7d3642f071bb4f3a30c287f59 | Analyze and fix the following issue in the Linux kernel code: drivers/net/wan: fix warning: format not a string literal and no ... | Problem Details:
Impact: Use 'static const char[]' instead of 'static char[]'.
Fix this compilation warnings:
drivers/net/wan/lapbether.c: In function 'lapbeth_init_driver':
drivers/net/wan/lapbether.c:441: warning: format not a string literal and no format arguments
drivers/net/wan/z85230.c: In function 'z85230... | ```diff
diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c
index da9dcf59de24..06beba47ffdf 100644
--- a/drivers/net/wan/lapbether.c
+++ b/drivers/net/wan/lapbether.c
@@ -430,7 +430,8 @@ static struct notifier_block lapbeth_dev_notifier = {
.notifier_call = lapbeth_device_event,
};
-static char... |
0227abc9d011892fd13f360b56a7b276ebea8b07 | Analyze and fix the following issue in the Linux kernel code: drivers/net/usb: fix sparse warnings: Should it be static? | Problem Details:
Impact: Make symbols static.
Fix this sparse warnings:
drivers/net/usb/hso.c:1249:6: warning: symbol 'hso_unthrottle_tasklet' was not declared. Should it be static?
drivers/net/usb/hso.c:1268:6: warning: symbol 'hso_unthrottle_workfunc' was not declared. Should it be static?
drivers/net/usb/hso.... | ```diff
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index e6d62fe405cd..a074c16e2a62 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -1246,7 +1246,7 @@ static void hso_std_serial_read_bulk_callback(struct urb *urb)
* This needs to be a tasklet otherwise we will
* end up recursively ... |
de2f19daac017301b0bfd73bdecff89e7ea30eb7 | Analyze and fix the following issue in the Linux kernel code: drivers/net/tulip: fix sparse warning: symbol shadows an earlier one | Problem Details:
Impact: Rename a local variable resp. remove a redundant variable and
while being at it use more unform loop constructs.
Fix this sparse warning:
drivers/net/tulip/de4x5.c:3944:13: warning: symbol 'i' shadows an earlier one
drivers/net/tulip/de4x5.c:3938:9: originally declared here
drivers/net/t... | ```diff
diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c
index 98e86826b2c7..6430a2ec6db1 100644
--- a/drivers/net/tulip/de4x5.c
+++ b/drivers/net/tulip/de4x5.c
@@ -3942,8 +3942,8 @@ PCI_signature(char *name, struct de4x5_private *lp)
strcpy(name, "DE434/5");
return status;
} else { ... |
65d9b8b19dd21eeff8c051484b9e972e0b932ff2 | Analyze and fix the following issue in the Linux kernel code: drivers/net/tulip: fix warning: format not a string literal and no ... | Problem Details:
Impact: Use 'static const char[]' instead of 'static char[]' and while
being at it add a KERN_INFO prefix.
Fix this warning:
drivers/net/tulip/de4x5.c: In function 'de4x5_hw_init':
drivers/net/tulip/de4x5.c:1268: warning: format not a string literal and no format arguments
drivers/net/tulip/winb... | ```diff
diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c
index 6418f74415d7..98e86826b2c7 100644
--- a/drivers/net/tulip/de4x5.c
+++ b/drivers/net/tulip/de4x5.c
@@ -479,7 +479,8 @@
#include "de4x5.h"
-static char version[] __devinitdata = "de4x5.c:V0.546 2001/02/22 davies@maniac.ultranet.com\n";
... |
05076c1824a5cc164c3d714f7b16ac61cb9bbbf5 | Analyze and fix the following issue in the Linux kernel code: drivers/net/tokenring: fix sparse warning: symbol shadows an earlier one | Problem Details:
Impact: Remove redundant variables.
Fix this sparse warnings:
drivers/net/tokenring/lanstreamer.c:619:21: warning: symbol 'i' shadows an earlier one
drivers/net/tokenring/lanstreamer.c:589:13: originally declared here
drivers/net/tokenring/madgemc.c:695:34: warning: symbol 'tp' shadows an earlie... | ```diff
diff --git a/drivers/net/tokenring/lanstreamer.c b/drivers/net/tokenring/lanstreamer.c
index 0b2b7925da22..f309b8f703bd 100644
--- a/drivers/net/tokenring/lanstreamer.c
+++ b/drivers/net/tokenring/lanstreamer.c
@@ -616,8 +616,6 @@ static int streamer_open(struct net_device *dev)
printk("SISR Mask = %04x\n", r... |
1770e430ca1361fb8143c328037d1a3f34391602 | Analyze and fix the following issue in the Linux kernel code: drivers/net/tokenring: fix warning: format not a string literal and no ... | Problem Details:
Impact: Use 'static const char[]' instead of 'static char[]'.
Fix this warnings:
drivers/net/tokenring/smctr.c:3644: warning: format not a string literal and no format arguments
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c
index 50eb29ce3c87..a8a5b4c4bd4d 100644
--- a/drivers/net/tokenring/smctr.c
+++ b/drivers/net/tokenring/smctr.c
@@ -61,7 +61,8 @@
#include "smctr.h" /* Our Stuff */
-static char version[] __initdata = KERN_INFO "smctr.... |
6e470d261326801ff823a3b7a49581a8baae8698 | Analyze and fix the following issue in the Linux kernel code: drivers/net/skfp: fix sparse warning: Should it be static? | Problem Details:
Impact: Move function declarations to header file.
Fix this sparse warnings:
drivers/net/skfp/cfm.c:146:6: warning: symbol 'all_selection_criteria' was not declared. Should it be static?
drivers/net/skfp/drvfbi.c:186:6: warning: symbol 'mac1_irq' was not declared. Should it be static?
drivers/ne... | ```diff
diff --git a/drivers/net/skfp/h/smc.h b/drivers/net/skfp/h/smc.h
index 94325915e0d5..1758d9548361 100644
--- a/drivers/net/skfp/h/smc.h
+++ b/drivers/net/skfp/h/smc.h
@@ -467,5 +467,22 @@ struct s_smc {
#endif /* DEBUG_BRD && DEBUG */
} ;
+extern const struct fddi_addr fddi_broadcast;
+
+extern void all_sel... |
37d37695ef34b04ecf20586c12ec0c932283a130 | Analyze and fix the following issue in the Linux kernel code: drivers/net/sfc: fix sparse warning: symbol shadows an earlier one | Problem Details:
Impact: Move variable declaration as close to their usage as possible.
Fix this sparse warning:
drivers/net/sfc/tenxpress.c:589:22: warning: symbol 'link_ok' shadows an earlier one
drivers/net/sfc/tenxpress.c:575:30: originally declared here
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acke... | ```diff
diff --git a/drivers/net/sfc/tenxpress.c b/drivers/net/sfc/tenxpress.c
index ac9eeab79f20..5b0f45166628 100644
--- a/drivers/net/sfc/tenxpress.c
+++ b/drivers/net/sfc/tenxpress.c
@@ -572,15 +572,14 @@ static void tenxpress_phy_reconfigure(struct efx_nic *efx)
static void tenxpress_phy_poll(struct efx_nic *efx)... |
6ae038512ced0f179abd4d2387786cc69d2fb801 | Analyze and fix the following issue in the Linux kernel code: drivers/net/pcmcia: fix warning: format not a string literal and no ... | Problem Details:
Impact: Use 'static const char[]' instead of 'static char[]' and while
being at it prefix the message with KERN_INFO.
Fix this warnings:
drivers/net/pcmcia/axnet_cs.c:1716: warning: format not a string literal and no format arguments
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by:... | ```diff
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
index 0afa72095810..871ad2958ff6 100644
--- a/drivers/net/pcmcia/axnet_cs.c
+++ b/drivers/net/pcmcia/axnet_cs.c
@@ -861,7 +861,7 @@ module_exit(exit_axnet_cs);
*/
-static const char *version_8390 =
+static const char version_8390[... |
1aef47c411f4b4b6bb9c8ebcdb703d3a20de1551 | Analyze and fix the following issue in the Linux kernel code: drivers/net/ixgbe: fix sparse warning: Should it be static? | Problem Details:
Impact: Make symbol static.
Fix this sparse warning:
drivers/net/ixgbe/ixgbe_82598.c:59:5: warning: symbol 'ixgbe_get_pcie_msix_count_82598' was not declared. Should it be static?
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Si... | ```diff
diff --git a/drivers/net/ixgbe/ixgbe_82598.c b/drivers/net/ixgbe/ixgbe_82598.c
index 525bd87fea56..51dba1c78e1e 100644
--- a/drivers/net/ixgbe/ixgbe_82598.c
+++ b/drivers/net/ixgbe/ixgbe_82598.c
@@ -56,7 +56,7 @@ static s32 ixgbe_read_i2c_eeprom_82598(struct ixgbe_hw *hw, u8 byte_offset,
* Read PCIe configur... |
886a63e865eb346ab20572e802fc3118cb9aee14 | Analyze and fix the following issue in the Linux kernel code: drivers/net/hamradio: fix sparse warnings: fix signedness | Problem Details:
Fix this sparse warnings:
drivers/net/hamradio/hdlcdrv.c:274:34: warning: incorrect type in argument 2 (different signedness)
drivers/net/hamradio/hdlcdrv.c:279:47: warning: incorrect type in argument 2 (different signedness)
drivers/net/hamradio/hdlcdrv.c:288:39: warning: incorrect type in argum... | ```diff
diff --git a/include/linux/hdlcdrv.h b/include/linux/hdlcdrv.h
index 0821bac62b83..c010b4a785b8 100644
--- a/include/linux/hdlcdrv.h
+++ b/include/linux/hdlcdrv.h
@@ -215,7 +215,7 @@ struct hdlcdrv_state {
struct hdlcdrv_hdlctx {
struct hdlcdrv_hdlcbuffer hbuf;
- long in_hdlc_tx;
+ unsigned long in_hdl... |
9b329f18b943fb5648c10f79690918b9056dd5c5 | Analyze and fix the following issue in the Linux kernel code: drivers/net/hamradio: fix sparse warning: symbol shadows an earlier one | Problem Details:
Impact: Rename inner scrope variable.
Fix this sparse warning:
drivers/net/hamradio/yam.c:856:35: warning: symbol 'dev' shadows an earlier one
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c
index a54b865c2080..500a40b2afe7 100644
--- a/drivers/net/hamradio/yam.c
+++ b/drivers/net/hamradio/yam.c
@@ -854,10 +854,10 @@ static int yam_open(struct net_device *dev)
/* Reset overruns for all ports - FPGA programming makes overruns *... |
e334f564e83c4aa6db4259b5d7e62d1b5032faf2 | Analyze and fix the following issue in the Linux kernel code: drivers/net/hamradio: fix sparse warning: context imbalance | Problem Details:
Impact: Attribute functions with __acquires(...) resp. __releases(...).
Fix this sparse warnings:
drivers/net/hamradio/bpqether.c:387:13: warning: context imbalance in 'bpq_seq_start' - wrong count at exit
drivers/net/hamradio/bpqether.c:419:13: warning: context imbalance in 'bpq_seq_stop' - unexp... | ```diff
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c
index 723e9c11f1ab..44b183b58f50 100644
--- a/drivers/net/hamradio/bpqether.c
+++ b/drivers/net/hamradio/bpqether.c
@@ -386,6 +386,7 @@ static int bpq_close(struct net_device *dev)
* Proc filesystem
*/
static void *bpq_seq_start... |
eb33ae248682ecfdf44d693c72bc4f523f2fb6e3 | Analyze and fix the following issue in the Linux kernel code: drivers/net/hamradio: fix warning: format not a string literal and no ... | Problem Details:
Impact: Use 'static const char[]' instead of 'static char[]' and while
being at it fix an issue in 'mkiss_init_driver', where in case of an
error the status code was not passed to printk.
Fix this warnings:
drivers/net/hamradio/6pack.c: In function 'sixpack_init_driver':
drivers/net/hamradio/6pack... | ```diff
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
index 3da9f394b4c6..155160052c8b 100644
--- a/drivers/net/hamradio/6pack.c
+++ b/drivers/net/hamradio/6pack.c
@@ -790,9 +790,9 @@ static struct tty_ldisc_ops sp_ldisc = {
/* Initialize 6pack control device -- register 6pack line discipl... |
f6370117958d67608225d5e3b55e3ad2080640e8 | Analyze and fix the following issue in the Linux kernel code: drivers/net/e1000e: fix sparse warning: Should it be static? | Problem Details:
Impact: Make symbol static.
Fix this sparse warning:
drivers/net/e1000e/82571.c:1229:5: warning: symbol 'e1000_check_for_serdes_link_82571' was not declared. Should it be static?
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/e1000e/82571.c b/drivers/net/e1000e/82571.c
index 565fd4e8f951..51f8e84bd4a3 100644
--- a/drivers/net/e1000e/82571.c
+++ b/drivers/net/e1000e/82571.c
@@ -1226,7 +1226,7 @@ static s32 e1000_setup_fiber_serdes_link_82571(struct e1000_hw *hw)
* Checks for link up on the hardware. If li... |
a243f848ce0e16f7919d683fdfd4c8ea378fe25d | Analyze and fix the following issue in the Linux kernel code: drivers/net/cxgb3: fix sparse warnings: fix signedness | Problem Details:
Fix this sparse warning:
drivers/net/cxgb3/ael1002.c:1010:60: warning: incorrect type in argument 4 (different signedness)
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/cxgb3/ael1002.c b/drivers/net/cxgb3/ael1002.c
index 5c3c05da4d96..e1b22490ff59 100644
--- a/drivers/net/cxgb3/ael1002.c
+++ b/drivers/net/cxgb3/ael1002.c
@@ -1005,7 +1005,8 @@ static int ael2005_reset(struct cphy *phy, int wait)
{ 0, 0, 0, 0 }
};
- int err, lasi_ctrl;
+ int err;
... |
97915b5bf6454416c7b27444fc95c08132b74251 | Analyze and fix the following issue in the Linux kernel code: drivers/net/cxgb3: fix sparse warning: symbol shadows an earlier one | Problem Details:
Impact: Move variable declaration as close to usage as possible.
Fix this sparse warning:
drivers/net/cxgb3/cxgb3_main.c:1586:21: warning: symbol 'cap' shadows an earlier one
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <... | ```diff
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
index f2c7cc3e263a..0f6062aaa2c6 100644
--- a/drivers/net/cxgb3/cxgb3_main.c
+++ b/drivers/net/cxgb3/cxgb3_main.c
@@ -1565,7 +1565,6 @@ static int speed_duplex_to_caps(int speed, int duplex)
static int set_settings(struct net_device... |
54b87323eddd9b7854249f05cfd183a0ac602ab6 | Analyze and fix the following issue in the Linux kernel code: drivers/net/bonding: fix sparse warning: symbol shadows an earlier one | Problem Details:
Impact: Rename function scope variable.
Fix this sparse warning:
drivers/net/bonding/bond_main.c:4704:13: warning: symbol 'mode' shadows an earlier one
drivers/net/bonding/bond_main.c:95:13: originally declared here
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller... | ```diff
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index d7695d43158b..2c96b93b12a5 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4732,7 +4732,7 @@ static void bond_free_all(void)
*/
int bond_parse_parm(const char *buf, const struct bond_pa... |
1f78d9f94539b8806b81057e75025f2bac7d7ccc | Analyze and fix the following issue in the Linux kernel code: drivers/net/bonding: fix sparse warnings: context imbalance | Problem Details:
Impact: Attribute functions with __acquires(...) and/or __releases(...).
Fix this sparse warnings:
drivers/net/bonding/bond_alb.c:1675:9: warning: context imbalance in 'bond_alb_handle_active_change' - unexpected unlock
drivers/net/bonding/bond_alb.c:1742:9: warning: context imbalance in 'bond_alb... | ```diff
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index 409b14074275..8dc6fbb9a41e 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -1628,6 +1628,10 @@ void bond_alb_handle_link_change(struct bonding *bond, struct slave *slave, char
* no other lock... |
b79d8fff0e54a19e96cbde2b1f79e0fd503c2c53 | Analyze and fix the following issue in the Linux kernel code: drivers/net/atlx: fix sparse warnings: fix signedness | Problem Details:
Impact: While being at it: statics do not need to be initialized with 0.
Fix this sparse warnings:
drivers/net/atlx/atl1.c:109:1: warning: incorrect type in initializer (different signedness)
drivers/net/atlx/atl2.c:2870:1: warning: incorrect type in initializer (different signedness)
drivers/ne... | ```diff
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index c0ceee0d7c80..43fc1b2ca3cd 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -105,7 +105,7 @@
* Default Value: 100 (200us)
*/
static int __devinitdata int_mod_timer[ATL1_MAX_NIC+1] = ATL1_PARAM_INIT;
-static int num_in... |
fd8ef49edd81405e80e00eb81365ae4d6733d602 | Analyze and fix the following issue in the Linux kernel code: drivers/net/atl1e: fix sparse warnings: fix signedness | Problem Details:
Fix this sparse warnings:
drivers/net/atl1e/atl1e_main.c:716:39: warning: incorrect type in argument 2 (different signedness)
drivers/net/atl1e/atl1e_param.c:57:1: warning: incorrect type in initializer (different signedness)
drivers/net/atl1e/atl1e_param.c:68:1: warning: incorrect type in initia... | ```diff
diff --git a/drivers/net/atl1e/atl1e.h b/drivers/net/atl1e/atl1e.h
index c49550d507a0..2bf63b4368e2 100644
--- a/drivers/net/atl1e/atl1e.h
+++ b/drivers/net/atl1e/atl1e.h
@@ -448,7 +448,7 @@ struct atl1e_adapter {
/* All Descriptor memory */
dma_addr_t ring_dma;
void *ring_vir_addr;
- int ... |
18c4c35ecbeda253ce7532a6ed7f2fa144147d64 | Analyze and fix the following issue in the Linux kernel code: drivers/net/arcnet: fix sparse warning: symbol shadows an earlier one | Problem Details:
Impact: Remove redundant inner scope variable.
Fix this sparse warning:
drivers/net/arcnet/arcnet.c:383:21: warning: symbol 'count' shadows an earlier one
drivers/net/arcnet/arcnet.c:375:13: originally declared here
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller... | ```diff
diff --git a/drivers/net/arcnet/arcnet.c b/drivers/net/arcnet/arcnet.c
index a80d4a30a464..d6d4ab3b430c 100644
--- a/drivers/net/arcnet/arcnet.c
+++ b/drivers/net/arcnet/arcnet.c
@@ -380,7 +380,6 @@ int arcnet_open(struct net_device *dev)
return -ENODEV;
BUGLVL(D_PROTO) {
- int count;
BUGMSG(D_PROTO,... |
8d668bfef68b35f7eedcc70fd5c47cdb24f406cc | Analyze and fix the following issue in the Linux kernel code: drivers/net/s2io.c: fix sparse warning: symbol shadows an earlier one | Problem Details:
Impact: Remove redundant inner scope variable.
Fix this sparse warning:
drivers/net/s2io.c:7223:21: warning: symbol 'i' shadows an earlier one
drivers/net/s2io.c:7184:13: originally declared here
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.ne... | ```diff
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 5cd2291bc0bc..16868b7a5d0a 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -7220,7 +7220,6 @@ static int s2io_card_up(struct s2io_nic * sp)
/* Initialise napi */
if (config->napi) {
- int i;
if (config->intr_type == MSI_X) {
f... |
5b5103ec2dba07a15861e81cb783dd0fbaed24ed | Analyze and fix the following issue in the Linux kernel code: drivers/net/r6040.c: fix sparse warning: Using plain integer as NULL pointer | Problem Details:
Fix this sparse warnings:
drivers/net/r6040.c:487:31: warning: Using plain integer as NULL pointer
drivers/net/r6040.c:492:31: warning: Using plain integer as NULL pointer
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Mi... | ```diff
diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c
index 3c27a7bfea49..9c95ebe643a3 100644
--- a/drivers/net/r6040.c
+++ b/drivers/net/r6040.c
@@ -484,12 +484,12 @@ static int r6040_close(struct net_device *dev)
/* Free Descriptor memory */
if (lp->rx_ring) {
pci_free_consistent(pdev, RX_DESC_SIZE, l... |
d6781f2af8567524f8c95d9907718a6c61fe417d | Analyze and fix the following issue in the Linux kernel code: drivers/net/ppp*.c: fix sparse warnings: fix signedness | Problem Details:
Fix this sparse warnings:
drivers/net/ppp_generic.c:919:43: warning: incorrect type in argument 1 (different signedness)
drivers/net/pppoe.c:1195:43: warning: incorrect type in argument 1 (different signedness)
drivers/net/pppol2tp.c:2666:43: warning: incorrect type in argument 1 (different signe... | ```diff
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
index fddc8493f35c..81e7fcced4b9 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -183,7 +183,7 @@ static atomic_t ppp_unit_count = ATOMIC_INIT(0);
static atomic_t channel_count = ATOMIC_INIT(0);
/* per-net private d... |
416c6f90f8a107ccae3788bb9798d10a2dac9ed0 | Analyze and fix the following issue in the Linux kernel code: drivers/net/ni65.c: fix sparse warnings: fix signedness | Problem Details:
Fix this sparse warnings:
drivers/net/ni65.c:488:36: warning: incorrect type in argument 2 (different signedness)
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/ni65.c b/drivers/net/ni65.c
index d769a88ddc98..df5f869e8d8f 100644
--- a/drivers/net/ni65.c
+++ b/drivers/net/ni65.c
@@ -481,8 +481,9 @@ static int __init ni65_probe1(struct net_device *dev,int ioaddr)
else {
if(dev->dma == 0) {
/* 'stuck test' from lance.c */
- long dma_chan... |
00137dad17707f0d14dbf7e193761220f1c2fe03 | Analyze and fix the following issue in the Linux kernel code: drivers/net/lance.c: fix sparse warnings: fix signedness | Problem Details:
Impact: Besides from fixing the signedness issue remove some
whitespace to obey to the 80 character limit.
Fix this sparse warnings:
drivers/net/lance.c:399:19: warning: incorrect type in assignment (different signedness)
drivers/net/lance.c:654:29: warning: incorrect type in argument 2 (different... | ```diff
diff --git a/drivers/net/lance.c b/drivers/net/lance.c
index d7afb938ea62..d83d4010656d 100644
--- a/drivers/net/lance.c
+++ b/drivers/net/lance.c
@@ -391,7 +391,8 @@ MODULE_LICENSE("GPL");
*/
static int __init do_lance_probe(struct net_device *dev)
{
- int *port, result;
+ unsigned int *port;
+ int resul... |
7c34eb897362a51133222ef4229628469333f4d9 | Analyze and fix the following issue in the Linux kernel code: drivers/net/niu.c: fix sparse warning: symbol shadows an earlier one | Problem Details:
Impact: Move variable declaration to a more inner scope.
Fix this sparse warning:
drivers/net/niu.c:2399:21: warning: symbol 'err' shadows an earlier one
drivers/net/niu.c:2287:13: originally declared here
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@da... | ```diff
diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index c26325ded20e..32374a1c123b 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -2284,7 +2284,6 @@ static int serdes_init_10g_serdes(struct niu *np)
struct niu_link_config *lp = &np->link_config;
unsigned long ctrl_reg, test_cfg_reg, pll_cfg, i;
... |
5d7dce76c51a590fdd7616285a96825aa517ede0 | Analyze and fix the following issue in the Linux kernel code: drivers/net/ns83820.c: fix sparse warnings: fix signedness | Problem Details:
Fix this sparse warnings:
drivers/net/ns83820.c:479:36: warning: incorrect type in argument 2 (different signedness)
drivers/net/ns83820.c:479:36: warning: incorrect type in argument 2 (different signedness)
drivers/net/ns83820.c:479:36: warning: incorrect type in argument 2 (different signedness... | ```diff
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c
index e80294d8cc19..9266502b5588 100644
--- a/drivers/net/ns83820.c
+++ b/drivers/net/ns83820.c
@@ -409,7 +409,7 @@ static int lnksts = 0; /* CFG_LNKSTS bit polarity */
struct rx_info {
spinlock_t lock;
int up;
- long idle;
+ unsigned long idle;... |
fbf978914e8fbc804ddbd68550bb2c7d14b2049d | Analyze and fix the following issue in the Linux kernel code: drivers/net/ni65.c: fix sparse warnings: symbol shadows an earlier one | Problem Details:
Impact: Remove redundant variable declaration or move them to a more
inner scope.
Fix this sparse warnings:
drivers/net/ni65.c:900:37: warning: symbol 'p' shadows an earlier one
drivers/net/ni65.c:874:21: originally declared here
drivers/net/ni65.c:925:21: warning: symbol 'p' shadows an earlier ... | ```diff
diff --git a/drivers/net/ni65.c b/drivers/net/ni65.c
index 254057275e0e..d769a88ddc98 100644
--- a/drivers/net/ni65.c
+++ b/drivers/net/ni65.c
@@ -897,7 +897,6 @@ static irqreturn_t ni65_interrupt(int irq, void * dev_id)
if(csr0 & CSR0_ERR)
{
- struct priv *p = dev->ml_priv;
if(debuglevel > 1)
... |
f11bf7a31e9a3dccf893e0fceeb1d7d9fd4dfcb4 | Analyze and fix the following issue in the Linux kernel code: drivers/net/e2100.c: fix sparse warning: symbol shadows an earlier one | Problem Details:
Impact: Remove redundant inner scope variable and while being at it
make use of ARRAY_SIZE instead of a hardcoded number.
Fix this sparse warning:
drivers/net/e2100.c:219:56: warning: symbol 'i' shadows an earlier one
drivers/net/e2100.c:181:13: originally declared here
Signed-off-by: Hannes Eder... | ```diff
diff --git a/drivers/net/e2100.c b/drivers/net/e2100.c
index b07ba1924de0..d2f6ee1a6290 100644
--- a/drivers/net/e2100.c
+++ b/drivers/net/e2100.c
@@ -216,13 +216,13 @@ static int __init e21_probe1(struct net_device *dev, int ioaddr)
printk(" %02X", station_addr[i]);
if (dev->irq < 2) {
- int irqlist[] ... |
1256f7394cc08c60d4502a2f08d7260f3fd97d56 | Analyze and fix the following issue in the Linux kernel code: drivers/net/at1700.c: fix sparse warning: symbol shadows an earlier one | Problem Details:
Impact: Move variable declaration to a more inner scope.
Fix this sparse warning:
drivers/net/at1700.c:846:21: warning: symbol 'i' shadows an earlier one
drivers/net/at1700.c:831:13: originally declared here
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@... | ```diff
diff --git a/drivers/net/at1700.c b/drivers/net/at1700.c
index 72ea6e378f8d..ced70799b898 100644
--- a/drivers/net/at1700.c
+++ b/drivers/net/at1700.c
@@ -828,7 +828,6 @@ set_rx_mode(struct net_device *dev)
struct net_local *lp = netdev_priv(dev);
unsigned char mc_filter[8]; /* Multicast hash filter */
... |
3494252d5644993f407a45f01c3e8ad5ae38f93c | Analyze and fix the following issue in the Linux kernel code: USB/PCI: Fix resume breakage of controllers behind cardbus bridges | Problem Details:
If a USB PCI controller is behind a cardbus bridge, we are trying to
restore its configuration registers too early, before the cardbus
bridge is operational. To fix this, call pci_restore_state() from
usb_hcd_pci_resume() and remove usb_hcd_pci_resume_early() which is
no longer necessary (the configur... | ```diff
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
index c54fc40458b1..a4301dc02d27 100644
--- a/drivers/usb/core/hcd-pci.c
+++ b/drivers/usb/core/hcd-pci.c
@@ -297,19 +297,6 @@ int usb_hcd_pci_suspend(struct pci_dev *dev, pm_message_t message)
}
EXPORT_SYMBOL_GPL(usb_hcd_pci_suspend);
-/*... |
ef41df4344ff952c79746d44a6126bd2cf7ed2bc | Analyze and fix the following issue in the Linux kernel code: x86, mce: fix a race condition in mce_read() | Problem Details:
Impact: bugfix
Considering the situation as follow:
before: mcelog.next == 1, mcelog.entry[0].finished = 1
+--------------------------------------------------------------------------
R W1 W2 W3
read mcelog.next (1)
mcelog.next+... | ```diff
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c
index 1db94c0d5aaf..870d08deccf7 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_64.c
@@ -595,7 +595,7 @@ static ssize_t mce_read(struct file *filp, char __user *ubuf, size_t usize,
{
... |
d6b75584a3eaab8cb2ab3e8cf90c5e57c1928a85 | Analyze and fix the following issue in the Linux kernel code: x86, mce: disable machine checks on offlined CPUs | Problem Details:
Impact: Lower priority bug fix
Offlined CPUs could still get machine checks, but the machine check handler
cannot handle them properly, leading to an unconditional crash. Disable
machine checks on CPUs that are going down.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Thomas Gleixner <tglx... | ```diff
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c
index 4e2b1bc5131c..1db94c0d5aaf 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_64.c
@@ -906,6 +906,27 @@ static __cpuinit void mce_remove_device(unsigned int cpu)
cpu_clear(cpu, mce_d... |
5b4408fdaa62474dd9485cddb9126370d90d4b82 | Analyze and fix the following issue in the Linux kernel code: x86, mce: don't set up mce sysdev devices with mce=off | Problem Details:
Impact: bug fix, in this case the resume handler shouldn't run which
avoids incorrectly reenabling machine checks on resume
When MCEs are completely disabled on the command line don't set
up the sysdev devices for them either.
Includes a comment fix from Thomas Gleixner.
Signed-off-by: Andi Kleen <... | ```diff
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c
index 3f0550d16f3c..4e2b1bc5131c 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_64.c
@@ -151,6 +151,8 @@ static void mce_panic(char *msg, struct mce *backup, unsigned long start)
stat... |
52d168e28bc11dd026b620fe1767cadde5a747cd | Analyze and fix the following issue in the Linux kernel code: x86, mce: switch machine check polling to per CPU timer | Problem Details:
Impact: Higher priority bug fix
The machine check poller runs a single timer and then broadcasted an
IPI to all CPUs to check them. This leads to unnecessary
synchronization between CPUs. The original CPU running the timer has
to wait potentially a long time for all other CPUs answering. This is
also ... | ```diff
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c
index 18b379cf0610..3f0550d16f3c 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_64.c
@@ -353,18 +353,17 @@ void mce_log_therm_throt_event(unsigned int cpu, __u64 status)
static int ch... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.