Skip to contentSkip to conversation

Linux 3.18.48

DISCUSSION Greg KH 1 participant 2 messages Feb 8, 2017 Stable branch

lore
Share & tools
lore

Greg KH

author maintainer
#0 lore raw

I'm announcing the release of the 3.18.48 kernel.

Wait, what? Yeah, 3.18.48, you read that right.

Turns out there was a bug in 3.18.47 in one of the backports. And a bug in 3.18.27 as well, with one of the backports there. And a very minor issue in the 3.18.28 release, but no one cares about the debug messages for a specific scsi driver, so you can just ignore that issue...

Anyway, here's a 3.18 release, hopefully the very last one, that fixes the above mentioned issues, and a bunch of other basic build warnings with "newer" versions of gcc (i.e. newer than when 3.18 was first released.) The build warning removals were added in order to help track down the "real" issues mentioned above. Having clean builds really does help, otherwise you get blind to real issues.

So, if you rely on 3.18.y, you should upgrade. But really, go use 4.4.y or 4.9.y, those are both much better, and far more secure.

Oh, if you are _stuck_ on 3.18 (/me eyes his new phone), well, I might have a plan for you, that first involves you yelling very loudly at your hardware vendor and refusing to buy from them again unless they cut this crap out. After you properly vent to them, drop me an email and let's see what we can come up with, you aren't in this sinking ship alone, and it's obvious your vendor isn't going to help out...

The updated 3.18.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.18.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary

thanks,

greg k-h

------------

 Documentation/Makefile                           |    2 
 Documentation/arm/Makefile                       |    1 
 Documentation/arm/SH-Mobile/Makefile             |    7 
 Documentation/arm/SH-Mobile/vrl4.c               |  170 -----------------------
 Documentation/arm/SH-Mobile/zboot-rom-mmcif.txt  |   29 ---
 Documentation/arm/SH-Mobile/zboot-rom-sdhi.txt   |   42 -----
 Documentation/video4linux/v4l2-pci-skeleton.c    |    2 
 Makefile                                         |    3 
 arch/x86/boot/compressed/misc.h                  |   11 -
 arch/x86/xen/mmu.c                               |    2 
 crypto/algif_hash.c                              |    8 -
 drivers/ata/pata_hpt366.c                        |    4 
 drivers/atm/iphase.c                             |    2 
 drivers/block/paride/pg.c                        |    4 
 drivers/gpu/drm/i915/i915_debugfs.c              |    5 
 drivers/hid/hid-input.c                          |    2 
 drivers/media/platform/s3c-camif/camif-capture.c |    4 
 drivers/media/v4l2-core/videobuf2-core.c         |    1 
 drivers/mtd/mtd_blkdevs.c                        |    8 -
 drivers/net/ethernet/dec/tulip/uli526x.c         |    2 
 drivers/net/ethernet/emulex/benet/be_main.c      |    1 
 drivers/net/ethernet/intel/i40e/i40e_debugfs.c   |   30 ++--
 drivers/net/wireless/iwlegacy/3945.c             |    3 
 drivers/scsi/be2iscsi/be_main.c                  |    3 
 drivers/scsi/bfa/bfa_ioc.c                       |   22 +-
 drivers/scsi/qla2xxx/qla_target.c                |    3 
 drivers/spi/spi-dw-mid.c                         |   69 ++++++---
 drivers/staging/iio/adc/ad7192.c                 |    2 
 drivers/staging/lustre/lustre/llite/llite_lib.c  |    3 
 drivers/staging/rtl8723au/core/rtw_wlan_util.c   |    2 
 drivers/usb/gadget/udc/udc-xilinx.c              |    4 
 drivers/usb/renesas_usbhs/common.c               |    2 
 include/linux/blkdev.h                           |    2 
 include/linux/module.h                           |    2 
 include/linux/skbuff.h                           |    1 
 include/linux/usb/renesas_usbhs.h                |    2 
 net/bluetooth/hci_sock.c                         |    4 
 net/bridge/netfilter/nft_reject_bridge.c         |    2 
 net/caif/cfpkt_skbuff.c                          |    2 
 net/core/skbuff.c                                |    2 
 net/core/sysctl_net_core.c                       |   10 +
 net/ipv4/netfilter/nft_reject_ipv4.c             |    2 
 net/ipv4/tcp.c                                   |    4 
 net/ipv6/ip6_offload.c                           |    2 
 net/ipv6/netfilter/nft_reject_ipv6.c             |    2 
 net/netfilter/nft_compat.c                       |    6 
 net/netfilter/nft_ct.c                           |    8 +
 net/netfilter/nft_reject.c                       |    2 
 net/netfilter/nft_reject_inet.c                  |    2 
 sound/pci/oxygen/oxygen_mixer.c                  |    2 
 50 files changed, 159 insertions(+), 351 deletions(-)

Andrew Morton (1):
MODULE_DEVICE_TABLE: fix some callsites

Andrey Ryabinin (1):
module: fix types of device tables aliases

Andy Shevchenko (1):
spi: dw-mid: refactor to use helpers

Anil Gurumurthy (1):
bfa: Fix indentation

Arnd Bergmann (3):
net: caif: fix misleading indentation
ata: hpt366: fix constant cast warning
iwlegacy: avoid warning about missing braces

Colin Ian King (1):
Staging: iio: adc: fix indent on break statement

Dan Carpenter (3):
paride: fix the "verbose" module param
Staging: lustre: missing curly braces in ll_setattr_raw() drm/i915: cleanup some indenting

