commit 53752ea210016b548cfc3898e6a5ea338fcb6c2c Author: Greg Kroah-Hartman Date: Wed Feb 8 09:43:17 2017 +0100 Linux 3.18.48 commit 2329bcacd042a021c4b449d805f194851408d19b Author: Greg Kroah-Hartman Date: Tue Feb 7 17:42:33 2017 +0100 Fix "qla2xxx: terminate exchange when command is aborted by LIO" This fixes commit f67924cc39badbc813bd1935f9a025065a6a6534 which was commit 7359df25a53386dd33c223672bbd12cb49d0ce4f upstream. When backporting the patch, there was an unused variable, and the printk type was incorrect. Fix this up by moving back to the correct type as shown in commit 649ee05499d1257a3af0e10d961a1c52d9ef95b7 and remove the unneeded variable. This fixes up two build warnings. Cc: Sasha Levin Signed-off-by: Greg Kroah-Hartman commit 6ae2b0084f9ed794c7dfb4d31db0391bd6a8082c Author: Greg Kroah-Hartman Date: Tue Feb 7 17:25:25 2017 +0100 Fix "tunnels: Don't apply GRO to multiple layers of encapsulation." Commit dd4fff23f0f4c7c5414f50c091c78a7e423f85da which is commit fac8e0f579695a3ecbc4d3cac369139d7f819971 upstream, seems to have included the sit_gro_receive function, yet it never is used, causing an obvious warning message. Hook it up to the correct sit_offload structure. Note, for 3.16, the backport of fac8e0f579695a3ecbc4d3cac369139d7f819971 does not include this function, nor the ipip case. I'm guessing that this is not correct for 3.18, as one of the functions was included, but could be totally wrong. Cc: Jesse Gross Cc: David S. Miller Cc: Ben Hutchings Cc: Sasha Levin Signed-off-by: Greg Kroah-Hartman commit b3a65e4a6cedf0041165e76c708eacc77d8c3c5e Author: Greg Kroah-Hartman Date: Thu Feb 2 22:54:08 2017 +0100 Fix "crypto: algif_hash - Require setkey before accept(2)" Fix up commit cec8983e6d2cf52e60cd59583ae30f81f923f563 which was commit 6de62f15b581f920ade22d758f4c338311c2f0d4 upstream. The function prototypes were wrong. Someone was ignoring compiler warnings :( Cc: Sasha Levin Signed-off-by: Greg Kroah-Hartman commit f7e5f460f5d4e8fa685c7c3bc180374d9cea6ea3 Author: Magnus Damm Date: Mon Jan 26 15:19:51 2015 +0900 Documentation: Remove ZBOOT MMC/SDHI utility and docs commit c6535e1e0361157ea073b57b626d0611b7c4c7a0 upstream. Remove ZBOOT MMC/SDHI Documentation for sh7372 together wit the vrl4 utility. Without sh7372 and Mackerel support these files are no longer useful. Signed-off-by: Magnus Damm Acked-by: Laurent Pinchart Acked-by: Geert Uytterhoeven Signed-off-by: Simon Horman [removes a build warning in 3.18, and as this chip never was made, it is safe to remove the documentation here. The code was removed in 4.1. - gregkh] Signed-off-by: Greg Kroah-Hartman commit fbf1ec2cc65003159192bef4fc5978f717d7b5c2 Author: Dan Carpenter Date: Wed Feb 25 16:17:48 2015 +0300 drm/i915: cleanup some indenting commit ba0635ffb7665d76715b43ae8144e014a90c1e63 upstream. Static checkers complain that we should probably add curly braces because, from the indenting, it looks like seq_printf() should be inside the list_for_each_entry() loop. But the code is actually correct, it's just the indenting which is off. Besides fixing the indenting on seq_printf(), I did add curly braces, because generally mult-line indents should have curly braces to make them more readable. The unintended indent was left behind and not unindented in commit d7f46fc4e7323887494db13f063a8e59861fefb0 Author: Ben Widawsky Date: Fri Dec 6 14:10:55 2013 -0800 drm/i915: Make pin count per VMA Signed-off-by: Dan Carpenter Reviewed-by: Jani Nikula Signed-off-by: Daniel Vetter Signed-off-by: Greg Kroah-Hartman commit df93393787a3fc3b994c5061a890b0250bae0fbc Author: Hans Westgaard Ry Date: Wed Feb 3 09:26:57 2016 +0100 net:Add sysctl_max_skb_frags commit 5f74f82ea34c0da80ea0b49192bb5ea06e063593 upstream. Devices may have limits on the number of fragments in an skb they support. Current codebase uses a constant as maximum for number of fragments one skb can hold and use. When enabling scatter/gather and running traffic with many small messages the codebase uses the maximum number of fragments and may thereby violate the max for certain devices. The patch introduces a global variable as max number of fragments. Signed-off-by: Hans Westgaard Ry Reviewed-by: Håkon Bugge Acked-by: Eric Dumazet Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman commit 1115c5f029831fd3a9f447094069bb01802418a1 Author: Linus Torvalds Date: Wed May 27 15:32:15 2015 -0700 blk: rq_data_dir() should not return a boolean commit 10fbd36e362a0f367e34a7cd876a81295d8fc5ca upstream. rq_data_dir() returns either READ or WRITE (0 == READ, 1 == WRITE), not a boolean value. Now, admittedly the "!= 0" doesn't really change the value (0 stays as zero, 1 stays as one), but it's not only redundant, it confuses gcc, and causes gcc to warn about the construct switch (rq_data_dir(req)) { case READ: ... case WRITE: ... that we have in a few drivers. Now, the gcc warning is silly and stupid (it seems to warn not about the switch value having a different type from the case statements, but about _any_ boolean switch value), but in this case the code itself is silly and stupid too, so let's just change it, and get rid of warnings like this: drivers/block/hd.c: In function ‘hd_request’: drivers/block/hd.c:630:11: warning: switch condition has boolean value [-Wswitch-bool] switch (rq_data_dir(req)) { The odd '!= 0' came in when "cmd_flags" got turned into a "u64" in commit 5953316dbf90 ("block: make rq->cmd_flags be 64-bit") and is presumably because the old code (that just did a logical 'and' with 1) would then end up making the type of rq_data_dir() be u64 too. But if we want to retain the old regular integer type, let's just cast the result to 'int' rather than use that rather odd '!= 0'. Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman commit ad81d8eeefa203914eb3071eab0f3ce6f2f144a4 Author: Andy Shevchenko Date: Tue Oct 28 18:25:01 2014 +0200 spi: dw-mid: refactor to use helpers commit a5c2db964d3eb26b41bd7abc1b13486f732b3aa2 upstream. This patch splits few helpers, namely dw_spi_dma_prepare_rx(), dw_spi_dma_prepare_tx(), and dw_spi_dma_setup() which will be useful for the consequent improvements. There is no functional change. Signed-off-by: Andy Shevchenko Signed-off-by: Mark Brown [removes a build warning with newer versions of gcc - gregkh] Signed-off-by: Greg Kroah-Hartman commit 5e471aea29514fac89871bc23eff49d62f0d8adc Author: Ingo Molnar Date: Fri Nov 23 19:19:07 2012 +0100 x86/boot: Add CONFIG_PARAVIRT_SPINLOCKS quirk to arch/x86/boot/compressed/misc.h commit 927392d73a97d8d235bb65400e2e3c7f0bec2b6f upstream. Linus reported the following new warning on x86 allmodconfig with GCC 5.1: > ./arch/x86/include/asm/spinlock.h: In function ‘arch_spin_lock’: > ./arch/x86/include/asm/spinlock.h:119:3: warning: implicit declaration > of function ‘__ticket_lock_spinning’ [-Wimplicit-function-declaration] > __ticket_lock_spinning(lock, inc.tail); > ^ This warning triggers because of these hacks in misc.h: /* * we have to be careful, because no indirections are allowed here, and * paravirt_ops is a kind of one. As it will only run in baremetal anyway, * we just keep it from happening */ #undef CONFIG_PARAVIRT #undef CONFIG_KASAN But these hacks were not updated when CONFIG_PARAVIRT_SPINLOCKS was added, and eventually (with the introduction of queued paravirt spinlocks in recent kernels) this created an invalid Kconfig combination and broke the build. So add a CONFIG_PARAVIRT_SPINLOCKS #undef line as well. Also remove the _ASM_X86_DESC_H quirk: that undocumented quirk was originally added ages ago, in: 099e1377269a ("x86: use ELF format in compressed images.") and I went back to that kernel (and fixed up the main Makefile which didn't build anymore) and checked what failure it avoided: it avoided an include file dependencies related build failure related to our old x86-platforms code. That old code is long gone, the header dependencies got cleaned up, and the build does not fail anymore with the totality of asm/desc.h included - so remove the quirk. Reported-by: Linus Torvalds Cc: "H. Peter Anvin" Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman commit e721bf1497aa8b4d115126fa1994afc9932c849f Author: Yoshihiro Shimoda Date: Tue Sep 29 18:21:18 2015 +0900 usb: renesas_usbhs: fix build warning if 64-bit architecture commit 9ae7ce00cc1353155b1914bfc40e8362efef7d1c upstream. This patch fixes the following warning if 64-bit architecture environment: ./drivers/usb/renesas_usbhs/common.c:496:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] dparam->type = of_id ? (u32)of_id->data : 0; Acked-by: Geert Uytterhoeven Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 5e5eeda7a02b462f020ea27986f27000a1a7e506 Author: Luis de Bethencourt Date: Wed Oct 21 18:32:38 2015 +0100 staging: rtl8723au: core: rtw_wlan_util: fix misleading indentation commit 8c182ae20791d638c07ff499709c4a1d4697bd7c upstream. For loop is outside of the else branch of the above conditional statement. Fixing misleading indentation. Fix a smatch warning: drivers/staging/rtl8723au/core/rtw_wlan_util.c:528 WMMOnAssocRsp23a() warn: curly braces intended? Signed-off-by: Luis de Bethencourt Acked-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman commit 80f81429e8e4238bc21282b62286110412e600f2 Author: Dan Carpenter Date: Wed Feb 25 16:20:36 2015 +0300 Staging: lustre: missing curly braces in ll_setattr_raw() commit 53bd4a004ee5ff0f71a858de78faac98924b4a87 upstream. >From the indenting, it looks like curly braces were intended here. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman commit a2d6ce032c85e4d63670b9b0a302774ee385a69c Author: Linus Torvalds Date: Wed Feb 11 10:52:56 2015 -0800 xilinx usb2 gadget: get rid of incredibly annoying compile warning commit 7796c11c728ad40ba4151d559a949c002deffb9a upstream. This one was driving me mad, with several lines of warnings during the allmodconfig build for a single bogus pointer cast. The warning was so verbose due to the indirect macro expansion explanation, and the whole thing was just for a debug printout. The bogus pointer-to-integer cast was pointless anyway, so just remove it, and use '%p' to show the pointer. Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman commit 79661eb3d2206dc15b034be7a440ef2430b2aceb Author: Colin Ian King Date: Sat Jan 23 19:33:10 2016 +0000 Staging: iio: adc: fix indent on break statement commit b6acb0cfc21293a1bfc283e9217f58f7474ef728 upstream. Fix indent warning when building with gcc 6: drivers/staging/iio/adc/ad7192.c:239:4: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation] Signed-off-by: Colin Ian King Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman commit d2965f15262acd6e6d013a4aa0d939bf09e65626 Author: Anil Gurumurthy Date: Thu Aug 13 06:41:51 2015 -0400 bfa: Fix indentation commit b7f4d6343820af5c2dc3979e91d85e71e638cd3d upstream. Signed-off-by: Anil Gurumurthy Tested-by : Sudarasana Kalluru Reviewed-by: Ewan D. Milne Signed-off-by: James Bottomley Signed-off-by: Greg Kroah-Hartman commit 696e37395a2a4b72e48a995f3a45312d34326c11 Author: Joe Perches Date: Tue Nov 18 05:53:00 2014 +0000 i40e: Reduce stack in i40e_dbg_dump_desc commit e6c97234d1b18d4751671df15d52e29daa8a7ba8 upstream. Reduce stack use by using kmemdup and not using a very large struct on stack. In function ‘i40e_dbg_dump_desc’: warning: the frame size of 8192 bytes is larger than 2048 bytes [-Wframe-larger-than=] Signed-off-by: Joe Perches Tested-by: Jim Young Signed-off-by: Jeff Kirsher Signed-off-by: Greg Kroah-Hartman commit b927840c1a76639555621c8636a68c85159d6a69 Author: Tim Gardner Date: Fri Oct 30 12:22:58 2015 -0600 be2iscsi: Fix bogus WARN_ON length check commit dd29dae00d39186890a5eaa2fe4ad8768bfd41a9 upstream. drivers/scsi/be2iscsi/be_main.c: In function 'be_sgl_create_contiguous': drivers/scsi/be2iscsi/be_main.c:3187:18: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] WARN_ON(!length > 0); gcc version 5.2.1 Signed-off-by: Tim Gardner Cc: Jayamohan Kallickal Cc: Minh Tran Cc: John Soni Jose Cc: "James E.J. Bottomley" Reported-by: Joel Stanley Reviewed-by: Manoj Kumar Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman commit f513703e2366c0e2f9a0e29926eabdfb55aecfc6 Author: Arnd Bergmann Date: Thu May 19 09:58:49 2016 +0200 iwlegacy: avoid warning about missing braces commit 2cce76c3fab410520610a7d2f52faebc3cfcf843 upstream. gcc-6 warns about code in il3945_hw_txq_ctx_free() being somewhat ambiguous: drivers/net/wireless/intel/iwlegacy/3945.c:1022:5: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] This adds a set of curly braces to avoid the warning. Signed-off-by: Arnd Bergmann Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo Signed-off-by: Greg Kroah-Hartman commit ed3bd8d2c166ed94bd7208b0fcf3b7bb7a6cdeb8 Author: David Malcolm Date: Tue Jun 2 15:31:17 2015 -0400 drivers/net/ethernet/dec/tulip/uli526x.c: fix misleading indentation in uli526x_timer commit e1395a321eab1a7833d82e952eb8255e0a1f03cb upstream. This code in drivers/net/ethernet/dec/tulip/uli526x.c function "uli526x_timer": 1086 } else 1087 if ((tmp_cr12 & 0x3) && db->link_failed) { [...snip...] 1109 } 1110 else if(!(tmp_cr12 & 0x3) && db->link_failed) 1111 { [...snip...] 1117 } 1118 db->init=0; is misleadingly indented: the db->init=0 is indented as if part of the else clause at line 1086, but it is independent of it (no braces before the "if" at line 1087). This patch fixes the indentation to reflect the actual meaning of the code, though is it actually meant to be part of the "else" clause? (I'm a compiler developer, not a kernel person). It also adds spaces around the assignment, to placate checkpatch.pl. Seen via an experimental new gcc warning I'm working on for gcc 6, -Wmisleading-indentation, using gcc r223098 adding -Werror=misleading-indentation to KBUILD_CFLAGS in Makefile. The experimental GCC emits this warning (as an error), rightly IMHO: drivers/net/ethernet/dec/tulip/uli526x.c: In function ‘uli526x_timer’: drivers/net/ethernet/dec/tulip/uli526x.c:1118:3: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation] db->init=0; ^ drivers/net/ethernet/dec/tulip/uli526x.c:1086:4: note: ...this ‘else’ clause, but it is not } else ^ Hope this is helpful Dave Signed-off-by: David Malcolm Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman commit 25f6501da53fa43eca5a29508bd73a7cdf86de69 Author: Linus Torvalds Date: Tue Apr 21 12:49:33 2015 -0700 media: remove unused variable that causes a warning commit 1d11437f4fd02f9b5d3749675a1232216787dcc6 upstream. My 'allmodconfig' build is _almost_ free of warnings, and most of the remaining ones are for legacy drivers that just do bad things that I can't find it in my black heart to care too much about. But this one was just annoying me: drivers/media/v4l2-core/videobuf2-core.c:3256:26: warning: unused variable ‘fileio’ [-Wunused-variable] because commit 0e661006370b ("[media] vb2: fix 'UNBALANCED' warnings when calling vb2_thread_stop()") removed all users of 'fileio' and instead calls "__vb2_cleanup_fileio(q)" to clean up q->fileio. But the now unused 'fileio' variable was left around. Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman commit d3eb0660cac8063329ca53df6d1134d5133bc3ca Author: Tomer Barletz Date: Tue Aug 4 21:00:24 2015 -0700 mtd: blkdevs: fix switch-bool compilation warning commit cc7fce80229067890365c1ee196be5d304d36dea upstream. With gcc 5.1 I get: warning: switch condition has boolean value [-Wswitch-bool] Signed-off-by: Tomer Barletz Signed-off-by: Brian Norris Signed-off-by: Greg Kroah-Hartman commit 8ce8274bbc3c8715410b047258b7108de4025efc Author: David S. Miller Date: Mon Apr 27 13:20:34 2015 -0400 netfilter; Add some missing default cases to switch statements in nft_reject. commit 129d23a56623eea0947a05288158d76dc7f2f0ac upstream. This fixes: ==================== net/netfilter/nft_reject.c: In function ‘nft_reject_dump’: net/netfilter/nft_reject.c:61:2: warning: enumeration value ‘NFT_REJECT_TCP_RST’ not handled in switch [-Wswitch] switch (priv->type) { ^ net/netfilter/nft_reject.c:61:2: warning: enumeration value ‘NFT_REJECT_ICMPX_UNREACH’ not handled in switch [-Wswi\ tch] net/netfilter/nft_reject_inet.c: In function ‘nft_reject_inet_dump’: net/netfilter/nft_reject_inet.c:105:2: warning: enumeration value ‘NFT_REJECT_TCP_RST’ not handled in switch [-Wswi\ tch] switch (priv->type) { ^ ==================== Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman commit fb095146dd0e9e8c3a11295effeefdb0eda3a4bb Author: Hans Verkuil Date: Mon Apr 27 04:29:52 2015 -0300 s3c-camif: fix compiler warnings commit 7e0d4e92269e574e50a58041fac4cc75a149828c upstream. Fix these compiler warnings that appeared after switching to gcc-5.1.0: drivers/media/platform/s3c-camif/camif-capture.c: In function 'sensor_set_power': drivers/media/platform/s3c-camif/camif-capture.c:118:10: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] if (!on == camif->sensor.power_count) ^ drivers/media/platform/s3c-camif/camif-capture.c: In function 'sensor_set_streaming': drivers/media/platform/s3c-camif/camif-capture.c:134:10: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] if (!on == camif->sensor.stream_count) ^ Signed-off-by: Hans Verkuil Cc: Kamil Debski Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman commit 696ebb3a3a1f252301299c3168139dd20b6363da Author: Juergen Gross Date: Thu Jun 23 07:12:27 2016 +0200 x86/xen: fix upper bound of pmd loop in xen_cleanhighmap() commit 1cf38741308c64d08553602b3374fb39224eeb5a upstream. xen_cleanhighmap() is operating on level2_kernel_pgt only. The upper bound of the loop setting non-kernel-image entries to zero should not exceed the size of level2_kernel_pgt. Reported-by: Linus Torvalds Signed-off-by: Juergen Gross Signed-off-by: David Vrabel Signed-off-by: Greg Kroah-Hartman commit a46b14e0896358f70588f7086256118c71731ce7 Author: Tomer Barletz Date: Sun Aug 2 02:08:57 2015 -0700 ALSA: oxygen: Fix logical-not-parentheses warning commit 8ec7cfce3762299ae289c384e281b2f4010ae231 upstream. This fixes the following warning, that is seen with gcc 5.1: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]. Signed-off-by: Tomer Barletz Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman commit 8db58d097880ca79e32245dbc437712bdb82412e Author: James C Boyd Date: Wed May 27 17:09:06 2015 -0500 HID: hid-input: Add parentheses to quell gcc warning commit 09a5c34e8d6b05663ec4c3d22b1fbd9fec89aaf9 upstream. GCC reports a -Wlogical-not-parentheses warning here; therefore add parentheses to shut it up and to express our intent more. Signed-off-by: James C Boyd Signed-off-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman commit 8b367e00da604df489c8574bb1e21fab5bda29f3 Author: Arnd Bergmann Date: Tue May 19 16:34:05 2015 +0200 ata: hpt366: fix constant cast warning commit 6ec0a86c645be3fce7ade42f165a6a417c3503b1 upstream. gcc-5.x warns about a preexisting problem in the hpt36x pata driver: drivers/ata/pata_hpt366.c: In function 'hpt36x_init_one': drivers/ata/pata_hpt366.c:376:9: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-array-qualifiers] Other ata drivers have the same problem, as ata_pci_bmdma_init_one takes a non-const pointer, and they solve it by using a cast to turn that pointer into a normal non-const pointer. I also tried to change the ata core code to make host->private_data a const pointer, but that quickly got out of hand, as some other drivers expect it to be writable, so I ended up using the same hack as the others here. Signed-off-by: Arnd Bergmann Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman commit 371fdd96c182e166b4e65a3724da94745e69f3b0 Author: Jiri Slaby Date: Thu Feb 19 15:20:43 2015 +0100 Bluetooth: make hci_test_bit's addr const commit 9391976a4da0d2a30abdb8d2704cfc7bf4bf9aab upstream. gcc5 warns about passing a const array to hci_test_bit which takes a non-const pointer: net/bluetooth/hci_sock.c: In function ‘hci_sock_sendmsg’: net/bluetooth/hci_sock.c:955:8: warning: passing argument 2 of ‘hci_test_bit’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-array-qualifiers] &hci_sec_filter.ocf_mask[ogf])) && ^ net/bluetooth/hci_sock.c:49:19: note: expected ‘void *’ but argument is of type ‘const __u32 (*)[4] {aka const unsigned int (*)[4]}’ static inline int hci_test_bit(int nr, void *addr) ^ So make 'addr' 'const void *'. Signed-off-by: Jiri Slaby Signed-off-by: Marcel Holtmann Cc: Gustavo Padovan Cc: Johan Hedberg Signed-off-by: Greg Kroah-Hartman commit 81b6187123b1e765f2a74b2cfca603de02753321 Author: David Miller Date: Tue Apr 7 23:05:42 2015 -0400 netfilter: Fix switch statement warnings with recent gcc. commit c1f866767777d1c6abae0ec57effffcb72017c00 upstream. More recent GCC warns about two kinds of switch statement uses: 1) Switching on an enumeration, but not having an explicit case statement for all members of the enumeration. To show the compiler this is intentional, we simply add a default case with nothing more than a break statement. 2) Switching on a boolean value. I think this warning is dumb but nevertheless you get it wholesale with -Wswitch. This patch cures all such warnings in netfilter. Signed-off-by: David S. Miller Acked-by: Pablo Neira Ayuso Signed-off-by: Greg Kroah-Hartman commit e6ec9d2751d086e1dafc25812d8f786a1dfc2b46 Author: Linus Torvalds Date: Wed Jul 27 19:03:04 2016 -0700 Disable "frame-address" warning commit 124a3d88fa20e1869fc229d7d8c740cc81944264 upstream. Newer versions of gcc warn about the use of __builtin_return_address() with a non-zero argument when "-Wall" is specified: kernel/trace/trace_irqsoff.c: In function ‘stop_critical_timings’: kernel/trace/trace_irqsoff.c:433:86: warning: calling ‘__builtin_return_address’ with a nonzero argument is unsafe [-Wframe-address] stop_critical_timing(CALLER_ADDR0, CALLER_ADDR1); [ .. repeats a few times for other similar cases .. ] It is true that a non-zero argument is somewhat dangerous, and we do not actually have very many uses of that in the kernel - but the ftrace code does use it, and as Stephen Rostedt says: "We are well aware of the danger of using __builtin_return_address() of > 0. In fact that's part of the reason for having the "thunk" code in x86 (See arch/x86/entry/thunk_{64,32}.S). [..] it adds extra frames when tracking irqs off sections, to prevent __builtin_return_address() from accessing bad areas. In fact the thunk_32.S states: 'Trampoline to trace irqs off. (otherwise CALLER_ADDR1 might crash)'." For now, __builtin_return_address() with a non-zero argument is the best we can do, and the warning is not helpful and can end up making people miss other warnings for real problems. So disable the frame-address warning on compilers that need it. Acked-by: Steven Rostedt Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman commit 3f6aec579184989184437fdbfa9b81875d5f7735 Author: Arnd Bergmann Date: Mon Mar 14 15:18:38 2016 +0100 net: caif: fix misleading indentation commit 8e0cc8c326d99e41468c96fea9785ab78883a281 upstream. gcc points out code that is not indented the way it is interpreted: net/caif/cfpkt_skbuff.c: In function 'cfpkt_setlen': net/caif/cfpkt_skbuff.c:289:4: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation] return cfpkt_getlen(pkt); ^~~~~~ net/caif/cfpkt_skbuff.c:286:3: note: ...this 'else' clause, but it is not else ^~~~ It is clear from the context that not returning here would be a bug, as we'd end up passing a negative length into a function that takes a u16 length, so it is not missing curly braces here, and I'm assuming that the indentation is the only part that's wrong about it. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman commit 65cdae9cbe797c33a574e4beaabba4049f4f5eec Author: Dan Carpenter Date: Wed Apr 15 16:16:36 2015 -0700 paride: fix the "verbose" module param commit 946e87981942552e526aca9cb6204f02a6c847cb upstream. The verbose module parameter can be set to 2 for extremely verbose messages so the type should be int instead of bool. Signed-off-by: Dan Carpenter Cc: Tim Waugh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman commit ce08f0e982eea39a2f6ea67c859812f01ad92143 Author: Tillmann Heidsieck Date: Sat Oct 10 21:47:19 2015 +0200 atm: iphase: fix misleading indention commit cbb41b91e68a302087762823136c9067138cff7c upstream. Fix a smatch warning: drivers/atm/iphase.c:1178 rx_pkt() warn: curly braces intended? The code is correct, the indention is misleading. In case the allocation of skb fails, we want to skip to the end. Signed-off-by: Tillmann Heidsieck Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman commit e2dee7fb89d91333f0ae01efa17d8a943910d4d0 Author: Andrew Morton Date: Fri Feb 13 14:39:11 2015 -0800 MODULE_DEVICE_TABLE: fix some callsites commit 0f989f749b51ec1fd94bb5a42f8ad10c8b9f73cb upstream. The patch "module: fix types of device tables aliases" newly requires that invocations of MODULE_DEVICE_TABLE(type, name); come *after* the definition of `name'. That is reasonable, but some drivers weren't doing this. Fix them. Cc: James Bottomley Cc: Andrey Ryabinin Cc: David Miller Cc: Hans Verkuil Acked-by: Mauro Carvalho Chehab Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman commit af93ebdd005bea26ae4b2a1d83151410641e9ec6 Author: Andrey Ryabinin Date: Fri Feb 13 14:40:13 2015 -0800 module: fix types of device tables aliases commit 6301939d97d079f0d3dbe71e750f4daf5d39fc33 upstream. MODULE_DEVICE_TABLE() macro used to create aliases to device tables. Normally alias should have the same type as aliased symbol. Device tables are arrays, so they have 'struct type##_device_id[x]' types. Alias created by MODULE_DEVICE_TABLE() will have non-array type - 'struct type##_device_id'. This inconsistency confuses compiler, it could make a wrong assumption about variable's size which leads KASan to produce a false positive report about out of bounds access. For every global variable compiler calls __asan_register_globals() passing information about global variable (address, size, size with redzone, name ...) __asan_register_globals() poison symbols redzone to detect possible out of bounds accesses. When symbol has an alias __asan_register_globals() will be called as for symbol so for alias. Compiler determines size of variable by size of variable's type. Alias and symbol have the same address, so if alias have the wrong size part of memory that actually belongs to the symbol could be poisoned as redzone of alias symbol. By fixing type of alias symbol we will fix size of it, so __asan_register_globals() will not poison valid memory. Signed-off-by: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Konstantin Serebryany Cc: Dmitry Chernenkov Signed-off-by: Andrey Konovalov Cc: Yuri Gribov Cc: Konstantin Khlebnikov Cc: Sasha Levin Cc: Christoph Lameter Cc: Joonsoo Kim Cc: Dave Hansen Cc: Andi Kleen Cc: Ingo Molnar Cc: Thomas Gleixner Cc: "H. Peter Anvin" Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman