id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
df054e1d00fdafa2e2920319df326ddb3f0d0413
Analyze and fix the following issue in the Linux kernel code: [CCID2]: Don't assign negative values to Ack Ratio
Problem Details: Since it makes not sense to assign negative values to Ack Ratio, this patch disallows this possibility. As a consequence, a Bug test for negative Ack Ratio values becomes obsolete. Furthermore, a check against overflow (as Ack Ratio may not exceed 2 bytes, due to RFC 4340, 11.3) has been added. Sign...
```diff diff --git a/net/dccp/ccids/ccid2.c b/net/dccp/ccids/ccid2.c index 55522182f2fa..f18235e8ce84 100644 --- a/net/dccp/ccids/ccid2.c +++ b/net/dccp/ccids/ccid2.c @@ -140,7 +140,7 @@ static int ccid2_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb) return 1; /* XXX CCID should dequeue when ready instead of...
cfbbeabc8864902c4af1c0cadf0972b352930a26
Analyze and fix the following issue in the Linux kernel code: [CCID2]: Fix sequence number arithmetic/comparisons
Problem Details: This replaces use of normal subtraction with modulo-48 subtraction. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/dccp/ccids/ccid2.c b/net/dccp/ccids/ccid2.c index 7873dc78b6bc..55522182f2fa 100644 --- a/net/dccp/ccids/ccid2.c +++ b/net/dccp/ccids/ccid2.c @@ -24,9 +24,6 @@ /* * This implementation should follow RFC 4341 - * - * BUGS: - * - sequence number wrapping */ #include "../ccid.h" @@ -619,...
3de5489f47febe0333b142e0eb6389b9924b2634
Analyze and fix the following issue in the Linux kernel code: [CCID2]: Bug in reading Ack Vectors
Problem Details: In CCID2 the receiver-history is sorted in ascending order of sequence number, but the processing of received Ack Vectors requires the list traversal in the opposite direction. The current code has a bug in this regard: the list traversal is upwards. As a consequence, only Ack Vectors with a run lengt...
```diff diff --git a/net/dccp/ccids/ccid2.c b/net/dccp/ccids/ccid2.c index c9c465e86281..7873dc78b6bc 100644 --- a/net/dccp/ccids/ccid2.c +++ b/net/dccp/ccids/ccid2.c @@ -666,7 +666,7 @@ static void ccid2_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb) done = 1; break; } - seqp = seqp->ccid2...
e7d0362dd41e760f340c1b500646cc92522bd9d5
Analyze and fix the following issue in the Linux kernel code: [PCOUNTER] Fix build error without CONFIG_SMP
Problem Details: I keep getting this build error and couldn't find anyone fixing it in archives. ...Maybe all net developers except me build just SMP kernels :-). In file included from include/net/sock.h:50, from ipc/mqueue.c:35: include/linux/pcounter.h: In function 'pcounter_add': include/linux/pcou...
```diff diff --git a/include/linux/pcounter.h b/include/linux/pcounter.h index 620aaded4e94..9c4760a328f3 100644 --- a/include/linux/pcounter.h +++ b/include/linux/pcounter.h @@ -84,7 +84,7 @@ static inline int pcounter_getval(const struct pcounter *self) static inline void pcounter_add(struct pcounter *self, int in...
a5358fdc9c52e44d79dcd144375e089e166508d7
Analyze and fix the following issue in the Linux kernel code: [CCID3]: Accurately determine idle & application-limited periods
Problem Details: This fixes/updates the handling of idle and application-limited periods in CCID3, which currently is broken: there is no detection as to how long a sender has been idle - there is only one flag which is toggled in between function calls. Being obsolete now, the `idle' flag is removed. Signed-off-by: ...
```diff diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index c025236ce49b..94a322863844 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c @@ -119,6 +119,13 @@ static inline void ccid3_update_send_interval(struct ccid3_hc_tx_sock *hctx) } +static u32 ccid3_hc_tx_idle_rtt(struct ccid3_hc...
eb279b79c46be767ecffadaa8ed6be3e3555e93d
Analyze and fix the following issue in the Linux kernel code: [CCID3]: Ignore trivial amounts of elapsed time
Problem Details: This patch fixes a previously undiscovered bug; the problem is in computing the elapsed time as the time between `receiving' the packet (i.e. skb enters CCID module) and sending feedback: - there is no layer-processing, queueing, or delay involved, - hence the elapsed time is in the order of...
```diff diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index 5bf110b28abc..c025236ce49b 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c @@ -744,11 +744,6 @@ static void ccid3_hc_rx_send_feedback(struct sock *sk) hcrx->ccid3hcrx_ccval_last_counter = packet->dccphrx_ccval; hcrx->ccid3...
69d6da0b0faa70249a243a14e6066c013e9294e5
Analyze and fix the following issue in the Linux kernel code: [IPv6] RAW: Compact the API for the kernel
Problem Details: Same as in the previous patch for ipv4, compact the API and hide hash table and rwlock inside the raw.c file. Plus fix some "bad" places from checkpatch.pl point of view (assignments inside if()). Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/net/rawv6.h b/include/net/rawv6.h index a5819891d525..8a22599f26ba 100644 --- a/include/net/rawv6.h +++ b/include/net/rawv6.h @@ -5,26 +5,13 @@ #include <net/protocol.h> -#define RAWV6_HTABLE_SIZE MAX_INET_PROTOS -extern struct hlist_head raw_v6_htable[RAWV6_HTABLE_SIZE]; -extern rwloc...
4195e31780a20e09c6e793c2d96390e05309e226
Analyze and fix the following issue in the Linux kernel code: [CAN]: Fix plain integer definitions in userspace header.
Problem Details: This patch fixes the use of plain integers instead of __u32 in a struct that is visible from kernel space and user space. Thanks to Sam Ravnborg for pointing out the wrong plain int usage. Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Da...
```diff diff --git a/include/linux/can/bcm.h b/include/linux/can/bcm.h index 7ade33a0ff03..7f293273c444 100644 --- a/include/linux/can/bcm.h +++ b/include/linux/can/bcm.h @@ -26,12 +26,12 @@ * @frames: array of CAN frames. */ struct bcm_msg_head { - int opcode; - int flags; - int count; + __u32 opcode; + __u32 ...
c0ef877b2c9f543e9fb7953bfe1a0cd3a4eae362
Analyze and fix the following issue in the Linux kernel code: [NET]: Move sock_valbool_flag to socket.c
Problem Details: The sock_valbool_flag() helper is used in setsockopt to set or reset some flag on the sock. This helper is required in the net/socket.c only, so move it there. Besides, patch two places in sys_setsockopt() that repeat this helper functionality manually. Since this is not a bugfix, but a trivial clean...
```diff diff --git a/include/net/sock.h b/include/net/sock.h index f5b643714131..9c55af8e5f81 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -1396,14 +1396,6 @@ extern int net_msg_warn; lock_sock(sk); \ } -static inline void sock_valbool_flag(struct sock *sk, int bit, int valbool) -{ - if (valb...
25ee3286dcbc830a833354bb1d15567956844813
Analyze and fix the following issue in the Linux kernel code: [IPSEC]: Merge common code into xfrm_bundle_create
Problem Details: Half of the code in xfrm4_bundle_create and xfrm6_bundle_create are common. This patch extracts that logic and puts it into xfrm_bundle_create. The rest of it are then accessed through afinfo. As a result this fixes the problem with inter-family transforms where we treat every xfrm dst in the bundle...
```diff diff --git a/include/net/xfrm.h b/include/net/xfrm.h index d427343f527b..c9345fe3f8d2 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -227,6 +227,7 @@ struct km_event u32 event; }; +struct net_device; struct xfrm_type; struct xfrm_dst; struct xfrm_policy_afinfo { @@ -237,13 +238,11 @@ struct...
fff693888012806370c98c601fbaa141fb12dfca
Analyze and fix the following issue in the Linux kernel code: [IPSEC]: Make sure idev is consistent with dev in xfrm_dst
Problem Details: Previously we took the device from the bottom route and idev from the top route. This is bad because idev may well point to a different device. This patch changes it so that we get the idev from the device directly. It also makes it an error if either dev or idev is NULL. This is consistent with th...
```diff diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c index c40a71b74dba..d903c8bdffcd 100644 --- a/net/ipv4/xfrm4_policy.c +++ b/net/ipv4/xfrm4_policy.c @@ -153,14 +153,21 @@ __xfrm4_bundle_create(struct xfrm_policy *policy, struct xfrm_state **xfrm, int dst_prev = *dst_p; i = 0; + err = -ENODEV...
e241a630374e06aecdae2884af8b652d3b4d6c37
Analyze and fix the following issue in the Linux kernel code: kbuild: warn about ld added unique sections
Problem Details: If there is a mixture of specifying sections for code in gcc and assembler then if the assembler code do not add the "ax" flags the linker will see this as two different sections and generate unique sections for each. ld does so by adding a dot and a number. Teach modpost to warn if a section shows up ...
```diff diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 3cf1ba8220d2..f8efc93eb700 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -696,6 +696,43 @@ int match(const char *sym, const char * const pat[]) static const char *section_white_list[] = { ".debug*", ".stab*", ".note*", ".got...
588ccd732ba2d32db8228802ef9283b583d3395f
Analyze and fix the following issue in the Linux kernel code: kbuild: add verbose option to Section mismatch reporting in modpost
Problem Details: If the config option CONFIG_SECTION_MISMATCH is not set and we see a Section mismatch present the following to the user: modpost: Found 1 section mismatch(es). To see additional details select "Enable full Section mismatch analysis" in the Kernel Hacking menu (CONFIG_SECTION_MISMATCH). If the option ...
```diff diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 748e72be6e68..c4ecb2994ba3 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -108,6 +108,8 @@ config DEBUG_SECTION_MISMATCH will tell where the mismatch happens much closer to the source. The drawback is that we will report the same ...
f5eaa323eb6819d2f737ead42464efccaf2b98b9
Analyze and fix the following issue in the Linux kernel code: kconfig: tristate choices with mixed tristate and boolean values
Problem Details: Change kconfig behavior so that mixing bool and tristate config settings in a choice is possible and has the desired effect of offering just the tristate options individually if the choice gets set to M, and a normal boolean selection if the choice gets set to Y. Also fix scripts/kconfig/conf's handli...
```diff diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index d1a0368bd438..fda63136ae68 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -400,9 +400,9 @@ static int conf_choice(struct menu *menu) continue; } sym_set_choice_value(sym, child->sym); - if (child->list) { + for (...
91341d4b2c196c689acf90e9e96f28f8d5c6665f
Analyze and fix the following issue in the Linux kernel code: kbuild: introduce new option to enhance section mismatch analysis
Problem Details: Setting the option DEBUG_SECTION_MISMATCH will report additional section mismatch'es but this should in the end makes it possible to get rid of all of them. See help text in lib/Kconfig.debug for details. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/Makefile b/Makefile index 6847464402aa..8533f258c0e4 100644 --- a/Makefile +++ b/Makefile @@ -520,6 +520,11 @@ KBUILD_CFLAGS += -g KBUILD_AFLAGS += -gdwarf-2 endif +# We trigger additional mismatches with less inlining +ifdef CONFIG_DEBUG_SECTION_MISMATCH +KBUILD_CFLAGS += $(call cc-option, -fn...
d1f25e6658943569f2713dfde1b9d74e2f6c7243
Analyze and fix the following issue in the Linux kernel code: kbuild: fix so modpost can now check any .o file
Problem Details: It is very convinient to say: scripts/mod/modpost mm/built-in.o to check if any section mismatch errors occured in mm/ (as an example). Fix it so this is possible again. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 696d2a59e4b8..46660a4f9e22 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1299,7 +1299,8 @@ static void read_symbols(char *modname) handle_modversions(mod, &info, sym, symname); handle_moddevtable(mod, &info, sym, symname...
0ffce8d94487abbd332cd36f98db61b7c8a3db3c
Analyze and fix the following issue in the Linux kernel code: kconfig: gconfig: symbol fix
Problem Details: Gettext support for symbol names are unnecessary. Signed-off-by: Egry Gabor <gaboregry1@t-online.hu> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org>
```diff diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c index dfe748c38b72..199b22bb49e2 100644 --- a/scripts/kconfig/gconf.c +++ b/scripts/kconfig/gconf.c @@ -466,7 +466,7 @@ static void text_insert_help(struct menu *menu) help = _(help); if (menu->sym && menu->sym->name) - name = g_strdup_print...
01771b0fef0f2cbff80e19295394ece2be1ab661
Analyze and fix the following issue in the Linux kernel code: kconfig: macro fix in menu.c
Problem Details: This patch removes the indirect I18N support for config file. Signed-off-by: Egry Gabor <gaboregry1@t-online.hu> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org>
```diff diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index f9d0d91a3fe4..e9deebe22eed 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c @@ -394,9 +394,9 @@ bool menu_is_visible(struct menu *menu) const char *menu_get_prompt(struct menu *menu) { if (menu->prompt) - return _(menu->prom...
243f40cecb292cbb2333749614cf54302fc9cdc0
Analyze and fix the following issue in the Linux kernel code: kbuild: document 'make prepare' in 'make help'
Problem Details: The output of 'make help' covers a lot of options, but doesn't include a listing for 'make prepare'. Here's a one-liner to fix that... Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/Makefile b/Makefile index 698dfc6ba65c..6847464402aa 100644 --- a/Makefile +++ b/Makefile @@ -1181,6 +1181,7 @@ help: @echo ' dir/ - Build all files in dir and below' @echo ' dir/file.[ois] - Build specified target only' @echo ' dir/file.ko - Build module including final...
df578e7d831b4d280bf7c621eafb737e78cd26eb
Analyze and fix the following issue in the Linux kernel code: kbuild: clean up modpost.c
Problem Details: akpm complained about overly long lines in modpost.c and when started additional style issues were fixed: o Updated my copyright o Removed unneeded {} o Drop assignments in if () o Spaces around operators o Break long lines o locate * near variable not type o Fix a format specifier for sizeof() o Corr...
```diff diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 4d1c59063b27..696d2a59e4b8 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -2,7 +2,7 @@ * * Copyright 2003 Kai Germaschewski * Copyright 2002-2004 Rusty Russell, IBM Corporation - * Copyright 2006 Sam Ravnborg ...
75ff4309cdb1d7303750aeed07a5d80382fe2e71
Analyze and fix the following issue in the Linux kernel code: kconfig: fix whitespace and sort includes in conf.c
Problem Details: Sort includes and remove leading whitespace. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org
```diff diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index d4737d35e720..a3d2d0b564f4 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -4,11 +4,11 @@ */ #include <ctype.h> -#include <stdlib.h> #include <stdio.h> +#include <stdlib.h> #include <string.h> -#include <unistd.h> #in...
09af091f50409a60a72086c737b9a6224dde5ab8
Analyze and fix the following issue in the Linux kernel code: kconfig: make kconfig MinGW friendly
Problem Details: Kconfig is powerfull tool. So powerfull that more and more software projects are using it for configuration. So instead of fixing some of them one by one, lets fix it in kernel and wait for sync. This work was originaly done for PTXdist - GPL licensed build system for userlands and cross-compilers, bu...
```diff diff --git a/scripts/kconfig/lxdialog/dialog.h b/scripts/kconfig/lxdialog/dialog.h index 7e17eba75ae8..c4ad37fd922c 100644 --- a/scripts/kconfig/lxdialog/dialog.h +++ b/scripts/kconfig/lxdialog/dialog.h @@ -187,10 +187,9 @@ int item_is_tag(char tag); int on_key_esc(WINDOW *win); int on_key_resize(void); -vo...
0486bc9098f4556a0aa90d57f717d08164b7647e
Analyze and fix the following issue in the Linux kernel code: kconfig: add hints/tips/tricks to Documentation/kbuild/kconfig-language.txt
Problem Details: Add a section on kconfig hints: how to do <something> in Kconfig files. Fix a few typos/spellos. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt index 616043a6da99..53ca12f7999f 100644 --- a/Documentation/kbuild/kconfig-language.txt +++ b/Documentation/kbuild/kconfig-language.txt @@ -24,7 +24,7 @@ visible if its parent entry is also visible. Menu entries ...
b052ce4c840e2da3c72ab7dadb97d1094f6e3a89
Analyze and fix the following issue in the Linux kernel code: kbuild: fix false positive -dirty tag caused by make-kpkg
Problem Details: make-kpkg modifies scripts/package/Makefile and deletes scripts/package/builddeb as part of its build process. Ignore these changes so the tree isn't marked as -dirty, when it is just an artifact of make-kpkg. (make-kpkg clean restores the files to their original state, and these helper scripts won't...
```diff diff --git a/scripts/setlocalversion b/scripts/setlocalversion index acce8ebc5d40..52f032e409a3 100644 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion @@ -17,7 +17,8 @@ if head=`git rev-parse --verify HEAD 2>/dev/null`; then # Are there uncommitted changes? git update-index --refresh --unmerge...
4e7434ff028c4280bed620f28fdbf9f4d77d77ce
Analyze and fix the following issue in the Linux kernel code: kbuild: fix scripts/setlocalversion to avoid erroneous -dirty tag
Problem Details: If git's index file is out of date, and some files have been touched such that their timestamp doesn't what is in the index, "git diff-index HEAD" may show that a particular file is dirty, when in fact it really isn't. Running "git update-index" will update the index to avoid these false positives. S...
```diff diff --git a/scripts/setlocalversion b/scripts/setlocalversion index 1b31da843672..acce8ebc5d40 100644 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion @@ -16,6 +16,7 @@ if head=`git rev-parse --verify HEAD 2>/dev/null`; then fi # Are there uncommitted changes? + git update-index --refresh --un...
9b213118fa4b79afe9a2718faca244ac581a96b6
Analyze and fix the following issue in the Linux kernel code: kbuild: fix installing external modules
Problem Details: Eric Sandeen <sandeen@redhat.com> reported: Installing external modules is supposed to put them in some path under /lib/modules/<version>/extra/subdir/, but this change: http://linux.bkbits.net:8080/linux-2.6/?PAGE=cset&REV=1.1982.9.23 makes them go under /lib/modules/<version>/extrasubdir (f...
```diff diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst index f0ff248f5e6f..efa5d940e632 100644 --- a/scripts/Makefile.modinst +++ b/scripts/Makefile.modinst @@ -21,7 +21,7 @@ quiet_cmd_modules_install = INSTALL $@ # Modules built outside the kernel source tree go into extra by default INSTALL_MOD_...
0484f1299fb504d57f388e5cdaba85ed59f32ca0
Analyze and fix the following issue in the Linux kernel code: kbuild: fix buglet in gcc-version.sh
Problem Details: Greg Schafer <gschafer@zip.com.au> reported: ==== $make mrproper scripts/gcc-version.sh: [[: command not found This is on a very old host with an ancient bash as /bin/sh. But I have CONFIG_SHELL set and pointing to a modern bash. Something is wrong. This doesn't happen with 2.6.23 ==== Fixed using a...
```diff diff --git a/scripts/gcc-version.sh b/scripts/gcc-version.sh index a5121a6d8949..cc767b388baf 100644 --- a/scripts/gcc-version.sh +++ b/scripts/gcc-version.sh @@ -9,7 +9,10 @@ # gcc-2.95.3, `030301' for gcc-3.3.1, etc. # -if [[ $1 = "-p" ]] ; then with_patchlevel=1; shift; fi +if [ "$1" = "-p" ] ; then + wi...
666ab414fe14e8bbbe86a110437346128e1ec869
Analyze and fix the following issue in the Linux kernel code: kbuild: fix a buffer overflow in modpost
Problem Details: When passing an file name > 1k the stack could be overflowed. Not really a security issue, but still better plugged. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 404ee0d0aac6..4d1c59063b27 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1656,7 +1656,6 @@ int main(int argc, char **argv) { struct module *mod; struct buffer buf = { }; - char fname[SZ]; char *kernel_read = NULL, *modu...
58b7a68de37face98afe7c705391145795a982b5
Analyze and fix the following issue in the Linux kernel code: kbuild: fix format string warnings in modpost
Problem Details: Fix wrong format strings in modpost exposed by the previous patch. Including one missing argument -- some random data was printed instead. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 3a12c22cc2f8..404ee0d0aac6 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -388,7 +388,7 @@ static int parse_elf(struct elf_info *info, const char *filename) /* Check if file offset is correct */ if (hdr->e_shoff > info->si...
800074345544ae6ec06c77b1a3f7ba032f84bd10
Analyze and fix the following issue in the Linux kernel code: kbuild: Add missing srctree prefix for includecheck and versioncheck
Problem Details: Add missing $(srctree)/ prefix for scripts used by the includecheck and versioncheck make targets Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/Makefile b/Makefile index d0ffbeb51942..344defd0f918 100644 --- a/Makefile +++ b/Makefile @@ -1430,12 +1430,12 @@ tags: FORCE includecheck: find * $(RCS_FIND_IGNORE) \ -name '*.[hcS]' -type f -print | sort \ - | xargs $(PERL) -w scripts/checkincludes.pl + | xargs $(PERL) -w $(srctree)/scrip...
b112e0f73fe8e9e69e60bc9d6d16217795259c3c
Analyze and fix the following issue in the Linux kernel code: kernel-doc: single DOC: selection
Problem Details: Currently, DOC: sections are always output even if only a single function is requested, fix this and also make it possible to just output a single DOC: section by giving its title as the function name to output. Also fixes docbook XML well-formedness for sections with examples. Signed-off-by: Johanne...
```diff diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 8cf528b5e65a..8255f723b7e8 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -54,13 +54,13 @@ use strict; # Set output format using one of -docbook -html -text or -man. Default is man. # # -function funcname -# If set, then only generate...
5c98fc0360437327e4034ecfe8b818ad82622100
Analyze and fix the following issue in the Linux kernel code: kernel-doc: fix xml output mode
Problem Details: After Randy's patch fixing the HTML output in DOC: sections (6b5b55f6c404fa730a09a8254eb19f5a038afcc2) the same bug remained in XML mode, this fixes it. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Sam Ravnborg <sam@ravnb...
```diff diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 1d1401807e95..e4fa8d9568ba 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -182,10 +182,10 @@ my $blankline_html = $local_lt . "p" . $local_gt; # was "<p>" my %highlights_xml = ( "([^=])\\\"([^\\\"<]+)\\\"", "\$1<quote>\$2</quote>", $ty...
3b29daded680733a37ed6618e165e86df45d89ab
Analyze and fix the following issue in the Linux kernel code: [POWERPC] 83xx: Fix typo in mpc837x compatible entries
Problem Details: Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
```diff diff --git a/arch/powerpc/boot/dts/mpc8377_rdb.dts b/arch/powerpc/boot/dts/mpc8377_rdb.dts index 8fe02cc93855..cd60005b2bbe 100644 --- a/arch/powerpc/boot/dts/mpc8377_rdb.dts +++ b/arch/powerpc/boot/dts/mpc8377_rdb.dts @@ -12,7 +12,7 @@ /dts-v1/; / { - compatible = "fsl,mpc8377erdb"; + compatible = "fsl,mpc...
fe56caa97e626cc6d6e18adbd5ccd1a9aa9a4fcf
Analyze and fix the following issue in the Linux kernel code: HID: Support Samsung IR remote
Problem Details: Samsung USB remotes (0419:0001) are rejected by kernel 2.6.23, because the report descriptor from the remote contains a 48 bit HID report field. HID 1.11 states: Fields may span at most 4 bytes. This patch, based on 2.6.23, fixes this by modifying the internal report descriptor in hid-quirks.c. Additi...
```diff diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c index 68b38fdb1203..30f63e9f93a3 100644 --- a/drivers/hid/usbhid/hid-quirks.c +++ b/drivers/hid/usbhid/hid-quirks.c @@ -341,6 +341,9 @@ #define USB_VENDOR_ID_SAITEK 0x06a3 #define USB_DEVICE_ID_SAITEK_RUMBLEPAD 0xff17 +#define U...
b0e668240949f69e84d69f998aa9af759e8be635
Analyze and fix the following issue in the Linux kernel code: HID: fix compilation of hidbp drivers without usbhid
Problem Details: We can use the blacklist only if usbhid code is compiled. Reported-by: jurriaan <thunder7@xs4all.nl> Cc: Pascal Terjan <pterjan@mandriva.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/hid/usbhid/usbkbd.c b/drivers/hid/usbhid/usbkbd.c index a31ccb4fca09..5d9dbb47e4a8 100644 --- a/drivers/hid/usbhid/usbkbd.c +++ b/drivers/hid/usbhid/usbkbd.c @@ -235,11 +235,13 @@ static int usb_kbd_probe(struct usb_interface *iface, if (!usb_endpoint_is_int_in(endpoint)) return -ENODE...
70d215c4a7dfbddc138a2dd726d8f80f3e6d2622
Analyze and fix the following issue in the Linux kernel code: HID: the `bit' in hidinput_mapping_quirks() is an out parameter
Problem Details: Fix a panic, by changing hidinput_mapping_quirks(,, unsigned long *bit,) to hidinput_mapping_quirks(,, unsigned long **bit,) The `bit' in this function is an out parameter. Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jir...
```diff diff --git a/drivers/hid/hid-input-quirks.c b/drivers/hid/hid-input-quirks.c index fbe8b6de1a63..4bcdc9bb658e 100644 --- a/drivers/hid/hid-input-quirks.c +++ b/drivers/hid/hid-input-quirks.c @@ -16,16 +16,16 @@ #include <linux/input.h> #include <linux/hid.h> -#define map_abs(c) do { usage->code = c; us...
9f6b37275a9f5fbb0b6657a226a633533a1b2e09
Analyze and fix the following issue in the Linux kernel code: HID: Use hid blacklist in usbmouse/usbkbd
Problem Details: This fixes wacom tablets not working if usbmouse is loaded. Signed-off-by: Pascal Terjan <pterjan@mandriva.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c index dcb102d87414..23c8993a9845 100644 --- a/drivers/hid/usbhid/hid-quirks.c +++ b/drivers/hid/usbhid/hid-quirks.c @@ -911,6 +911,8 @@ u32 usbhid_lookup_quirk(const u16 idVendor, const u16 idProduct) return quirks; } +EXPORT_SY...
af9e0eacdc072ba28fd139b90de27023d9cb0598
Analyze and fix the following issue in the Linux kernel code: HID: add full support for Genius KB-29E
Problem Details: Genius KB-29E has broken report descriptor, which causes some of the Consumer usages to appear incorrectly as Button usages. We fix it by fixing the report descriptor before it is being parsed. Also a few of the keys violate the HUT standard, so they need a special handling. They currently fall into "...
```diff diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index de270b16bde3..0da29cf43713 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -630,6 +630,12 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel case 0x0f6: map_key_clear(KEY_NEXT); brea...
3ba5619f06300cd0944150901ed20de87483ad8c
Analyze and fix the following issue in the Linux kernel code: HID: fix a potential bug in pointer casting
Problem Details: Don't directly cast list_head * to foo *, this works only when list is the first member of struct foo, and we should not make the assumption how members are ordered in the structure. i.e. struct *f = (struct *f)pos will work if: struct foo { struct list_head list; int i; }; but will fail if: s...
```diff diff --git a/drivers/hid/usbhid/hid-tmff.c b/drivers/hid/usbhid/hid-tmff.c index 69882a726e99..144578b1a00c 100644 --- a/drivers/hid/usbhid/hid-tmff.c +++ b/drivers/hid/usbhid/hid-tmff.c @@ -137,7 +137,8 @@ static int hid_tmff_play(struct input_dev *dev, void *data, struct ff_effect *ef int hid_tmff_init(struc...
9b8c0088404778a1291191cf140bcfea082f027c
Analyze and fix the following issue in the Linux kernel code: [ARM] 4792/1: S3C24XX: Remove warnings from debug-macro.S
Problem Details: Remove warnings left in include/asm-arm/arch-s3c2410/debug-macro.S whilst these where being experimented with. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/include/asm-arm/arch-s3c2410/debug-macro.S b/include/asm-arm/arch-s3c2410/debug-macro.S index 9c8cd9abb82b..89076c322726 100644 --- a/include/asm-arm/arch-s3c2410/debug-macro.S +++ b/include/asm-arm/arch-s3c2410/debug-macro.S @@ -92,11 +92,9 @@ #if defined(CONFIG_CPU_LLSERIAL_S3C2410_ONLY) #defin...
cca851d7b4d87f3a644d3381930dc737890bd9ac
Analyze and fix the following issue in the Linux kernel code: [ARM] 4790/1: S3C2412: Fix parent selection for msysclk.
Problem Details: The msysclk clock was checking for the wrong PLL for the parent in s3c2412_setparent_msysclk(), trying the UPLL instead of the MPLL output. Also ensure the mpll and fclks are at the same rate at init time. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linu...
```diff diff --git a/arch/arm/mach-s3c2412/clock.c b/arch/arm/mach-s3c2412/clock.c index 42ccb5eb6042..0f752500cd5b 100644 --- a/arch/arm/mach-s3c2412/clock.c +++ b/arch/arm/mach-s3c2412/clock.c @@ -217,7 +217,7 @@ static int s3c2412_setparent_msysclk(struct clk *clk, struct clk *parent) if (parent == &clk_mdivclk)...
046c9d321fd5f5ce1c89c9d0f1a519c26a096486
Analyze and fix the following issue in the Linux kernel code: [ARM] 4788/1: S3C24XX: Fix paramet to s3c2410_dma_ctrl if S3C2410_DMAF_AUTOSTART used.
Problem Details: Fix the channel parameter to s3c2410_dma_ctrl() in s3c2410_dma_enqueue() if the S3C2410_DMAF_AUTOSTART is set on the channel. Spotted by Steven Ryu at Samsung. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c index 9785983dfbae..ac9ff1666fcc 100644 --- a/arch/arm/plat-s3c24xx/dma.c +++ b/arch/arm/plat-s3c24xx/dma.c @@ -525,7 +525,8 @@ int s3c2410_dma_enqueue(unsigned int channel, void *id, } } else if (chan->state == S3C2410_DMA_IDLE) { i...
62feee648ca0ad6e1b54e44e6c8ddb69f225f812
Analyze and fix the following issue in the Linux kernel code: [ARM] 4784/1: S3C24XX: Fix GPIO restore glitches
Problem Details: The core resume code may have caused glitches in the GPIO when restoring the GPIO state due to the order in which the GPIO registers were being written. Change the restore process take into account the state of the GPIOs on resume and the state the system wants to restore them to. See the code commen...
```diff diff --git a/arch/arm/plat-s3c24xx/pm.c b/arch/arm/plat-s3c24xx/pm.c index 4fdb3117744f..bf5581a9aeea 100644 --- a/arch/arm/plat-s3c24xx/pm.c +++ b/arch/arm/plat-s3c24xx/pm.c @@ -83,38 +83,39 @@ static struct sleep_save core_save[] = { SAVE_ITEM(S3C2410_REFRESH), }; -static struct sleep_save gpio_save[] = ...
f7275dac55008f8296cfb89a01b1e71918ac7995
Analyze and fix the following issue in the Linux kernel code: [ARM] 4775/1: s3c2410: fix compilation error if only s3c2442 cpu is selected
Problem Details: This patch fixes compilation error if only a machine with s3c2442 cpu is selected but without s3c2440 cpu selected. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Acked-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/include/asm-arm/arch-s3c2410/regs-dsc.h b/include/asm-arm/arch-s3c2410/regs-dsc.h index c0748511edbc..1235df70f34e 100644 --- a/include/asm-arm/arch-s3c2410/regs-dsc.h +++ b/include/asm-arm/arch-s3c2410/regs-dsc.h @@ -19,7 +19,7 @@ #define S3C2412_DSC1 S3C2410_GPIOREG(0xe0) #endif -#if defin...
d45c30cb4c0b5f5555397ba2e942d63b4170fa1f
Analyze and fix the following issue in the Linux kernel code: [ARM] 4725/1: S3C2412: Fix IIS and SDI definitions in DMA map
Problem Details: The IIS and SDI register hw_addr definitions are incorrect in the DMA map for the S3C2412. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-s3c2412/dma.c b/arch/arm/mach-s3c2412/dma.c index 53c1d5bbce19..c9cd51439126 100644 --- a/arch/arm/mach-s3c2412/dma.c +++ b/arch/arm/mach-s3c2412/dma.c @@ -30,6 +30,7 @@ #include <asm/arch/regs-mem.h> #include <asm/arch/regs-lcd.h> #include <asm/arch/regs-sdi.h> +#include <asm/plat...
9cbae12cca55332c9fef8f700ea28d36d7cc54be
Analyze and fix the following issue in the Linux kernel code: [ARM] 4723/1: BAST: Fix LCD driver default display setting
Problem Details: We have a default display set to 4, when we only have three registered displays. Fix this argument (a seperate patch has been generated to ensure that the LCD driver takes notice of this bug) Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index 587864fe25fb..53c2a1376e07 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c @@ -530,7 +530,7 @@ static struct s3c2410fb_mach_info __initdata bast_fb_info = { .displays = bast_lcd_in...
2687bd38573ff6f10d13f60c5c3576cce9cf260d
Analyze and fix the following issue in the Linux kernel code: [ARM] pxa: fix mci_init functions returning -1
Problem Details: Fix all those PXA mci_init functions which return -1 rather than propagating the error code to the higher levels. Remove the silly set_irq_type() calls as well - use the flags for request_irq() instead. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-pxa/cm-x270.c b/arch/arm/mach-pxa/cm-x270.c index a16349272f54..28cfd71c032d 100644 --- a/arch/arm/mach-pxa/cm-x270.c +++ b/arch/arm/mach-pxa/cm-x270.c @@ -487,18 +487,15 @@ static int cmx270_mci_init(struct device *dev, /* card detect IRQ on GPIO 83 */ pxa_gpio_mode(IRQ_TO_GPIO...
ca4d6cfcee0cb2d25c0eb3b0172ecc6f223133ef
Analyze and fix the following issue in the Linux kernel code: [ARM] 4737/1: Refactor corgi_lcd to improve readability + bugfix
Problem Details: This patch refactors the code in corgi_lcd.c moving it to the board specific corgi and spitz files where appropriate instead of the existing ifdef mess which hinders readability. Fix spitz_get_hsync_len() to call get_hsync_invperiod so pxafb can be compiled as a module. The confusing variables which ...
```diff diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index 2363cc64fe07..7304fdbfbb0f 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c @@ -21,6 +21,7 @@ #include <linux/mmc/host.h> #include <linux/pm.h> #include <linux/backlight.h> +#include <video/w100fb.h> #include <a...
e01dbdb40eea94ecb2c703960dac744c9b19a186
Analyze and fix the following issue in the Linux kernel code: [ARM] 4776/1: Add HWUART clock to fix hwuart support
Problem Details: This adds back the registration of HWUART clock on pxa25x Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index 9732d5d9466b..006a6e09589c 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c @@ -111,11 +111,14 @@ static const struct clkops clk_pxa25x_lcd_ops = { * 95.842MHz -> MMC 19.169MHz, I2C 31.949MHz, FICP 47.923MHz, US...
cd4c1eb51064f24a8b0a53069c4d004deade65c7
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix class_device damage caused by 0c55445f201841bfd6c658c47df8311b6722f002
Problem Details: Lots of compile errors in drivers/mfd/ucb1x00-assabet.c... Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/drivers/mfd/ucb1x00-assabet.c b/drivers/mfd/ucb1x00-assabet.c index b7c8e7813865..61aeaf79640d 100644 --- a/drivers/mfd/ucb1x00-assabet.c +++ b/drivers/mfd/ucb1x00-assabet.c @@ -20,7 +20,7 @@ #include "ucb1x00.h" #define UCB1X00_ATTR(name,input)\ -static ssize_t name##_show(struct device *dev, ...
193c3cc12583344be01206078d9ad3fec5dbc397
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix timer damage from d3d74453c34f8fd87674a8cf5b8a327c68f22e99
Problem Details: Move the xtime write mode seqlock into timer_tick(), so it only surrounds the call to do_timer(). This avoids a deadlock in update_process_times() ... hrtimer_get_softirq_time() which tries to get a read mode seqlock on xtime, thereby preventing booting. Signed-off-by: Russell King <rmk+kernel@arm.li...
```diff diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index e59b5b84168d..b5867eca1d0b 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c @@ -325,7 +325,9 @@ void timer_tick(void) profile_tick(CPU_PROFILING); do_leds(); do_set_rtc(); + write_seqlock(&xtime_lock); do_timer(1); + writ...
6232be32afa121628c72291ce7eaa24a639905c2
Analyze and fix the following issue in the Linux kernel code: [ARM] 4763/1: pxa: fix pxa3xx_get_clk_frequency_khz() to return KHz
Problem Details: The original code incorrectly returns Hz instead of KHz. Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index 61d9c9d69e6b..37e93f9ba8fc 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c @@ -86,7 +86,7 @@ unsigned int pxa3xx_get_clk_frequency_khz(int info) HSS / 1000000, (HSS % 1000000) / 10000); } - return CLK; + ...
f93e97eaead5c50af35d73cca7301ebbfdff116c
Analyze and fix the following issue in the Linux kernel code: sh: declared coherent memory support V2
Problem Details: This patch adds declared coherent memory support to the sh architecture. All functions are based on the x86 implementation. Header files are adjusted to use the new functions instead of the former consistent_alloc() code. This version includes the few changes what were included in the fix patch togeth...
```diff diff --git a/arch/sh/mm/consistent.c b/arch/sh/mm/consistent.c index 65ad30031ad7..7b2131c9eeda 100644 --- a/arch/sh/mm/consistent.c +++ b/arch/sh/mm/consistent.c @@ -3,6 +3,8 @@ * * Copyright (C) 2004 - 2007 Paul Mundt * + * Declared coherent memory functions based on arch/x86/kernel/pci-dma_32.c + * ...
427c727fd0637555a4bb6828c07bf36b9506ddde
Analyze and fix the following issue in the Linux kernel code: sh: r7785rp: Fix up DECLARE_INTC_DESC() arg mismatch.
Problem Details: Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/boards/renesas/r7780rp/irq-r7785rp.c b/arch/sh/boards/renesas/r7780rp/irq-r7785rp.c index af5ec74b2b1e..bf7ec107fbc6 100644 --- a/arch/sh/boards/renesas/r7780rp/irq-r7785rp.c +++ b/arch/sh/boards/renesas/r7780rp/irq-r7785rp.c @@ -62,7 +62,7 @@ static unsigned char irl2irq[HL_NR_IRL] __initd...
b62ad83d91ebf1368e9e72d476b18698ac67bef9
Analyze and fix the following issue in the Linux kernel code: sh: Correct pte size mismatch for X2 TLB.
Problem Details: Fixes up a build warning/error in arch/sh/mm/fault_32.c. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/mm/fault_32.c b/arch/sh/mm/fault_32.c index 60d74f793a1d..33b43d20e9f6 100644 --- a/arch/sh/mm/fault_32.c +++ b/arch/sh/mm/fault_32.c @@ -172,7 +172,7 @@ no_context: bust_spinlocks(1); if (oops_may_print()) { - __typeof__(pte_val(__pte(0))) page; + unsigned long page; if (addre...
e08d8aaeadac37c8d149b5d5bda6cf7a98d21e92
Analyze and fix the following issue in the Linux kernel code: sh: Fix posix_types.h userspace breakage from sh64 merge.
Problem Details: Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/include/asm-sh/Kbuild b/include/asm-sh/Kbuild index 76a8ccf254a5..43910cdf78a5 100644 --- a/include/asm-sh/Kbuild +++ b/include/asm-sh/Kbuild @@ -1,3 +1,8 @@ include include/asm-generic/Kbuild.asm header-y += cpu-features.h + +unifdef-y += unistd_32.h +unifdef-y += unistd_64.h +unifdef-y += pos...
0465b9fb5f6b57f00a6f5bf2169e30e8f3c7d66c
Analyze and fix the following issue in the Linux kernel code: sh: Fix get_user()/put_user() build error.
Problem Details: Fixes the build error caused by -Werror on gcc 3.x compilers: arch/sh/kernel/signal_32.c: In function `sys_sigaction': arch/sh/kernel/signal_32.c:66: warning: initialization discards qualifiers from pointer target type arch/sh/kernel/signal_32.c:67: warning: initialization discards qualifiers from poi...
```diff diff --git a/include/asm-sh/uaccess_32.h b/include/asm-sh/uaccess_32.h index 59a9f20c2dc7..b6082f3c1dc4 100644 --- a/include/asm-sh/uaccess_32.h +++ b/include/asm-sh/uaccess_32.h @@ -95,11 +95,9 @@ static inline int __access_ok(unsigned long addr, unsigned long size) } #endif /* CONFIG_MMU */ -static inline...
0095d58b4a91b9fb57aeb781909355b232517c64
Analyze and fix the following issue in the Linux kernel code: sh: include/asm-sh/: Spelling fixes.
Problem Details: Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/include/asm-sh/hd64461.h b/include/asm-sh/hd64461.h index 342ca55a266a..8c1353baf00f 100644 --- a/include/asm-sh/hd64461.h +++ b/include/asm-sh/hd64461.h @@ -46,10 +46,10 @@ /* CPU Data Bus Control Register */ #define HD64461_SCPUCR (CONFIG_HD64461_IOBASE + 0x04) -/* Base Adress Register */ +/...
eb9c7f4198636fb74ea1ec60c0fff2d1a840b4ed
Analyze and fix the following issue in the Linux kernel code: sh: arch/sh/: Spelling fixes.
Problem Details: Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/boards/dreamcast/irq.c b/arch/sh/boards/dreamcast/irq.c index 5bf01f86c20c..9d0673a9092a 100644 --- a/arch/sh/boards/dreamcast/irq.c +++ b/arch/sh/boards/dreamcast/irq.c @@ -136,7 +136,7 @@ int systemasic_irq_demux(int irq) emr = EMR_BASE + (level << 4) + (level << 2); esr...
6fc5153aab2a6eb23e636d962e1aceaabd0dfb12
Analyze and fix the following issue in the Linux kernel code: sh: Fix up KERNEL_ENTRY calculation for uImage.
Problem Details: Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/boot/Makefile b/arch/sh/boot/Makefile index 4b3a6f19c3b5..59f552c13349 100644 --- a/arch/sh/boot/Makefile +++ b/arch/sh/boot/Makefile @@ -38,8 +38,9 @@ KERNEL_LOAD := $(shell /bin/bash -c 'printf "0x%8x" \ $(CONFIG_ZERO_PAGE_OFFSET)]') KERNEL_ENTRY := $(shell /bin/bash -c 'printf "0x...
003c6af6c6370cc3315ab828a0e6618f00713d96
Analyze and fix the following issue in the Linux kernel code: sh: Fix up binfmt_flat compile warnings.
Problem Details: Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/include/asm-sh/flat.h b/include/asm-sh/flat.h index dc4f5950dafa..0cc800299e06 100644 --- a/include/asm-sh/flat.h +++ b/include/asm-sh/flat.h @@ -19,6 +19,6 @@ #define flat_get_addr_from_rp(rp, relval, flags, p) get_unaligned(rp) #define flat_put_addr_at_rp(rp, val, relval) put_unaligned(val,rp) ...
e06712df7792165d12392bc1fdda6bf384e1313b
Analyze and fix the following issue in the Linux kernel code: sh: Kill off pgtable.h from scatterlist.h.
Problem Details: Fixes up the mmc build. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/include/asm-sh/scatterlist.h b/include/asm-sh/scatterlist.h index 35ef9c30f0de..2084d0373693 100644 --- a/include/asm-sh/scatterlist.h +++ b/include/asm-sh/scatterlist.h @@ -1,7 +1,6 @@ #ifndef __ASM_SH_SCATTERLIST_H #define __ASM_SH_SCATTERLIST_H -#include <asm/pgtable.h> #include <asm/types....
830626caf8570675a15bcc9ec46fcb5bfbc71b0d
Analyze and fix the following issue in the Linux kernel code: sh: Fix up switch_to() type casts.
Problem Details: Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/include/asm-sh/system_32.h b/include/asm-sh/system_32.h index e918bacd5ecf..7ff08d956ba8 100644 --- a/include/asm-sh/system_32.h +++ b/include/asm-sh/system_32.h @@ -9,53 +9,53 @@ struct task_struct *__switch_to(struct task_struct *prev, /* * switch_to() should switch tasks to task nr n, first ...
453ec9c1c3808b051347edbbf637f997add7b85b
Analyze and fix the following issue in the Linux kernel code: sh: Fix up uImage target entry point.
Problem Details: This patch changes the uImage target so that it generates a wrapped compressed vmlinux, rather than a wrapped zImage. The previous version matched the ARM, this version matches the PPC. However I would question how useful a self decompressing image is with a boot loader which does decompression, so I t...
```diff diff --git a/arch/sh/boot/Makefile b/arch/sh/boot/Makefile index 1b0f5be01d10..4b3a6f19c3b5 100644 --- a/arch/sh/boot/Makefile +++ b/arch/sh/boot/Makefile @@ -35,17 +35,27 @@ $(obj)/compressed/vmlinux: FORCE KERNEL_LOAD := $(shell /bin/bash -c 'printf "0x%8x" \ $$[$(CONFIG_PAGE_OFFSET) + \ $(CONFI...
0fb19dcb64ec4bd9934eee26ce66417fe028ffd8
Analyze and fix the following issue in the Linux kernel code: sh: get_user fixes and nommu consolidation.
Problem Details: When a get_user(to, from++) is called the pointer increment is performed after its first usage, in the specific after the __add_ok invokation. This causes a wrong get_user return value, putting a wrong character in the destination variable. This patch solves the problem using a new temporary pointer. ...
```diff diff --git a/include/asm-sh/uaccess_32.h b/include/asm-sh/uaccess_32.h index f18a1a5c95c0..59a9f20c2dc7 100644 --- a/include/asm-sh/uaccess_32.h +++ b/include/asm-sh/uaccess_32.h @@ -73,37 +73,24 @@ static inline int __access_ok(unsigned long addr, unsigned long size) /* * __access_ok: Check if address with ...
53ff09422e5e7a6d6198b767c8f494e43ec8e3ae
Analyze and fix the following issue in the Linux kernel code: sh: Fix compile error of arch/sh/mm/pmb.c
Problem Details: Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c index b632051d6ce5..ef6ab39eaf65 100644 --- a/arch/sh/mm/pmb.c +++ b/arch/sh/mm/pmb.c @@ -305,7 +305,7 @@ static void pmb_cache_ctor(struct kmem_cache *cachep, void *pmb) static int __init pmb_init(void) { unsigned int nr_entries = ARRAY_SIZE(pmb_init_map); -...
3ee7702903c346fc814bd7540ba37eebef75054d
Analyze and fix the following issue in the Linux kernel code: sh: CCR1->CCR renaming for SH-2 parts.
Problem Details: Avoid namespace collision with a CCR1 definition. The general SH code always expects CCR anyways, so there's no point in keeping the CCR1 naming around. Fixes up synclink collisions: drivers/char/pcmcia/synclink_cs.c:283:1: warning: "CCR1" redefined In file included from include/asm/cache.h:13, ...
```diff diff --git a/include/asm-sh/cpu-sh2/cache.h b/include/asm-sh/cpu-sh2/cache.h index 66388ce16c30..4e0b16500686 100644 --- a/include/asm-sh/cpu-sh2/cache.h +++ b/include/asm-sh/cpu-sh2/cache.h @@ -18,8 +18,7 @@ #define SH_CACHE_ASSOC 8 #if defined(CONFIG_CPU_SUBTYPE_SH7619) -#define CCR1 0xffffffec -#define...
47a3eb95560ea525a2dfbee1c4e7f03a45fd2207
Analyze and fix the following issue in the Linux kernel code: sh: Fix the arch/sh/kernel/traps.c build for sh32.
Problem Details: Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c index bf70827b17cc..a3bdc68ef02c 100644 --- a/arch/sh/kernel/traps.c +++ b/arch/sh/kernel/traps.c @@ -2,6 +2,8 @@ #include <linux/io.h> #include <linux/types.h> #include <linux/kdebug.h> +#include <linux/signal.h> +#include <linux/sched.h> #includ...
12760cb4df2a244efbaa262b32590af295c0b8e1
Analyze and fix the following issue in the Linux kernel code: sh: Fix up uname -m matching for native sh64.
Problem Details: Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/Makefile b/Makefile index 189d8ef416e6..6d419f67939c 100644 --- a/Makefile +++ b/Makefile @@ -169,7 +169,7 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ -e s/arm.*/arm/ -e s/sa110/arm/ \ -e s/s390x/s390/ -e s/parisc64/parisc/ \ -e s/ppc.*/powerpc/ -...
b000659b1c07f91f0c73bf94bb8922fa740c0ef0
Analyze and fix the following issue in the Linux kernel code: sh: Fix up bug trap handler build for sh32.
Problem Details: Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/include/asm-sh/system.h b/include/asm-sh/system.h index 6b02dfd587ea..8b01fc4a56af 100644 --- a/include/asm-sh/system.h +++ b/include/asm-sh/system.h @@ -194,7 +194,8 @@ asmlinkage void name##_trap_handler(unsigned long r4, unsigned long r5, \ #define TRAP_HANDLER_DECL \ struct pt_regs *reg...
0dcb957db5eb658d636097a9283dabdbf59de283
Analyze and fix the following issue in the Linux kernel code: sh: Build fixes for lib32 clear_page.
Problem Details: Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/lib/clear_page.S b/arch/sh/lib/clear_page.S index 7a7c81ee3f01..36d44ef2b8a2 100644 --- a/arch/sh/lib/clear_page.S +++ b/arch/sh/lib/clear_page.S @@ -9,10 +9,10 @@ #include <asm/page.h> /* - * clear_page_slow + * clear_page * @to: P1 address * - * void clear_page_slow(void *to) + * ...
35a74499a4f5abbfcdf85629d696c8cfdbd2167f
Analyze and fix the following issue in the Linux kernel code: sh: Fix up default zImage target for sh32.
Problem Details: This was using the absolute path, which was confusing the make target. Switch it to just 'zImage', as per powerpc. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/Makefile b/arch/sh/Makefile index afe4e6343248..8da11c0cc6d6 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile @@ -67,7 +67,7 @@ OBJCOPYFLAGS := -O binary -R .note -R .note.gnu.build-id -R .comment \ -R .stab -R .stabstr -S # Give the various platforms the opportunity to set def...
a82d53ec2424834521a5ec8bb661a27f968036ab
Analyze and fix the following issue in the Linux kernel code: sh: Generic BUG only works for sh32.
Problem Details: Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 7cfd17230224..e406f1dbac84 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -32,7 +32,7 @@ config RWSEM_XCHGADD_ALGORITHM config GENERIC_BUG def_bool y - depends on BUG + depends on BUG && SUPERH32 config GENERIC_FIND_NEXT_BIT bool ```
fb8e569c1d4f44a4632e2db95a27ed45734d4705
Analyze and fix the following issue in the Linux kernel code: sh: Fix up user_fpu_struct typo for SH-5.
Problem Details: Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh64/kernel/asm-offsets.c b/arch/sh64/kernel/asm-offsets.c deleted file mode 100644 index ca76537c16c0..000000000000 --- a/arch/sh64/kernel/asm-offsets.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This program is used to generate definitions needed by - * assembly language modules. - * - * We use ...
5db141a9469c8446a179696bc7d374f4cd9b207a
Analyze and fix the following issue in the Linux kernel code: sh: Mark some IRQ debug options sh32 only.
Problem Details: Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug index f9ce46f1e6ff..89bc174f25c7 100644 --- a/arch/sh/Kconfig.debug +++ b/arch/sh/Kconfig.debug @@ -62,7 +62,7 @@ config DEBUG_BOOTMEM config DEBUG_STACKOVERFLOW bool "Check for stack overflows" - depends on DEBUG_KERNEL + depends on DEBUG_KERNEL &...
df0fb2562806e853e53de43af04f013c3e45427b
Analyze and fix the following issue in the Linux kernel code: sh: Fix up proc ASIDs for CPU-local ASID cache accessors.
Problem Details: Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/kernel/process_64.c b/arch/sh/kernel/process_64.c index 92d01465eb87..2dd97eecb44c 100644 --- a/arch/sh/kernel/process_64.c +++ b/arch/sh/kernel/process_64.c @@ -27,6 +27,7 @@ #include <linux/io.h> #include <asm/uaccess.h> #include <asm/pgtable.h> +#include <asm/mmu_context.h> struct ...
8214d52ace79163ded60a8605c1d6c44b8b2bd30
Analyze and fix the following issue in the Linux kernel code: sh: Merge sh64 Kconfig.debug options.
Problem Details: Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug index 722da6851f56..f9ce46f1e6ff 100644 --- a/arch/sh/Kconfig.debug +++ b/arch/sh/Kconfig.debug @@ -174,4 +174,29 @@ endchoice endmenu +if SUPERH64 + +config SH64_PROC_ASIDS + bool "Debug: report ASIDs through /proc/asids" + depends on PROC_FS + +c...
0b2328bbc08ee8f7377f9dccdd6fb0c707b34d2f
Analyze and fix the following issue in the Linux kernel code: sh: Fix up generic BUG build for SH-5.
Problem Details: Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/include/asm-sh/bug.h b/include/asm-sh/bug.h index afb1c2723ec7..c01718040166 100644 --- a/include/asm-sh/bug.h +++ b/include/asm-sh/bug.h @@ -72,11 +72,6 @@ do { \ unlikely(__ret_warn_on); \ }) -struct pt_regs; - -/* arch/sh/kernel/traps.c */ -void handle_BUG(struct pt_regs *); - #en...
5a4f7c66be981c6b5f44a4d66a14ea6ac9b7b6b0
Analyze and fix the following issue in the Linux kernel code: sh: Share bug/debug traps across _32 and _64.
Problem Details: Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/kernel/Makefile_32 b/arch/sh/kernel/Makefile_32 index 34e8fa0d40cc..990ba74db0d6 100644 --- a/arch/sh/kernel/Makefile_32 +++ b/arch/sh/kernel/Makefile_32 @@ -6,7 +6,7 @@ extra-y := head_32.o init_task.o vmlinux.lds obj-y := debugtraps.o io.o io_generic.o irq.o machvec.o process_32.o \ ...
b4db3aec8351c78df77bbd95f1951a4dd0246853
Analyze and fix the following issue in the Linux kernel code: sh: Fix up the _stext references for SH-5.
Problem Details: Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/Makefile b/arch/sh/Makefile index 4da3bc696b3d..15161f1851a5 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile @@ -74,15 +74,21 @@ OBJCOPYFLAGS := -O binary -R .note -R .note.gnu.build-id -R .comment -R .stab -R # never be used by anyone. Use a board-specific defconfig that has a # rea...
4c91d6b105af5ab3011158addbd23f038aee6a00
Analyze and fix the following issue in the Linux kernel code: sh: Fix up the head-y targets for _32 and _64.
Problem Details: Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/Makefile b/arch/sh/Makefile index 897f1c590fac..4da3bc696b3d 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile @@ -95,7 +95,9 @@ endif KBUILD_CFLAGS += -pipe $(cflags-y) KBUILD_AFLAGS += $(cflags-y) -head-y := arch/sh/kernel/head.o arch/sh/kernel/init_task.o +head-y := arch/sh/ke...
151468d2b42569f3aff1aedc0dddfed45159c2ab
Analyze and fix the following issue in the Linux kernel code: sh: Fix up header reference for arch/sh/lib64/panic.c.
Problem Details: Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/lib64/panic.c b/arch/sh/lib64/panic.c index c9eb1cb50d97..ff559e2a96f7 100644 --- a/arch/sh/lib64/panic.c +++ b/arch/sh/lib64/panic.c @@ -8,7 +8,7 @@ #include <linux/kernel.h> #include <asm/io.h> -#include <asm/registers.h> +#include <asm/cpu/registers.h> /* THIS IS A PHYSICAL ADDRES...
079060c6ff6edd32955c3e511024578db89a717b
Analyze and fix the following issue in the Linux kernel code: sh: Fix up 64kB page size selection on SH-5.
Problem Details: Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig index 8192c872a69a..7ff26c1f4e9c 100644 --- a/arch/sh/mm/Kconfig +++ b/arch/sh/mm/Kconfig @@ -156,7 +156,7 @@ config PAGE_SIZE_8KB config PAGE_SIZE_64KB bool "64kB" - depends on CPU_SH4 + depends on CPU_SH4 || CPU_SH5 help This enables support for ...
0468b4bb125542e75e39f08ebaa74a7daf845631
Analyze and fix the following issue in the Linux kernel code: sh: Fix up VMALLOC_START for SH-5.
Problem Details: Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h index 6ab3ba82d255..b0bb76a6864f 100644 --- a/include/asm-sh/pgtable.h +++ b/include/asm-sh/pgtable.h @@ -71,7 +71,11 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)]; #define PTE_PHYS_MASK (0x20000000 - PAGE_SIZE) ...
e1cd93ea44cb55969e122758c8cc2ddfe21b74b3
Analyze and fix the following issue in the Linux kernel code: sh: BUGFLAG_WARNING needs GENERIC_BUG.
Problem Details: Move the HAVE_ARCH_BUG/HAVE_ARCH_WARN_ON definitions underneath CONFIG_GENERIC_BUG. This is needed for BUGFLAG_WARNING usage. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/include/asm-sh/bug.h b/include/asm-sh/bug.h index a78d482e8b2f..afb1c2723ec7 100644 --- a/include/asm-sh/bug.h +++ b/include/asm-sh/bug.h @@ -3,7 +3,7 @@ #define TRAPA_BUG_OPCODE 0xc33e /* trapa #0x3e */ -#ifdef CONFIG_BUG +#ifdef CONFIG_GENERIC_BUG #define HAVE_ARCH_BUG #define HAVE_ARCH_WA...
5a4a5bd127c147aaa16aefef856f4cb28e92cec1
Analyze and fix the following issue in the Linux kernel code: sh: Fix up fixmap location for SH-5.
Problem Details: Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/include/asm-sh/fixmap.h b/include/asm-sh/fixmap.h index 8a566177ad96..09463cd9bbb9 100644 --- a/include/asm-sh/fixmap.h +++ b/include/asm-sh/fixmap.h @@ -73,7 +73,11 @@ extern void __set_fixmap(enum fixed_addresses idx, * the start of the fixmap, and leave one page empty * at the top of mem.. ...
c847c853a5c562bac940c544748525d038167275
Analyze and fix the following issue in the Linux kernel code: PPC: Fix powerpc vio_find_name to not use devices_subsys
Problem Details: This fixes vio_find_name() in arch/powerpc/kernel/vio.c, which is currently broken because it tries to use devices_subsys. That is bad for two reasons: (1) it's doing (or trying to do) a scan of all devices when it should only be scanning those on the vio bus, and (2) devices_subsys was an internal sy...
```diff diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c index 19a5656001c0..f0bad7070fb5 100644 --- a/arch/powerpc/kernel/vio.c +++ b/arch/powerpc/kernel/vio.c @@ -37,8 +37,6 @@ #include <asm/iseries/hv_call_xm.h> #include <asm/iseries/iommu.h> -extern struct kset devices_subsys; /* needed for vi...
404aae5d420ec543e2e8434f7ec0edf5e2d2b0c4
Analyze and fix the following issue in the Linux kernel code: x86: fix runtime error in arch/x86/kernel/cpu/mcheck/mce_amd_64.c
Problem Details: This problem is due to the kobject rework recently done in this file. The mce_amd_64.c code uses some wierd forward calls to back out of the recursive way the code creates kobjects. Because of this, we need to verify that we have really created a kobject before calling kobject_uevent(). Many thanks ...
```diff diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd_64.c b/arch/x86/kernel/cpu/mcheck/mce_amd_64.c index 753588755fee..073afa7dd89a 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_amd_64.c +++ b/arch/x86/kernel/cpu/mcheck/mce_amd_64.c @@ -450,7 +450,8 @@ recurse: if (err) goto out_free; - kobject_uevent(&b->kobj...
4e886c29610f4374d8971ec7a248f011cc3bd73a
Analyze and fix the following issue in the Linux kernel code: Driver core: Fix up build when CONFIG_BLOCK=N
Problem Details: This fixes up the driver core build errors when CONFIG_BLOCK=N Thanks to Alexander van Heukelum <heukelum@mailshack.com> for the basis of this patch, and to Jeremy Fitzhardinge <jeremy@goop.org> for reporting the problem. Cc: Alexander van Heukelum <heukelum@mailshack.com> Cc: Jeremy Fitzhardinge <j...
```diff diff --git a/drivers/base/class.c b/drivers/base/class.c index 59cf35894cfc..d916bbf5b72a 100644 --- a/drivers/base/class.c +++ b/drivers/base/class.c @@ -149,7 +149,7 @@ int class_register(struct class *cls) if (error) return error; -#ifdef CONFIG_SYSFS_DEPRECATED +#if defined(CONFIG_SYSFS_DEPRECATED) &...
86ec5ec872566dda74848e09904bb5380cab962e
Analyze and fix the following issue in the Linux kernel code: i2c-remove-redundant-i2c_client-list.patch
Problem Details: This goes on top of the patch removing most i2c_adapter.clients usage, updating i2c_attach_client: - Don't call device_register() while holding clist_lock. This removes a self-deadlock when on the i2c_driver.probe() path, for drivers that need to attach new devices (e.g. dummies). - Remove a...
```diff diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index c8bbd672226b..824f12c798d6 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -709,13 +709,6 @@ int i2c_attach_client(struct i2c_client *client) struct i2c_adapter *adapter = client->adapter; int res = 0; - mutex_lock(&ada...
9b766b814d6a5f31ca1e9da1ebc08164b9352941
Analyze and fix the following issue in the Linux kernel code: i2c: Stop using the redundant client list
Problem Details: The i2c_adapter.clients list of i2c_client nodes duplicates driver model state. This patch starts removing that list, letting us remove most existing users of those i2c-core lists. * The core I2C code now iterates over the driver model's list instead of the i2c-internal one in some places where i...
```diff diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index ddd1b83f44d4..c8bbd672226b 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -199,6 +199,25 @@ static struct bus_type i2c_bus_type = { .resume = i2c_device_resume, }; + +/** + * i2c_verify_client - return parameter as i2c...
bf3e2d1d9b860591f3f204aa66d6a3c30058818d
Analyze and fix the following issue in the Linux kernel code: i2c-algo-bit: Fix NAK/ARB comments
Problem Details: Update comments and logging on return path for byte writes. NAK is an error, to be reported or optionally ignored. Timeouts are always errors. Lost arbitration is not currently handled, so don't even list it as an option in the error message. Don't return bogus EFAULT code for inappropriate NAK; EI...
```diff diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c index 260c5d70b0b4..35812823787b 100644 --- a/drivers/i2c/algos/i2c-algo-bit.c +++ b/drivers/i2c/algos/i2c-algo-bit.c @@ -357,10 +357,26 @@ static int sendbytes(struct i2c_adapter *i2c_adap, struct i2c_msg *msg) count--; te...
cf978ab2846d86709802f38c80d1d53da364bf51
Analyze and fix the following issue in the Linux kernel code: i2c-algo-bit: Whitespace fixes (+ NAK/ARB comments)
Problem Details: Fix *LOTS* of whitespace goofs and checkpatch.pl warnings, strangely parenthesized ternary expressions, and other CodingStyle glitches. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
```diff diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c index a37cb6b8593c..260c5d70b0b4 100644 --- a/drivers/i2c/algos/i2c-algo-bit.c +++ b/drivers/i2c/algos/i2c-algo-bit.c @@ -1,7 +1,7 @@ -/* ------------------------------------------------------------------------- */ -/* i2c-algo-bit...
4fb4c5582475452d3bf7c5072ef2d15ee06f7723
Analyze and fix the following issue in the Linux kernel code: [POWERPC] mpc52xx_psc_spi device driver must not touch port_config and cdm
Problem Details: It is dangerous for an mpc52xx device driver to modify the port_config register. If the driver is probed incorrectly, it will change the pin IO configuration in ways which may not be compatible with the board. port_config should be set up by the bootloader, or failing that, in the platform setup code ...
```diff diff --git a/drivers/spi/mpc52xx_psc_spi.c b/drivers/spi/mpc52xx_psc_spi.c index a3ebc632a477..253ed5682a6d 100644 --- a/drivers/spi/mpc52xx_psc_spi.c +++ b/drivers/spi/mpc52xx_psc_spi.c @@ -330,80 +330,13 @@ static void mpc52xx_psc_spi_cleanup(struct spi_device *spi) static int mpc52xx_psc_spi_port_config(i...
94d2dde738a50124d1f1b1b40bd5b9d0ed22e2e2
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Efika: prune fixups and make them more carefull
Problem Details: Prune back Efika fixups to only include changes that are actually required to get a working system. Most of the drivers can accept the compatible properties, even if they don't match the what is recommented in the generic names recommended practice document. This patch also adds extra checks so that ...
```diff diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index 5d89a21dd0d6..5ab4c8466cc9 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c @@ -2142,82 +2142,34 @@ static void __init fixup_device_tree_pmac(void) #endif #ifdef CONFIG_PPC_EFIKA -/* The cu...
66ffbe490b6156898364b3f20a571a78f8d77bc8
Analyze and fix the following issue in the Linux kernel code: [POWERPC] mpc5200: normalize compatible property bindings
Problem Details: Update MPC5200 drivers to also look for compatible properties in the form "fsl,mpc5200-*" to better conform to open firmware generic names recommended practice as published here: http://www.openfirmware.org/1275/practice/gnames/gnamv14a.html This patch should *not* break compatibility with older devi...
```diff diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c index 5a8d190f53e4..fb35b285a146 100644 --- a/arch/powerpc/platforms/52xx/lite5200.c +++ b/arch/powerpc/platforms/52xx/lite5200.c @@ -32,6 +32,19 @@ * */ +/* mpc5200 device tree match tables */ +static struct of_d...
0455fcc821e87d362f2047922c59c0f378a122b5
Analyze and fix the following issue in the Linux kernel code: ide: fix final status check in drive_cmd_intr()
Problem Details: Don't check for READY_STAT bit being set for PIO-in protocol (makes the final status check in drive_cmd_intr() match the one in task_in_intr()). Also fix function name reported by ide_error() call while at it. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewic...
```diff diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index ce8ab1085936..cad057d25a29 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c @@ -659,8 +659,8 @@ static ide_startstop_t drive_cmd_intr (ide_drive_t *drive) stat = hwif->INB(IDE_STATUS_REG); } - if (!OK_STAT(stat, READY_STAT, BAD_ST...
2624565caacedd740fce7803fe2c162842aa5df4
Analyze and fix the following issue in the Linux kernel code: ide: use wait_drive_not_busy() in drive_cmd_intr() (take 2)
Problem Details: Use wait_drive_not_busy() in drive_cmd_intr(). v2: * Fix wait_drive_not_busy() comment (noticed by Sergei). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 0f3e2f4f9c2c..513a5685db2f 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c @@ -640,7 +640,6 @@ static ide_startstop_t drive_cmd_intr (ide_drive_t *drive) ide_hwif_t *hwif = HWIF(drive); u8 *args = (u8 *) rq->buffer; u8 stat = hwif...
4d7a984bdcbdda69fc6b2a4a655415140270aa7b
Analyze and fix the following issue in the Linux kernel code: ide: task_end_request() fix
Problem Details: task_end_request() modified to always call ide_end_drive_cmd() for taskfile requests. Previously, ide_end_drive_cmd() was called only when IDE_TFLAG_FLAGGED was set. Also, ide_dma_intr() is modified to use task_end_request(). Enables TASKFILE ioctls to get valid register outputs on successful comple...
```diff diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index c9648b1ef220..5bf32038dc43 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c @@ -153,13 +153,7 @@ ide_startstop_t ide_dma_intr (ide_drive_t *drive) if (!dma_stat) { struct request *rq = HWGROUP(drive)->rq; - if (rq->rq_disk...
3687221f28058c40e2c57a286decd0caeac67382
Analyze and fix the following issue in the Linux kernel code: ide-tape: fix handling of non-special requests in ->end_request method
Problem Details: Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 3cbca3f4628a..d71a584f0765 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c @@ -1690,6 +1690,11 @@ static int idetape_end_request(ide_drive_t *drive, int uptodate, int nr_sects) if (error) tape->failed_pc = NULL; + if (!bl...