David Malcolm (1):
drivers/net/ethernet/dec/tulip/uli526x.c: fix misleading indentation in uli526x_timer

David Miller (1):
netfilter: Fix switch statement warnings with recent gcc.

David S. Miller (1):
netfilter; Add some missing default cases to switch statements in nft_reject.

Greg Kroah-Hartman (4):
Fix "crypto: algif_hash - Require setkey before accept(2)" Fix "tunnels: Don't apply GRO to multiple layers of encapsulation." Fix "qla2xxx: terminate exchange when command is aborted by LIO" Linux 3.18.48

Hans Verkuil (1):
s3c-camif: fix compiler warnings

Hans Westgaard Ry (1):
net:Add sysctl_max_skb_frags

Ingo Molnar (1):
x86/boot: Add CONFIG_PARAVIRT_SPINLOCKS quirk to arch/x86/boot/compressed/misc.h

James C Boyd (1):
HID: hid-input: Add parentheses to quell gcc warning

Jiri Slaby (1):
Bluetooth: make hci_test_bit's addr const

Joe Perches (1):
i40e: Reduce stack in i40e_dbg_dump_desc

Juergen Gross (1):
x86/xen: fix upper bound of pmd loop in xen_cleanhighmap()

Linus Torvalds (4):
Disable "frame-address" warning
media: remove unused variable that causes a warning xilinx usb2 gadget: get rid of incredibly annoying compile warning
blk: rq_data_dir() should not return a boolean

Luis de Bethencourt (1):
staging: rtl8723au: core: rtw_wlan_util: fix misleading indentation

Magnus Damm (1):
Documentation: Remove ZBOOT MMC/SDHI utility and docs

Tillmann Heidsieck (1):
atm: iphase: fix misleading indention

Tim Gardner (1):
be2iscsi: Fix bogus WARN_ON length check

Tomer Barletz (2):
ALSA: oxygen: Fix logical-not-parentheses warning
mtd: blkdevs: fix switch-bool compilation warning

Yoshihiro Shimoda (1):
usb: renesas_usbhs: fix build warning if 64-bit architecture

author maintainer
#1 lore raw
Documentation/Makefile +1 -1
index 6883a1b9b351..bc0548201755 100644
@@ -1,4 +1,4 @@
-subdir-y := accounting arm auxdisplay blackfin connector \
+subdir-y := accounting auxdisplay blackfin connector \
 	filesystems filesystems ia64 laptops mic misc-devices \
 	networking pcmcia prctl ptp spi timers vDSO video4linux \
 	watchdog
Documentation/arm/Makefile deleted +0 -1
deleted file mode 100644
index 732c77050cff..000000000000
@@ -1 +0,0 @@
-subdir-y := SH-Mobile
Documentation/arm/SH-Mobile/Makefile deleted +0 -7
deleted file mode 100644
index bca8a7ef6bbe..000000000000
@@ -1,7 +0,0 @@
-# List of programs to build
-hostprogs-y := vrl4
-
-# Tell kbuild to always build the programs
-always := $(hostprogs-y)
-
-HOSTCFLAGS_vrl4.o += -I$(objtree)/usr/include -I$(srctree)/tools/include
Documentation/arm/SH-Mobile/vrl4.c deleted +0 -170

170 lines not on this page · raw message

Documentation/arm/SH-Mobile/zboot-rom-mmcif.txt deleted +0 -29
deleted file mode 100644
index efff8ae2713d..000000000000
@@ -1,29 +0,0 @@
-ROM-able zImage boot from MMC
------------------------------
-
-An ROM-able zImage compiled with ZBOOT_ROM_MMCIF may be written to MMC and
-SuperH Mobile ARM will to boot directly from the MMCIF hardware block.
-
-This is achieved by the mask ROM loading the first portion of the image into
-MERAM and then jumping to it. This portion contains loader code which
-copies the entire image to SDRAM and jumps to it. From there the zImage
-boot code proceeds as normal, uncompressing the image into its final
-location and then jumping to it.
-
-This code has been tested on an AP4EB board using the developer 1A eMMC
-boot mode which is configured using the following jumper settings.
-The board used for testing required a patched mask ROM in order for
-this mode to function.
-
-   8 7 6 5 4 3 2 1
-   x|x|x|x|x| |x|
-S4 -+-+-+-+-+-+-+-
-    | | | | |x| |x on
-
-The zImage must be written to the MMC card at sector 1 (512 bytes) in
-vrl4 format. A utility vrl4 is supplied to accomplish this.
-
-e.g.
-	vrl4 < zImage | dd of=/dev/sdX bs=512 seek=1
-
-A dual-voltage MMC 4.0 card was used for testing.
Documentation/arm/SH-Mobile/zboot-rom-sdhi.txt deleted +0 -42

42 lines not on this page · raw message

Documentation/video4linux/v4l2-pci-skeleton.c +1 -1
index 006721e43b2a..7bd1b975bfd2 100644
@@ -42,7 +42,6 @@
 MODULE_DESCRIPTION("V4L2 PCI Skeleton Driver");
 MODULE_AUTHOR("Hans Verkuil");
 MODULE_LICENSE("GPL v2");
-MODULE_DEVICE_TABLE(pci, skeleton_pci_tbl);
 
 /**
  * struct skeleton - All internal data for one instance of device
@@ -95,6 +94,7 @@ static const struct pci_device_id skeleton_pci_tbl[] = {
 	/* { PCI_DEVICE(PCI_VENDOR_ID_, PCI_DEVICE_ID_) }, */
 	{ 0, }
 };
+MODULE_DEVICE_TABLE(pci, skeleton_pci_tbl);
 
 /*
  * HDTV: this structure has the capabilities of the HDTV receiver.
Makefile +2 -1
index 9132f73528b3..52d32f6bd7c5 100644
@@ -1,6 +1,6 @@
 VERSION = 3
 PATCHLEVEL = 18
-SUBLEVEL = 47
+SUBLEVEL = 48
 EXTRAVERSION =
 NAME = Diseased Newt
 
@@ -610,6 +610,7 @@ all: vmlinux
 include $(srctree)/arch/$(SRCARCH)/Makefile
 
 KBUILD_CFLAGS	+= $(call cc-option,-fno-delete-null-pointer-checks,)
+KBUILD_CFLAGS	+= $(call cc-disable-warning,frame-address,)
 KBUILD_CFLAGS	+= $(call cc-option,-fno-PIE)
 KBUILD_AFLAGS	+= $(call cc-option,-fno-PIE)
 
arch/x86/boot/compressed/misc.h +5 -6
index 24e3e569a13c..124312be129b 100644
@@ -2,14 +2,13 @@
 #define BOOT_COMPRESSED_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
+ * Special hack: 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. (This list needs to be extended when new
+ * paravirt and debugging variants are added.)
  */
 #undef CONFIG_PARAVIRT
-#ifdef CONFIG_X86_32
-#define _ASM_X86_DESC_H 1
-#endif
+#undef CONFIG_PARAVIRT_SPINLOCKS
 
 #include <linux/linkage.h>
 #include <linux/screen_info.h>
arch/x86/xen/mmu.c +1 -1
index a8a1a3d08d4d..039d4e14194d 100644
@@ -1147,7 +1147,7 @@ static void __init xen_cleanhighmap(unsigned long vaddr,
 
 	/* NOTE: The loop is more greedy than the cleanup_highmap variant.
 	 * We include the PMD passed in on _both_ boundaries. */
-	for (; vaddr <= vaddr_end && (pmd < (level2_kernel_pgt + PAGE_SIZE));
+	for (; vaddr <= vaddr_end && (pmd < (level2_kernel_pgt + PTRS_PER_PMD));
 			pmd++, vaddr += PMD_SIZE) {
 		if (pmd_none(*pmd))
 			continue;
crypto/algif_hash.c +4 -4
index 434af81b9e33..df99445a899a 100644
@@ -283,8 +283,8 @@ unlock_child:
 	return err;
 }
 
-static int hash_sendmsg_nokey(struct socket *sock, struct msghdr *msg,
-			      size_t size)
+static int hash_sendmsg_nokey(struct kiocb *unused, struct socket *sock,
+			      struct msghdr *msg, size_t size)
 {
 	int err;
 
@@ -307,8 +307,8 @@ static ssize_t hash_sendpage_nokey(struct socket *sock, struct page *page,
 	return hash_sendpage(sock, page, offset, size, flags);
 }
 
-static int hash_recvmsg_nokey(struct socket *sock, struct msghdr *msg,
-			      size_t ignored, int flags)
+static int hash_recvmsg_nokey(struct kiocb *unused, struct socket *sock,
+			      struct msghdr *msg, size_t ignored, int flags)
 {
 	int err;
 
drivers/ata/pata_hpt366.c +2 -2
index cbc3de793d1d..0038dc4c06c7 100644
@@ -352,7 +352,7 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 	};
 	const struct ata_port_info *ppi[] = { &info_hpt366, NULL };
 
-	void *hpriv = NULL;
+	const void *hpriv = NULL;
 	u32 reg1;
 	int rc;
 
@@ -383,7 +383,7 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 		break;
 	}
 	/* Now kick off ATA set up */
-	return ata_pci_bmdma_init_one(dev, ppi, &hpt36x_sht, hpriv, 0);
+	return ata_pci_bmdma_init_one(dev, ppi, &hpt36x_sht, (void *)hpriv, 0);
 }
 
 #ifdef CONFIG_PM_SLEEP
drivers/atm/iphase.c +1 -1
index 4217f29a85e0..816087b68ec4 100644
@@ -1175,7 +1175,7 @@ static int rx_pkt(struct atm_dev *dev)
         if (!(skb = atm_alloc_charge(vcc, len, GFP_ATOMIC))) {
            if (vcc->vci < 32)
               printk("Drop control packets\n");
-	      goto out_free_desc;
+	   goto out_free_desc;
         }
 	skb_put(skb,len);  
         // pwang_test
drivers/block/paride/pg.c +2 -2
index 2ce3dfd7e6b9..876d0c3eaf58 100644
@@ -137,7 +137,7 @@
 
 */
 
-static bool verbose = 0;
+static int verbose;
 static int major = PG_MAJOR;
 static char *name = PG_NAME;
 static int disable = 0;
@@ -168,7 +168,7 @@ enum {D_PRT, D_PRO, D_UNI, D_MOD, D_SLV, D_DLY};
 
 #include <asm/uaccess.h>
 
-module_param(verbose, bool, 0644);
+module_param(verbose, int, 0644);
 module_param(major, int, 0);
 module_param(name, charp, 0);
 module_param_array(drive0, int, NULL, 0);
drivers/gpu/drm/i915/i915_debugfs.c +3 -2
index 063b44817e08..ccc17703014e 100644
@@ -141,10 +141,11 @@ describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj)
 		   obj->madv == I915_MADV_DONTNEED ? " purgeable" : "");
 	if (obj->base.name)
 		seq_printf(m, " (name: %d)", obj->base.name);
-	list_for_each_entry(vma, &obj->vma_list, vma_link)
+	list_for_each_entry(vma, &obj->vma_list, vma_link) {
 		if (vma->pin_count > 0)
 			pin_count++;
-		seq_printf(m, " (pinned x %d)", pin_count);
+	}
+	seq_printf(m, " (pinned x %d)", pin_count);
 	if (obj->pin_display)
 		seq_printf(m, " (display)");
 	if (obj->fence_reg != I915_FENCE_REG_NONE)
drivers/hid/hid-input.c +1 -1
index 01c7a08a66e1..53d325968e42 100644
@@ -1122,7 +1122,7 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
 		return;
 
 	/* report the usage code as scancode if the key status has changed */
-	if (usage->type == EV_KEY && !!test_bit(usage->code, input->key) != value)
+	if (usage->type == EV_KEY && (!!test_bit(usage->code, input->key)) != value)
 		input_event(input, EV_MSC, MSC_SCAN, usage->hid);
 
 	input_event(input, usage->type, usage->code, value);
drivers/media/platform/s3c-camif/camif-capture.c +2 -2
index 4f81b4c9d113..df33e720d664 100644
@@ -115,7 +115,7 @@ static int sensor_set_power(struct camif_dev *camif, int on)
 	struct cam_sensor *sensor = &camif->sensor;
 	int err = 0;
 
-	if (!on == camif->sensor.power_count)
+	if (camif->sensor.power_count == !on)
 		err = v4l2_subdev_call(sensor->sd, core, s_power, on);
 	if (!err)
 		sensor->power_count += on ? 1 : -1;
@@ -131,7 +131,7 @@ static int sensor_set_streaming(struct camif_dev *camif, int on)
 	struct cam_sensor *sensor = &camif->sensor;
 	int err = 0;
 
-	if (!on == camif->sensor.stream_count)
+	if (camif->sensor.stream_count == !on)
 		err = v4l2_subdev_call(sensor->sd, video, s_stream, on);
 	if (!err)
 		sensor->stream_count += on ? 1 : -1;
drivers/media/v4l2-core/videobuf2-core.c +0 -1
index 1d1c4d35a1a6..1c2cc6fee351 100644
@@ -3221,7 +3221,6 @@ EXPORT_SYMBOL_GPL(vb2_thread_start);
 int vb2_thread_stop(struct vb2_queue *q)
 {
 	struct vb2_threadio_data *threadio = q->threadio;
-	struct vb2_fileio_data *fileio = q->fileio;
 	int err;
 
 	if (threadio == NULL)
drivers/mtd/mtd_blkdevs.c +2 -6
index 3a69b1e56908..3e3aa17ee3bd 100644
@@ -97,14 +97,13 @@ static int do_blktrans_request(struct mtd_blktrans_ops *tr,
 	if (req->cmd_flags & REQ_DISCARD)
 		return tr->discard(dev, block, nsect);
 
-	switch(rq_data_dir(req)) {
-	case READ:
+	if (rq_data_dir(req) == READ) {
 		for (; nsect > 0; nsect--, block++, buf += tr->blksize)
 			if (tr->readsect(dev, block, buf))
 				return -EIO;
 		rq_flush_dcache_pages(req);
 		return 0;
-	case WRITE:
+	} else {
 		if (!tr->writesect)
 			return -EIO;
 
@@ -113,9 +112,6 @@ static int do_blktrans_request(struct mtd_blktrans_ops *tr,
 			if (tr->writesect(dev, block, buf))
 				return -EIO;
 		return 0;
-	default:
-		printk(KERN_NOTICE "Unknown request %u\n", rq_data_dir(req));
-		return -EIO;
 	}
 }
 
drivers/net/ethernet/dec/tulip/uli526x.c +1 -1
index 4061f9b22812..19063aceb25d 100644
@@ -1115,7 +1115,7 @@ static void uli526x_timer(unsigned long data)
 				netif_carrier_off(dev);
 			}
 		}
-		db->init=0;
+	db->init = 0;
 
 	/* Timer active again */
 	db->timer.expires = ULI526X_TIMER_WUT;
drivers/net/ethernet/emulex/benet/be_main.c +0 -1
index fdd36794c536..1f65817d4674 100644
@@ -26,7 +26,6 @@
 #include <net/vxlan.h>
 
 MODULE_VERSION(DRV_VER);
-MODULE_DEVICE_TABLE(pci, be_dev_ids);
 MODULE_DESCRIPTION(DRV_DESC " " DRV_VER);
 MODULE_AUTHOR("Emulex Corporation");
 MODULE_LICENSE("GPL");
drivers/net/ethernet/intel/i40e/i40e_debugfs.c +17 -13
index 7067f4b9159c..2a42ae05cb16 100644
@@ -773,7 +773,7 @@ static void i40e_dbg_dump_desc(int cnt, int vsi_seid, int ring_id, int desc_n,
 {
 	struct i40e_tx_desc *txd;
 	union i40e_rx_desc *rxd;
-	struct i40e_ring ring;
+	struct i40e_ring *ring;
 	struct i40e_vsi *vsi;
 	int i;
 
@@ -792,29 +792,32 @@ static void i40e_dbg_dump_desc(int cnt, int vsi_seid, int ring_id, int desc_n,
 			 vsi_seid);
 		return;
 	}
-	if (is_rx_ring)
-		ring = *vsi->rx_rings[ring_id];
-	else
-		ring = *vsi->tx_rings[ring_id];
+
+	ring = kmemdup(is_rx_ring
+		       ? vsi->rx_rings[ring_id] : vsi->tx_rings[ring_id],
+		       sizeof(*ring), GFP_KERNEL);
+	if (!ring)
+		return;
+
 	if (cnt == 2) {
 		dev_info(&pf->pdev->dev, "vsi = %02i %s ring = %02i\n",
 			 vsi_seid, is_rx_ring ? "rx" : "tx", ring_id);
-		for (i = 0; i < ring.count; i++) {
+		for (i = 0; i < ring->count; i++) {
 			if (!is_rx_ring) {
-				txd = I40E_TX_DESC(&ring, i);
+				txd = I40E_TX_DESC(ring, i);
 				dev_info(&pf->pdev->dev,
 					 "   d[%03i] = 0x%016llx 0x%016llx\n",
 					 i, txd->buffer_addr,
 					 txd->cmd_type_offset_bsz);
 			} else if (sizeof(union i40e_rx_desc) ==
 				   sizeof(union i40e_16byte_rx_desc)) {
-				rxd = I40E_RX_DESC(&ring, i);
+				rxd = I40E_RX_DESC(ring, i);
 				dev_info(&pf->pdev->dev,
 					 "   d[%03i] = 0x%016llx 0x%016llx\n",
 					 i, rxd->read.pkt_addr,
 					 rxd->read.hdr_addr);
 			} else {
-				rxd = I40E_RX_DESC(&ring, i);
+				rxd = I40E_RX_DESC(ring, i);
 				dev_info(&pf->pdev->dev,
 					 "   d[%03i] = 0x%016llx 0x%016llx 0x%016llx 0x%016llx\n",
 					 i, rxd->read.pkt_addr,
@@ -823,26 +826,26 @@ static void i40e_dbg_dump_desc(int cnt, int vsi_seid, int ring_id, int desc_n,
 			}
 		}
 	} else if (cnt == 3) {
-		if (desc_n >= ring.count || desc_n < 0) {
+		if (desc_n >= ring->count || desc_n < 0) {
 			dev_info(&pf->pdev->dev,
 				 "descriptor %d not found\n", desc_n);
 			return;
 		}
 		if (!is_rx_ring) {
-			txd = I40E_TX_DESC(&ring, desc_n);
+			txd = I40E_TX_DESC(ring, desc_n);
 			dev_info(&pf->pdev->dev,
 				 "vsi = %02i tx ring = %02i d[%03i] = 0x%016llx 0x%016llx\n",
 				 vsi_seid, ring_id, desc_n,
 				 txd->buffer_addr, txd->cmd_type_offset_bsz);
 		} else if (sizeof(union i40e_rx_desc) ==
 			   sizeof(union i40e_16byte_rx_desc)) {
-			rxd = I40E_RX_DESC(&ring, desc_n);
+			rxd = I40E_RX_DESC(ring, desc_n);
 			dev_info(&pf->pdev->dev,
 				 "vsi = %02i rx ring = %02i d[%03i] = 0x%016llx 0x%016llx\n",
 				 vsi_seid, ring_id, desc_n,
 				 rxd->read.pkt_addr, rxd->read.hdr_addr);
 		} else {
-			rxd = I40E_RX_DESC(&ring, desc_n);
+			rxd = I40E_RX_DESC(ring, desc_n);
 			dev_info(&pf->pdev->dev,
 				 "vsi = %02i rx ring = %02i d[%03i] = 0x%016llx 0x%016llx 0x%016llx 0x%016llx\n",
 				 vsi_seid, ring_id, desc_n,
@@ -852,6 +855,7 @@ static void i40e_dbg_dump_desc(int cnt, int vsi_seid, int ring_id, int desc_n,
 	} else {
 		dev_info(&pf->pdev->dev, "dump desc rx/tx <vsi_seid> <ring_id> [<desc_n>]\n");
 	}
+	kfree(ring);
 }
 
 /**
drivers/net/wireless/iwlegacy/3945.c +2 -1
index 93bdf684babe..ae047ab7a4df 100644
@@ -1019,12 +1019,13 @@ il3945_hw_txq_ctx_free(struct il_priv *il)
 	int txq_id;
 
 	/* Tx queues */
-	if (il->txq)
+	if (il->txq) {
 		for (txq_id = 0; txq_id < il->hw_params.max_txq_num; txq_id++)
 			if (txq_id == IL39_CMD_QUEUE_NUM)
 				il_cmd_queue_free(il);
 			else
 				il_tx_queue_free(il, txq_id);
+	}
 
 	/* free tx queue structure */
 	il_free_txq_mem(il);
drivers/scsi/be2iscsi/be_main.c +1 -2
index 3ed37dc28b3c..3e6c36cd19b9 100644
@@ -48,7 +48,6 @@ static unsigned int be_iopoll_budget = 10;
 static unsigned int be_max_phys_size = 64;
 static unsigned int enable_msix = 1;
 
-MODULE_DEVICE_TABLE(pci, beiscsi_pci_id_table);
 MODULE_DESCRIPTION(DRV_DESC " " BUILD_STR);
 MODULE_VERSION(BUILD_STR);
 MODULE_AUTHOR("Emulex Corporation");
@@ -3166,7 +3165,7 @@ be_sgl_create_contiguous(void *virtual_address,
 {
 	WARN_ON(!virtual_address);
 	WARN_ON(!physical_address);
-	WARN_ON(!length > 0);
+	WARN_ON(!length);
 	WARN_ON(!sgl);
 
 	sgl->va = virtual_address;
drivers/scsi/bfa/bfa_ioc.c +11 -11
index 315d6d6dcfc8..4e7104461f09 100644
@@ -3665,19 +3665,19 @@ bfa_cb_sfp_state_query(struct bfa_sfp_s *sfp)
 		if (sfp->state_query_cbfn)
 			sfp->state_query_cbfn(sfp->state_query_cbarg,
 					sfp->status);
-			sfp->media = NULL;
-		}
+		sfp->media = NULL;
+	}
 
-		if (sfp->portspeed) {
-			sfp->status = bfa_sfp_speed_valid(sfp, sfp->portspeed);
-			if (sfp->state_query_cbfn)
-				sfp->state_query_cbfn(sfp->state_query_cbarg,
-						sfp->status);
-				sfp->portspeed = BFA_PORT_SPEED_UNKNOWN;
-		}
+	if (sfp->portspeed) {
+		sfp->status = bfa_sfp_speed_valid(sfp, sfp->portspeed);
+		if (sfp->state_query_cbfn)
+			sfp->state_query_cbfn(sfp->state_query_cbarg,
+					sfp->status);
+		sfp->portspeed = BFA_PORT_SPEED_UNKNOWN;
+	}
 
-		sfp->state_query_lock = 0;
-		sfp->state_query_cbfn = NULL;
+	sfp->state_query_lock = 0;
+	sfp->state_query_cbfn = NULL;
 }
 
 /*
drivers/scsi/qla2xxx/qla_target.c +1 -2
index 9f296dfeeb7f..1c965e0325af 100644
@@ -3075,11 +3075,10 @@ void qlt_abort_cmd(struct qla_tgt_cmd *cmd)
 {
 	struct qla_tgt *tgt = cmd->tgt;
 	struct scsi_qla_host *vha = tgt->vha;
-	struct se_cmd *se_cmd = &cmd->se_cmd;
 
 	ql_dbg(ql_dbg_tgt_mgt, vha, 0xf014,
 	    "qla_target(%d): terminating exchange for aborted cmd=%p "
-	    "(se_cmd=%p, tag=%llu)", vha->vp_idx, cmd, &cmd->se_cmd,
+	    "(se_cmd=%p, tag=%d)", vha->vp_idx, cmd, &cmd->se_cmd,
 	    cmd->tag);
 
 	cmd->state = QLA_TGT_STATE_ABORTED;
drivers/spi/spi-dw-mid.c +48 -21

89 lines not on this page · raw message

drivers/staging/iio/adc/ad7192.c +1 -1
index c110a255d4e8..8343a780f63d 100644
@@ -236,7 +236,7 @@ static int ad7192_setup(struct ad7192_state *st,
 			st->mclk = pdata->ext_clk_Hz;
 		else
 			st->mclk = AD7192_INT_FREQ_MHz;
-			break;
+		break;
 	default:
 		ret = -EINVAL;
 		goto out;
drivers/staging/lustre/lustre/llite/llite_lib.c +2 -1
index f4ca7b753021..500af356a033 100644
@@ -1504,7 +1504,7 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import)
 
 	if (attr->ia_valid & (ATTR_SIZE |
 			      ATTR_ATIME | ATTR_ATIME_SET |
-			      ATTR_MTIME | ATTR_MTIME_SET))
+			      ATTR_MTIME | ATTR_MTIME_SET)) {
 		/* For truncate and utimes sending attributes to OSTs, setting
 		 * mtime/atime to the past will be performed under PW [0:EOF]
 		 * extent lock (new_size:EOF for truncate).  It may seem
@@ -1516,6 +1516,7 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import)
 		rc = ll_setattr_ost(inode, attr);
 		if (attr->ia_valid & ATTR_SIZE)
 			up_write(&lli->lli_trunc_sem);
+	}
 out:
 	if (op_data) {
 		if (op_data->op_ioepoch) {
drivers/staging/rtl8723au/core/rtw_wlan_util.c +1 -1
index 09c44a55d4a6..34f0de6abac6 100644
@@ -525,7 +525,7 @@ void WMMOnAssocRsp23a(struct rtw_adapter *padapter)
 	else
 		aSifsTime = 16;
 
-		for (i = 0; i < 4; i++) {
+	for (i = 0; i < 4; i++) {
 		ACI = (pmlmeinfo->WMM_param.ac_param[i].ACI_AIFSN >> 5) & 0x03;
 		ACM = (pmlmeinfo->WMM_param.ac_param[i].ACI_AIFSN >> 4) & 0x01;
 
drivers/usb/gadget/udc/udc-xilinx.c +2 -2
index ed27e1687a4e..da289786d597 100644
@@ -2132,8 +2132,8 @@ static int xudc_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, udc);
 
-	dev_vdbg(&pdev->dev, "%s at 0x%08X mapped to 0x%08X %s\n",
-		 driver_name, (u32)res->start, (u32 __force)udc->addr,
+	dev_vdbg(&pdev->dev, "%s at 0x%08X mapped to %p %s\n",
+		 driver_name, (u32)res->start, udc->addr,
 		 udc->dma_enabled ? "with DMA" : "without DMA");
 
 	return 0;
drivers/usb/renesas_usbhs/common.c +1 -1
index b3b6813ab270..d51f47892386 100644
@@ -466,7 +466,7 @@ static struct renesas_usbhs_platform_info *usbhs_parse_dt(struct device *dev)
 		return NULL;
 
 	dparam = &info->driver_param;
-	dparam->type = of_id ? (u32)of_id->data : 0;
+	dparam->type = of_id ? (uintptr_t)of_id->data : 0;
 	if (!of_property_read_u32(dev->of_node, "renesas,buswait", &tmp))
 		dparam->buswait_bwait = tmp;
 	gpio = of_get_named_gpio_flags(dev->of_node, "renesas,enable-gpio", 0,
include/linux/blkdev.h +1 -1
index aac0f9ea952a..d94f4d0145a4 100644
@@ -616,7 +616,7 @@ static inline void queue_flag_clear(unsigned int flag, struct request_queue *q)
 
 #define list_entry_rq(ptr)	list_entry((ptr), struct request, queuelist)
 
-#define rq_data_dir(rq)		(((rq)->cmd_flags & 1) != 0)
+#define rq_data_dir(rq)		((int)((rq)->cmd_flags & 1))
 
 /*
  * Driver can handle struct request, if it either has an old style
include/linux/module.h +1 -1
index 18edb9660da0..6fc269ce701c 100644
@@ -135,7 +135,7 @@ void trim_init_extable(struct module *m);
 #ifdef MODULE
 /* Creates an alias so file2alias.c can find device table. */
 #define MODULE_DEVICE_TABLE(type, name)					\
-  extern const struct type##_device_id __mod_##type##__##name##_device_table \
+extern const typeof(name) __mod_##type##__##name##_device_table		\
   __attribute__ ((unused, alias(__stringify(name))))
 #else  /* !MODULE */
 #define MODULE_DEVICE_TABLE(type, name)
include/linux/skbuff.h +1 -0
index 3b57c6712495..2ff757f2d3a3 100644
@@ -188,6 +188,7 @@ struct sk_buff;
 #else
 #define MAX_SKB_FRAGS (65536/PAGE_SIZE + 1)
 #endif
+extern int sysctl_max_skb_frags;
 
 typedef struct skb_frag_struct skb_frag_t;
 
include/linux/usb/renesas_usbhs.h +1 -1
index d5952bb66752..c1209d5b8531 100644
@@ -153,7 +153,7 @@ struct renesas_usbhs_driver_param {
 	 */
 	int pio_dma_border; /* default is 64byte */
 
-	u32 type;
+	uintptr_t type;
 	u32 enable_gpio;
 
 	/*
net/bluetooth/hci_sock.c +2 -2
index 115f149362ba..1fbc1aadb450 100644
@@ -46,9 +46,9 @@ struct hci_pinfo {
 	unsigned short    channel;
 };
 
-static inline int hci_test_bit(int nr, void *addr)
+static inline int hci_test_bit(int nr, const void *addr)
 {
-	return *((__u32 *) addr + (nr >> 5)) & ((__u32) 1 << (nr & 31));
+	return *((const __u32 *) addr + (nr >> 5)) & ((__u32) 1 << (nr & 31));
 }
 
 /* Security filter */
net/bridge/netfilter/nft_reject_bridge.c +2 -0
index 48da2c54a69e..6a10b88f3371 100644
@@ -375,6 +375,8 @@ static int nft_reject_bridge_dump(struct sk_buff *skb,
 		if (nla_put_u8(skb, NFTA_REJECT_ICMP_CODE, priv->icmp_code))
 			goto nla_put_failure;
 		break;
+	default:
+		break;
 	}
 
 	return 0;
net/caif/cfpkt_skbuff.c +1 -1
index 1be0b521ac49..5add8e75759d 100644
@@ -286,7 +286,7 @@ int cfpkt_setlen(struct cfpkt *pkt, u16 len)
 		else
 			skb_trim(skb, len);
 
-			return cfpkt_getlen(pkt);
+		return cfpkt_getlen(pkt);
 	}
 
 	/* Need to expand SKB */
net/core/skbuff.c +2 -0
index b2921c0d5608..97549212e9e3 100644
@@ -77,6 +77,8 @@
 
 struct kmem_cache *skbuff_head_cache __read_mostly;
 static struct kmem_cache *skbuff_fclone_cache __read_mostly;
+int sysctl_max_skb_frags __read_mostly = MAX_SKB_FRAGS;
+EXPORT_SYMBOL(sysctl_max_skb_frags);
 
 /**
  *	skb_panic - private function for out-of-line support
net/core/sysctl_net_core.c +10 -0
index e731c96eac4b..cd386d2fd039 100644
@@ -27,6 +27,7 @@ static int one = 1;
 static int ushort_max = USHRT_MAX;
 static int min_sndbuf = SOCK_MIN_SNDBUF;
 static int min_rcvbuf = SOCK_MIN_RCVBUF;
+static int max_skb_frags = MAX_SKB_FRAGS;
 
 #ifdef CONFIG_RPS
 static int rps_sock_flow_sysctl(struct ctl_table *table, int write,
@@ -363,6 +364,15 @@ static struct ctl_table net_core_table[] = {
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec
 	},
+	{
+		.procname	= "max_skb_frags",
+		.data		= &sysctl_max_skb_frags,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= proc_dointvec_minmax,
+		.extra1		= &one,
+		.extra2		= &max_skb_frags,
+	},
 	{ }
 };
 
net/ipv4/netfilter/nft_reject_ipv4.c +2 -0
index ed33299c56d1..95fe37c72b32 100644
@@ -32,6 +32,8 @@ void nft_reject_ipv4_eval(const struct nft_expr *expr,
 	case NFT_REJECT_TCP_RST:
 		nf_send_reset(pkt->skb, pkt->ops->hooknum);
 		break;
+	default:
+		break;
 	}
 
 	data[NFT_REG_VERDICT].verdict = NF_DROP;
net/ipv4/tcp.c +2 -2
index 32b25cc96fff..a21c47289765 100644
@@ -939,7 +939,7 @@ new_segment:
 
 		i = skb_shinfo(skb)->nr_frags;
 		can_coalesce = skb_can_coalesce(skb, i, page, offset);
-		if (!can_coalesce && i >= MAX_SKB_FRAGS) {
+		if (!can_coalesce && i >= sysctl_max_skb_frags) {
 			tcp_mark_push(tp, skb);
 			goto new_segment;
 		}
@@ -1225,7 +1225,7 @@ new_segment:
 
 				if (!skb_can_coalesce(skb, i, pfrag->page,
 						      pfrag->offset)) {
-					if (i == MAX_SKB_FRAGS || !sg) {
+					if (i == sysctl_max_skb_frags || !sg) {
 						tcp_mark_push(tp, skb);
 						goto new_segment;
 					}
net/ipv6/ip6_offload.c +1 -1
index f291813c7c0c..219b9d24b3b3 100644
@@ -305,7 +305,7 @@ static struct packet_offload ipv6_packet_offload __read_mostly = {
 static const struct net_offload sit_offload = {
 	.callbacks = {
 		.gso_segment	= ipv6_gso_segment,
-		.gro_receive	= ipv6_gro_receive,
+		.gro_receive	= sit_gro_receive,
 		.gro_complete	= ipv6_gro_complete,
 	},
 };
net/ipv6/netfilter/nft_reject_ipv6.c +2 -0
index 0bc19fa87821..367bd4841a0c 100644
@@ -34,6 +34,8 @@ void nft_reject_ipv6_eval(const struct nft_expr *expr,
 	case NFT_REJECT_TCP_RST:
 		nf_send_reset6(net, pkt->skb, pkt->ops->hooknum);
 		break;
+	default:
+		break;
 	}
 
 	data[NFT_REG_VERDICT].verdict = NF_DROP;
net/netfilter/nft_compat.c +3 -3
index ff6f35971ea2..ab24224bfa66 100644
@@ -277,11 +277,11 @@ static void nft_match_eval(const struct nft_expr *expr,
 		return;
 	}
 
-	switch(ret) {
-	case true:
+	switch (ret ? 1 : 0) {
+	case 1:
 		data[NFT_REG_VERDICT].verdict = NFT_CONTINUE;
 		break;
-	case false:
+	case 0:
 		data[NFT_REG_VERDICT].verdict = NFT_BREAK;
 		break;
 	}
net/netfilter/nft_ct.c +8 -0
index cc5603016242..18d520e0ca0a 100644
@@ -56,6 +56,8 @@ static void nft_ct_get_eval(const struct nft_expr *expr,
 			state = NF_CT_STATE_BIT(ctinfo);
 		dest->data[0] = state;
 		return;
+	default:
+		break;
 	}
 
 	if (ct == NULL)
@@ -117,6 +119,8 @@ static void nft_ct_get_eval(const struct nft_expr *expr,
 		return;
 	}
 #endif
+	default:
+		break;
 	}
 
 	tuple = &ct->tuplehash[priv->dir].tuple;
@@ -141,6 +145,8 @@ static void nft_ct_get_eval(const struct nft_expr *expr,
 	case NFT_CT_PROTO_DST:
 		dest->data[0] = (__force __u16)tuple->dst.u.all;
 		return;
+	default:
+		break;
 	}
 	return;
 err:
@@ -172,6 +178,8 @@ static void nft_ct_set_eval(const struct nft_expr *expr,
 		}
 		break;
 #endif
+	default:
+		break;
 	}
 }
 
net/netfilter/nft_reject.c +2 -0
index 57d3e1af5630..0522fc9bfb0a 100644
@@ -63,6 +63,8 @@ int nft_reject_dump(struct sk_buff *skb, const struct nft_expr *expr)
 		if (nla_put_u8(skb, NFTA_REJECT_ICMP_CODE, priv->icmp_code))
 			goto nla_put_failure;
 		break;
+	default:
+		break;
 	}
 
 	return 0;
net/netfilter/nft_reject_inet.c +2 -0
index 7b5f9d58680a..1fb065a77474 100644
@@ -105,6 +105,8 @@ static int nft_reject_inet_dump(struct sk_buff *skb,
 		if (nla_put_u8(skb, NFTA_REJECT_ICMP_CODE, priv->icmp_code))
 			goto nla_put_failure;
 		break;
+	default:
+		break;
 	}
 
 	return 0;
sound/pci/oxygen/oxygen_mixer.c +1 -1
index 5988e044c519..259bf54a9df0 100644
@@ -88,7 +88,7 @@ static int dac_mute_put(struct snd_kcontrol *ctl,
 	int changed;
 
 	mutex_lock(&chip->mutex);
-	changed = !value->value.integer.value[0] != chip->dac_mute;
+	changed = (!value->value.integer.value[0]) != chip->dac_mute;
 	if (changed) {
 		chip->dac_mute = !value->value.integer.value[0];
 		chip->model.update_dac_mute(chip);