Magellan Linux

Contents of /trunk/kernel-alx/patches-4.4/0123-4.4.24-all-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2835 - (show annotations) (download)
Thu Oct 13 09:54:13 2016 UTC (7 years, 6 months ago) by niro
File size: 87150 byte(s)
-linux-4.4.24
1 diff --git a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt
2 index d00bfd8624a5..e0381c28773d 100644
3 --- a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt
4 +++ b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt
5 @@ -81,9 +81,9 @@ pm8916:
6 l14, l15, l16, l17, l18
7
8 pm8941:
9 - s1, s2, s3, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14,
10 - l15, l16, l17, l18, l19, l20, l21, l22, l23, l24, lvs1, lvs2, lvs3,
11 - mvs1, mvs2
12 + s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13,
13 + l14, l15, l16, l17, l18, l19, l20, l21, l22, l23, l24, lvs1, lvs2, lvs3,
14 + 5vs1, 5vs2
15
16 The content of each sub-node is defined by the standard binding for regulators -
17 see regulator.txt - with additional custom properties described below:
18 diff --git a/Documentation/pinctrl.txt b/Documentation/pinctrl.txt
19 index 4976389e432d..dd15a699ee1c 100644
20 --- a/Documentation/pinctrl.txt
21 +++ b/Documentation/pinctrl.txt
22 @@ -831,7 +831,7 @@ separate memory range only intended for GPIO driving, and the register
23 range dealing with pin config and pin multiplexing get placed into a
24 different memory range and a separate section of the data sheet.
25
26 -A flag "strict" in struct pinctrl_desc is available to check and deny
27 +A flag "strict" in struct pinmux_ops is available to check and deny
28 simultaneous access to the same pin from GPIO and pin multiplexing
29 consumers on hardware of this type. The pinctrl driver should set this flag
30 accordingly.
31 diff --git a/Makefile b/Makefile
32 index 95421b688f23..cdbc185c3539 100644
33 --- a/Makefile
34 +++ b/Makefile
35 @@ -1,6 +1,6 @@
36 VERSION = 4
37 PATCHLEVEL = 4
38 -SUBLEVEL = 23
39 +SUBLEVEL = 24
40 EXTRAVERSION =
41 NAME = Blurry Fish Butt
42
43 diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
44 index 06e983f59980..856913705169 100644
45 --- a/arch/arm/boot/compressed/head.S
46 +++ b/arch/arm/boot/compressed/head.S
47 @@ -776,7 +776,7 @@ __armv7_mmu_cache_on:
48 orrne r0, r0, #1 @ MMU enabled
49 movne r1, #0xfffffffd @ domain 0 = client
50 bic r6, r6, #1 << 31 @ 32-bit translation system
51 - bic r6, r6, #3 << 0 @ use only ttbr0
52 + bic r6, r6, #(7 << 0) | (1 << 4) @ use only ttbr0
53 mcrne p15, 0, r3, c2, c0, 0 @ load page table pointer
54 mcrne p15, 0, r1, c3, c0, 0 @ load domain access control
55 mcrne p15, 0, r6, c2, c0, 2 @ load ttb control
56 diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi
57 index d910d3a6c41c..84bdba480d5a 100644
58 --- a/arch/arm/boot/dts/sun5i-a13.dtsi
59 +++ b/arch/arm/boot/dts/sun5i-a13.dtsi
60 @@ -83,7 +83,7 @@
61 trips {
62 cpu_alert0: cpu_alert0 {
63 /* milliCelsius */
64 - temperature = <850000>;
65 + temperature = <85000>;
66 hysteresis = <2000>;
67 type = "passive";
68 };
69 diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
70 index 3d224941b541..a3a9ad4dc3c6 100644
71 --- a/arch/arm/common/sa1111.c
72 +++ b/arch/arm/common/sa1111.c
73 @@ -869,9 +869,9 @@ struct sa1111_save_data {
74
75 #ifdef CONFIG_PM
76
77 -static int sa1111_suspend(struct platform_device *dev, pm_message_t state)
78 +static int sa1111_suspend_noirq(struct device *dev)
79 {
80 - struct sa1111 *sachip = platform_get_drvdata(dev);
81 + struct sa1111 *sachip = dev_get_drvdata(dev);
82 struct sa1111_save_data *save;
83 unsigned long flags;
84 unsigned int val;
85 @@ -934,9 +934,9 @@ static int sa1111_suspend(struct platform_device *dev, pm_message_t state)
86 * restored by their respective drivers, and must be called
87 * via LDM after this function.
88 */
89 -static int sa1111_resume(struct platform_device *dev)
90 +static int sa1111_resume_noirq(struct device *dev)
91 {
92 - struct sa1111 *sachip = platform_get_drvdata(dev);
93 + struct sa1111 *sachip = dev_get_drvdata(dev);
94 struct sa1111_save_data *save;
95 unsigned long flags, id;
96 void __iomem *base;
97 @@ -952,7 +952,7 @@ static int sa1111_resume(struct platform_device *dev)
98 id = sa1111_readl(sachip->base + SA1111_SKID);
99 if ((id & SKID_ID_MASK) != SKID_SA1111_ID) {
100 __sa1111_remove(sachip);
101 - platform_set_drvdata(dev, NULL);
102 + dev_set_drvdata(dev, NULL);
103 kfree(save);
104 return 0;
105 }
106 @@ -1003,8 +1003,8 @@ static int sa1111_resume(struct platform_device *dev)
107 }
108
109 #else
110 -#define sa1111_suspend NULL
111 -#define sa1111_resume NULL
112 +#define sa1111_suspend_noirq NULL
113 +#define sa1111_resume_noirq NULL
114 #endif
115
116 static int sa1111_probe(struct platform_device *pdev)
117 @@ -1038,6 +1038,11 @@ static int sa1111_remove(struct platform_device *pdev)
118 return 0;
119 }
120
121 +static struct dev_pm_ops sa1111_pm_ops = {
122 + .suspend_noirq = sa1111_suspend_noirq,
123 + .resume_noirq = sa1111_resume_noirq,
124 +};
125 +
126 /*
127 * Not sure if this should be on the system bus or not yet.
128 * We really want some way to register a system device at
129 @@ -1050,10 +1055,9 @@ static int sa1111_remove(struct platform_device *pdev)
130 static struct platform_driver sa1111_device_driver = {
131 .probe = sa1111_probe,
132 .remove = sa1111_remove,
133 - .suspend = sa1111_suspend,
134 - .resume = sa1111_resume,
135 .driver = {
136 .name = "sa1111",
137 + .pm = &sa1111_pm_ops,
138 },
139 };
140
141 diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h
142 index ccb3aa64640d..b91a2d17a521 100644
143 --- a/arch/arm/include/asm/dma-mapping.h
144 +++ b/arch/arm/include/asm/dma-mapping.h
145 @@ -119,7 +119,7 @@ static inline dma_addr_t virt_to_dma(struct device *dev, void *addr)
146 /* The ARM override for dma_max_pfn() */
147 static inline unsigned long dma_max_pfn(struct device *dev)
148 {
149 - return PHYS_PFN_OFFSET + dma_to_pfn(dev, *dev->dma_mask);
150 + return dma_to_pfn(dev, *dev->dma_mask);
151 }
152 #define dma_max_pfn(dev) dma_max_pfn(dev)
153
154 diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c
155 index 65addcbf5b30..b3b950fc8ea0 100644
156 --- a/arch/arm/kernel/devtree.c
157 +++ b/arch/arm/kernel/devtree.c
158 @@ -87,6 +87,8 @@ void __init arm_dt_init_cpu_maps(void)
159 return;
160
161 for_each_child_of_node(cpus, cpu) {
162 + const __be32 *cell;
163 + int prop_bytes;
164 u32 hwid;
165
166 if (of_node_cmp(cpu->type, "cpu"))
167 @@ -98,7 +100,8 @@ void __init arm_dt_init_cpu_maps(void)
168 * properties is considered invalid to build the
169 * cpu_logical_map.
170 */
171 - if (of_property_read_u32(cpu, "reg", &hwid)) {
172 + cell = of_get_property(cpu, "reg", &prop_bytes);
173 + if (!cell || prop_bytes < sizeof(*cell)) {
174 pr_debug(" * %s missing reg property\n",
175 cpu->full_name);
176 of_node_put(cpu);
177 @@ -106,10 +109,15 @@ void __init arm_dt_init_cpu_maps(void)
178 }
179
180 /*
181 - * 8 MSBs must be set to 0 in the DT since the reg property
182 + * Bits n:24 must be set to 0 in the DT since the reg property
183 * defines the MPIDR[23:0].
184 */
185 - if (hwid & ~MPIDR_HWID_BITMASK) {
186 + do {
187 + hwid = be32_to_cpu(*cell++);
188 + prop_bytes -= sizeof(*cell);
189 + } while (!hwid && prop_bytes > 0);
190 +
191 + if (prop_bytes || (hwid & ~MPIDR_HWID_BITMASK)) {
192 of_node_put(cpu);
193 return;
194 }
195 diff --git a/arch/arm/mach-sa1100/clock.c b/arch/arm/mach-sa1100/clock.c
196 index cbf53bb9c814..0db46895c82a 100644
197 --- a/arch/arm/mach-sa1100/clock.c
198 +++ b/arch/arm/mach-sa1100/clock.c
199 @@ -125,6 +125,8 @@ static unsigned long clk_36864_get_rate(struct clk *clk)
200 }
201
202 static struct clkops clk_36864_ops = {
203 + .enable = clk_cpu_enable,
204 + .disable = clk_cpu_disable,
205 .get_rate = clk_36864_get_rate,
206 };
207
208 @@ -140,9 +142,8 @@ static struct clk_lookup sa11xx_clkregs[] = {
209 CLKDEV_INIT(NULL, "OSTIMER0", &clk_36864),
210 };
211
212 -static int __init sa11xx_clk_init(void)
213 +int __init sa11xx_clk_init(void)
214 {
215 clkdev_add_table(sa11xx_clkregs, ARRAY_SIZE(sa11xx_clkregs));
216 return 0;
217 }
218 -core_initcall(sa11xx_clk_init);
219 diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c
220 index 345e63f4eb71..3e09beddb6e8 100644
221 --- a/arch/arm/mach-sa1100/generic.c
222 +++ b/arch/arm/mach-sa1100/generic.c
223 @@ -34,6 +34,7 @@
224
225 #include <mach/hardware.h>
226 #include <mach/irqs.h>
227 +#include <mach/reset.h>
228
229 #include "generic.h"
230 #include <clocksource/pxa.h>
231 @@ -95,6 +96,8 @@ static void sa1100_power_off(void)
232
233 void sa11x0_restart(enum reboot_mode mode, const char *cmd)
234 {
235 + clear_reset_status(RESET_STATUS_ALL);
236 +
237 if (mode == REBOOT_SOFT) {
238 /* Jump into ROM at address 0 */
239 soft_restart(0);
240 @@ -388,6 +391,7 @@ void __init sa1100_init_irq(void)
241 sa11x0_init_irq_nodt(IRQ_GPIO0_SC, irq_resource.start);
242
243 sa1100_init_gpio();
244 + sa11xx_clk_init();
245 }
246
247 /*
248 diff --git a/arch/arm/mach-sa1100/generic.h b/arch/arm/mach-sa1100/generic.h
249 index 0d92e119b36b..68199b603ff7 100644
250 --- a/arch/arm/mach-sa1100/generic.h
251 +++ b/arch/arm/mach-sa1100/generic.h
252 @@ -44,3 +44,5 @@ int sa11x0_pm_init(void);
253 #else
254 static inline int sa11x0_pm_init(void) { return 0; }
255 #endif
256 +
257 +int sa11xx_clk_init(void);
258 diff --git a/arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c b/arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c
259 index 62437b57813e..73e3adbc1330 100644
260 --- a/arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c
261 +++ b/arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c
262 @@ -41,39 +41,26 @@
263
264 #define REGULATOR_IRQ_MASK BIT(2) /* IRQ2, active low */
265
266 -static void __iomem *irqc;
267 -
268 -static const u8 da9063_mask_regs[] = {
269 - DA9063_REG_IRQ_MASK_A,
270 - DA9063_REG_IRQ_MASK_B,
271 - DA9063_REG_IRQ_MASK_C,
272 - DA9063_REG_IRQ_MASK_D,
273 -};
274 -
275 -/* DA9210 System Control and Event Registers */
276 +/* start of DA9210 System Control and Event Registers */
277 #define DA9210_REG_MASK_A 0x54
278 -#define DA9210_REG_MASK_B 0x55
279 -
280 -static const u8 da9210_mask_regs[] = {
281 - DA9210_REG_MASK_A,
282 - DA9210_REG_MASK_B,
283 -};
284 -
285 -static void da9xxx_mask_irqs(struct i2c_client *client, const u8 regs[],
286 - unsigned int nregs)
287 -{
288 - unsigned int i;
289
290 - dev_info(&client->dev, "Masking %s interrupt sources\n", client->name);
291 +static void __iomem *irqc;
292
293 - for (i = 0; i < nregs; i++) {
294 - int error = i2c_smbus_write_byte_data(client, regs[i], ~0);
295 - if (error) {
296 - dev_err(&client->dev, "i2c error %d\n", error);
297 - return;
298 - }
299 - }
300 -}
301 +/* first byte sets the memory pointer, following are consecutive reg values */
302 +static u8 da9063_irq_clr[] = { DA9063_REG_IRQ_MASK_A, 0xff, 0xff, 0xff, 0xff };
303 +static u8 da9210_irq_clr[] = { DA9210_REG_MASK_A, 0xff, 0xff };
304 +
305 +static struct i2c_msg da9xxx_msgs[2] = {
306 + {
307 + .addr = 0x58,
308 + .len = ARRAY_SIZE(da9063_irq_clr),
309 + .buf = da9063_irq_clr,
310 + }, {
311 + .addr = 0x68,
312 + .len = ARRAY_SIZE(da9210_irq_clr),
313 + .buf = da9210_irq_clr,
314 + },
315 +};
316
317 static int regulator_quirk_notify(struct notifier_block *nb,
318 unsigned long action, void *data)
319 @@ -93,12 +80,15 @@ static int regulator_quirk_notify(struct notifier_block *nb,
320 client = to_i2c_client(dev);
321 dev_dbg(dev, "Detected %s\n", client->name);
322
323 - if ((client->addr == 0x58 && !strcmp(client->name, "da9063")))
324 - da9xxx_mask_irqs(client, da9063_mask_regs,
325 - ARRAY_SIZE(da9063_mask_regs));
326 - else if (client->addr == 0x68 && !strcmp(client->name, "da9210"))
327 - da9xxx_mask_irqs(client, da9210_mask_regs,
328 - ARRAY_SIZE(da9210_mask_regs));
329 + if ((client->addr == 0x58 && !strcmp(client->name, "da9063")) ||
330 + (client->addr == 0x68 && !strcmp(client->name, "da9210"))) {
331 + int ret;
332 +
333 + dev_info(&client->dev, "clearing da9063/da9210 interrupts\n");
334 + ret = i2c_transfer(client->adapter, da9xxx_msgs, ARRAY_SIZE(da9xxx_msgs));
335 + if (ret != ARRAY_SIZE(da9xxx_msgs))
336 + dev_err(&client->dev, "i2c error %d\n", ret);
337 + }
338
339 mon = ioread32(irqc + IRQC_MONITOR);
340 if (mon & REGULATOR_IRQ_MASK)
341 diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-monitors.c
342 index e51f27ac13fd..c8875b64be90 100644
343 --- a/arch/arm64/kernel/debug-monitors.c
344 +++ b/arch/arm64/kernel/debug-monitors.c
345 @@ -422,8 +422,10 @@ int kernel_active_single_step(void)
346 /* ptrace API */
347 void user_enable_single_step(struct task_struct *task)
348 {
349 - set_ti_thread_flag(task_thread_info(task), TIF_SINGLESTEP);
350 - set_regs_spsr_ss(task_pt_regs(task));
351 + struct thread_info *ti = task_thread_info(task);
352 +
353 + if (!test_and_set_ti_thread_flag(ti, TIF_SINGLESTEP))
354 + set_regs_spsr_ss(task_pt_regs(task));
355 }
356
357 void user_disable_single_step(struct task_struct *task)
358 diff --git a/arch/avr32/mach-at32ap/pio.c b/arch/avr32/mach-at32ap/pio.c
359 index 4f61378c3453..456128174b17 100644
360 --- a/arch/avr32/mach-at32ap/pio.c
361 +++ b/arch/avr32/mach-at32ap/pio.c
362 @@ -435,7 +435,7 @@ void __init at32_init_pio(struct platform_device *pdev)
363 struct resource *regs;
364 struct pio_device *pio;
365
366 - if (pdev->id > MAX_NR_PIO_DEVICES) {
367 + if (pdev->id >= MAX_NR_PIO_DEVICES) {
368 dev_err(&pdev->dev, "only %d PIO devices supported\n",
369 MAX_NR_PIO_DEVICES);
370 return;
371 diff --git a/arch/mips/include/asm/uprobes.h b/arch/mips/include/asm/uprobes.h
372 index 34c325c674c4..70a4a2f173ff 100644
373 --- a/arch/mips/include/asm/uprobes.h
374 +++ b/arch/mips/include/asm/uprobes.h
375 @@ -36,7 +36,6 @@ struct arch_uprobe {
376 unsigned long resume_epc;
377 u32 insn[2];
378 u32 ixol[2];
379 - union mips_instruction orig_inst[MAX_UINSN_BYTES / 4];
380 };
381
382 struct arch_uprobe_task {
383 diff --git a/arch/mips/kernel/uprobes.c b/arch/mips/kernel/uprobes.c
384 index 8452d933a645..4e7b89f2e244 100644
385 --- a/arch/mips/kernel/uprobes.c
386 +++ b/arch/mips/kernel/uprobes.c
387 @@ -157,7 +157,6 @@ bool is_trap_insn(uprobe_opcode_t *insn)
388 int arch_uprobe_pre_xol(struct arch_uprobe *aup, struct pt_regs *regs)
389 {
390 struct uprobe_task *utask = current->utask;
391 - union mips_instruction insn;
392
393 /*
394 * Now find the EPC where to resume after the breakpoint has been
395 @@ -168,10 +167,10 @@ int arch_uprobe_pre_xol(struct arch_uprobe *aup, struct pt_regs *regs)
396 unsigned long epc;
397
398 epc = regs->cp0_epc;
399 - __compute_return_epc_for_insn(regs, insn);
400 + __compute_return_epc_for_insn(regs,
401 + (union mips_instruction) aup->insn[0]);
402 aup->resume_epc = regs->cp0_epc;
403 }
404 -
405 utask->autask.saved_trap_nr = current->thread.trap_nr;
406 current->thread.trap_nr = UPROBE_TRAP_NR;
407 regs->cp0_epc = current->utask->xol_vaddr;
408 @@ -257,7 +256,7 @@ unsigned long arch_uretprobe_hijack_return_addr(
409 ra = regs->regs[31];
410
411 /* Replace the return address with the trampoline address */
412 - regs->regs[31] = ra;
413 + regs->regs[31] = trampoline_vaddr;
414
415 return ra;
416 }
417 @@ -280,24 +279,6 @@ int __weak set_swbp(struct arch_uprobe *auprobe, struct mm_struct *mm,
418 return uprobe_write_opcode(mm, vaddr, UPROBE_SWBP_INSN);
419 }
420
421 -/**
422 - * set_orig_insn - Restore the original instruction.
423 - * @mm: the probed process address space.
424 - * @auprobe: arch specific probepoint information.
425 - * @vaddr: the virtual address to insert the opcode.
426 - *
427 - * For mm @mm, restore the original opcode (opcode) at @vaddr.
428 - * Return 0 (success) or a negative errno.
429 - *
430 - * This overrides the weak version in kernel/events/uprobes.c.
431 - */
432 -int set_orig_insn(struct arch_uprobe *auprobe, struct mm_struct *mm,
433 - unsigned long vaddr)
434 -{
435 - return uprobe_write_opcode(mm, vaddr,
436 - *(uprobe_opcode_t *)&auprobe->orig_inst[0].word);
437 -}
438 -
439 void __weak arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr,
440 void *src, unsigned long len)
441 {
442 diff --git a/arch/mips/mti-malta/malta-setup.c b/arch/mips/mti-malta/malta-setup.c
443 index 4740c82fb97a..36b09b2ea972 100644
444 --- a/arch/mips/mti-malta/malta-setup.c
445 +++ b/arch/mips/mti-malta/malta-setup.c
446 @@ -39,6 +39,9 @@
447 #include <linux/console.h>
448 #endif
449
450 +#define ROCIT_CONFIG_GEN0 0x1f403000
451 +#define ROCIT_CONFIG_GEN0_PCI_IOCU BIT(7)
452 +
453 extern void malta_be_init(void);
454 extern int malta_be_handler(struct pt_regs *regs, int is_fixup);
455
456 @@ -107,6 +110,8 @@ static void __init fd_activate(void)
457 static int __init plat_enable_iocoherency(void)
458 {
459 int supported = 0;
460 + u32 cfg;
461 +
462 if (mips_revision_sconid == MIPS_REVISION_SCON_BONITO) {
463 if (BONITO_PCICACHECTRL & BONITO_PCICACHECTRL_CPUCOH_PRES) {
464 BONITO_PCICACHECTRL |= BONITO_PCICACHECTRL_CPUCOH_EN;
465 @@ -129,7 +134,8 @@ static int __init plat_enable_iocoherency(void)
466 } else if (mips_cm_numiocu() != 0) {
467 /* Nothing special needs to be done to enable coherency */
468 pr_info("CMP IOCU detected\n");
469 - if ((*(unsigned int *)0xbf403000 & 0x81) != 0x81) {
470 + cfg = __raw_readl((u32 *)CKSEG1ADDR(ROCIT_CONFIG_GEN0));
471 + if (!(cfg & ROCIT_CONFIG_GEN0_PCI_IOCU)) {
472 pr_crit("IOCU OPERATION DISABLED BY SWITCH - DEFAULTING TO SW IO COHERENCY\n");
473 return 0;
474 }
475 diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
476 index b7e86e00048f..7b89e7b305e6 100644
477 --- a/arch/powerpc/kernel/prom_init.c
478 +++ b/arch/powerpc/kernel/prom_init.c
479 @@ -694,7 +694,7 @@ unsigned char ibm_architecture_vec[] = {
480 OV4_MIN_ENT_CAP, /* minimum VP entitled capacity */
481
482 /* option vector 5: PAPR/OF options */
483 - VECTOR_LENGTH(18), /* length */
484 + VECTOR_LENGTH(21), /* length */
485 0, /* don't ignore, don't halt */
486 OV5_FEAT(OV5_LPAR) | OV5_FEAT(OV5_SPLPAR) | OV5_FEAT(OV5_LARGE_PAGES) |
487 OV5_FEAT(OV5_DRCONF_MEMORY) | OV5_FEAT(OV5_DONATE_DEDICATE_CPU) |
488 @@ -725,8 +725,11 @@ unsigned char ibm_architecture_vec[] = {
489 0,
490 0,
491 OV5_FEAT(OV5_PFO_HW_RNG) | OV5_FEAT(OV5_PFO_HW_ENCR) |
492 - OV5_FEAT(OV5_PFO_HW_842),
493 - OV5_FEAT(OV5_SUB_PROCESSORS),
494 + OV5_FEAT(OV5_PFO_HW_842), /* Byte 17 */
495 + 0, /* Byte 18 */
496 + 0, /* Byte 19 */
497 + 0, /* Byte 20 */
498 + OV5_FEAT(OV5_SUB_PROCESSORS), /* Byte 21 */
499
500 /* option vector 6: IBM PAPR hints */
501 VECTOR_LENGTH(3), /* length */
502 diff --git a/arch/tile/include/asm/elf.h b/arch/tile/include/asm/elf.h
503 index c505d77e4d06..e9d54a06736f 100644
504 --- a/arch/tile/include/asm/elf.h
505 +++ b/arch/tile/include/asm/elf.h
506 @@ -129,6 +129,7 @@ extern int dump_task_regs(struct task_struct *, elf_gregset_t *);
507 struct linux_binprm;
508 extern int arch_setup_additional_pages(struct linux_binprm *bprm,
509 int executable_stack);
510 +/* update AT_VECTOR_SIZE_ARCH if the number of NEW_AUX_ENT entries changes */
511 #define ARCH_DLINFO \
512 do { \
513 NEW_AUX_ENT(AT_SYSINFO_EHDR, VDSO_BASE); \
514 diff --git a/arch/tile/include/uapi/asm/auxvec.h b/arch/tile/include/uapi/asm/auxvec.h
515 index c93e92709f14..f497123ed980 100644
516 --- a/arch/tile/include/uapi/asm/auxvec.h
517 +++ b/arch/tile/include/uapi/asm/auxvec.h
518 @@ -18,4 +18,6 @@
519 /* The vDSO location. */
520 #define AT_SYSINFO_EHDR 33
521
522 +#define AT_VECTOR_SIZE_ARCH 1 /* entries in ARCH_DLINFO */
523 +
524 #endif /* _ASM_TILE_AUXVEC_H */
525 diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h
526 index 3142218e546f..6433e28dc9c8 100644
527 --- a/arch/x86/include/asm/tlbflush.h
528 +++ b/arch/x86/include/asm/tlbflush.h
529 @@ -32,7 +32,7 @@ DECLARE_PER_CPU_SHARED_ALIGNED(struct tlb_state, cpu_tlbstate);
530 /* Initialize cr4 shadow for this CPU. */
531 static inline void cr4_init_shadow(void)
532 {
533 - this_cpu_write(cpu_tlbstate.cr4, __read_cr4());
534 + this_cpu_write(cpu_tlbstate.cr4, __read_cr4_safe());
535 }
536
537 /* Set in this cpu's CR4. */
538 diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
539 index c2b7522cbf35..2b49b113d65d 100644
540 --- a/arch/x86/kernel/cpu/common.c
541 +++ b/arch/x86/kernel/cpu/common.c
542 @@ -737,21 +737,20 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
543 identify_cpu_without_cpuid(c);
544
545 /* cyrix could have cpuid enabled via c_identify()*/
546 - if (!have_cpuid_p())
547 - return;
548 + if (have_cpuid_p()) {
549 + cpu_detect(c);
550 + get_cpu_vendor(c);
551 + get_cpu_cap(c);
552
553 - cpu_detect(c);
554 - get_cpu_vendor(c);
555 - get_cpu_cap(c);
556 -
557 - if (this_cpu->c_early_init)
558 - this_cpu->c_early_init(c);
559 + if (this_cpu->c_early_init)
560 + this_cpu->c_early_init(c);
561
562 - c->cpu_index = 0;
563 - filter_cpuid_features(c, false);
564 + c->cpu_index = 0;
565 + filter_cpuid_features(c, false);
566
567 - if (this_cpu->c_bsp_init)
568 - this_cpu->c_bsp_init(c);
569 + if (this_cpu->c_bsp_init)
570 + this_cpu->c_bsp_init(c);
571 + }
572
573 setup_force_cpu_cap(X86_FEATURE_ALWAYS);
574 fpu__init_system(c);
575 diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
576 index 4589b6feeb7b..268df707b5ce 100644
577 --- a/arch/x86/kvm/vmx.c
578 +++ b/arch/x86/kvm/vmx.c
579 @@ -408,6 +408,7 @@ struct nested_vmx {
580 struct list_head vmcs02_pool;
581 int vmcs02_num;
582 u64 vmcs01_tsc_offset;
583 + bool change_vmcs01_virtual_x2apic_mode;
584 /* L2 must run next, and mustn't decide to exit to L1. */
585 bool nested_run_pending;
586 /*
587 @@ -8184,6 +8185,12 @@ static void vmx_set_virtual_x2apic_mode(struct kvm_vcpu *vcpu, bool set)
588 {
589 u32 sec_exec_control;
590
591 + /* Postpone execution until vmcs01 is the current VMCS. */
592 + if (is_guest_mode(vcpu)) {
593 + to_vmx(vcpu)->nested.change_vmcs01_virtual_x2apic_mode = true;
594 + return;
595 + }
596 +
597 /*
598 * There is not point to enable virtualize x2apic without enable
599 * apicv
600 @@ -10483,6 +10490,12 @@ static void nested_vmx_vmexit(struct kvm_vcpu *vcpu, u32 exit_reason,
601 /* Update TSC_OFFSET if TSC was changed while L2 ran */
602 vmcs_write64(TSC_OFFSET, vmx->nested.vmcs01_tsc_offset);
603
604 + if (vmx->nested.change_vmcs01_virtual_x2apic_mode) {
605 + vmx->nested.change_vmcs01_virtual_x2apic_mode = false;
606 + vmx_set_virtual_x2apic_mode(vcpu,
607 + vcpu->arch.apic_base & X2APIC_ENABLE);
608 + }
609 +
610 /* This is needed for same reason as it was needed in prepare_vmcs02 */
611 vmx->host_rsp = 0;
612
613 diff --git a/block/blk-mq.c b/block/blk-mq.c
614 index 839b1e17481b..c3e461ec40e4 100644
615 --- a/block/blk-mq.c
616 +++ b/block/blk-mq.c
617 @@ -780,7 +780,7 @@ static void __blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx)
618 switch (ret) {
619 case BLK_MQ_RQ_QUEUE_OK:
620 queued++;
621 - continue;
622 + break;
623 case BLK_MQ_RQ_QUEUE_BUSY:
624 list_add(&rq->queuelist, &rq_list);
625 __blk_mq_requeue_request(rq);
626 diff --git a/drivers/acpi/acpica/hwxface.c b/drivers/acpi/acpica/hwxface.c
627 index 5f97468df8ff..b2e50d8007fe 100644
628 --- a/drivers/acpi/acpica/hwxface.c
629 +++ b/drivers/acpi/acpica/hwxface.c
630 @@ -504,11 +504,20 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 *sleep_type_a, u8 *sleep_type_b)
631 * Evaluate the \_Sx namespace object containing the register values
632 * for this state
633 */
634 - info->relative_pathname =
635 - ACPI_CAST_PTR(char, acpi_gbl_sleep_state_names[sleep_state]);
636 + info->relative_pathname = ACPI_CAST_PTR(char,
637 + acpi_gbl_sleep_state_names
638 + [sleep_state]);
639 +
640 status = acpi_ns_evaluate(info);
641 if (ACPI_FAILURE(status)) {
642 - goto cleanup;
643 + if (status == AE_NOT_FOUND) {
644 +
645 + /* The _Sx states are optional, ignore NOT_FOUND */
646 +
647 + goto final_cleanup;
648 + }
649 +
650 + goto warning_cleanup;
651 }
652
653 /* Must have a return object */
654 @@ -517,7 +526,7 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 *sleep_type_a, u8 *sleep_type_b)
655 ACPI_ERROR((AE_INFO, "No Sleep State object returned from [%s]",
656 info->relative_pathname));
657 status = AE_AML_NO_RETURN_VALUE;
658 - goto cleanup;
659 + goto warning_cleanup;
660 }
661
662 /* Return object must be of type Package */
663 @@ -526,7 +535,7 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 *sleep_type_a, u8 *sleep_type_b)
664 ACPI_ERROR((AE_INFO,
665 "Sleep State return object is not a Package"));
666 status = AE_AML_OPERAND_TYPE;
667 - goto cleanup1;
668 + goto return_value_cleanup;
669 }
670
671 /*
672 @@ -570,16 +579,17 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 *sleep_type_a, u8 *sleep_type_b)
673 break;
674 }
675
676 -cleanup1:
677 +return_value_cleanup:
678 acpi_ut_remove_reference(info->return_object);
679
680 -cleanup:
681 +warning_cleanup:
682 if (ACPI_FAILURE(status)) {
683 ACPI_EXCEPTION((AE_INFO, status,
684 "While evaluating Sleep State [%s]",
685 info->relative_pathname));
686 }
687
688 +final_cleanup:
689 ACPI_FREE(info);
690 return_ACPI_STATUS(status);
691 }
692 diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c
693 index 8a1432e8bb80..01d4be2c354b 100644
694 --- a/drivers/char/hw_random/omap-rng.c
695 +++ b/drivers/char/hw_random/omap-rng.c
696 @@ -384,7 +384,12 @@ static int omap_rng_probe(struct platform_device *pdev)
697 }
698
699 pm_runtime_enable(&pdev->dev);
700 - pm_runtime_get_sync(&pdev->dev);
701 + ret = pm_runtime_get_sync(&pdev->dev);
702 + if (ret) {
703 + dev_err(&pdev->dev, "Failed to runtime_get device: %d\n", ret);
704 + pm_runtime_put_noidle(&pdev->dev);
705 + goto err_ioremap;
706 + }
707
708 ret = (dev->of_node) ? of_get_omap_rng_device_details(priv, pdev) :
709 get_omap_rng_device_details(priv);
710 @@ -435,8 +440,15 @@ static int __maybe_unused omap_rng_suspend(struct device *dev)
711 static int __maybe_unused omap_rng_resume(struct device *dev)
712 {
713 struct omap_rng_dev *priv = dev_get_drvdata(dev);
714 + int ret;
715 +
716 + ret = pm_runtime_get_sync(dev);
717 + if (ret) {
718 + dev_err(dev, "Failed to runtime_get device: %d\n", ret);
719 + pm_runtime_put_noidle(dev);
720 + return ret;
721 + }
722
723 - pm_runtime_get_sync(dev);
724 priv->pdata->init(priv);
725
726 return 0;
727 diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c
728 index c12130485fc1..678af51fb29e 100644
729 --- a/drivers/char/tpm/tpm2-cmd.c
730 +++ b/drivers/char/tpm/tpm2-cmd.c
731 @@ -657,7 +657,7 @@ ssize_t tpm2_get_tpm_pt(struct tpm_chip *chip, u32 property_id, u32 *value,
732
733 rc = tpm_transmit_cmd(chip, &cmd, sizeof(cmd), desc);
734 if (!rc)
735 - *value = cmd.params.get_tpm_pt_out.value;
736 + *value = be32_to_cpu(cmd.params.get_tpm_pt_out.value);
737
738 return rc;
739 }
740 diff --git a/drivers/clk/clk-xgene.c b/drivers/clk/clk-xgene.c
741 index 10224b01b97c..b134a8b15e2c 100644
742 --- a/drivers/clk/clk-xgene.c
743 +++ b/drivers/clk/clk-xgene.c
744 @@ -351,8 +351,8 @@ static int xgene_clk_set_rate(struct clk_hw *hw, unsigned long rate,
745 /* Set new divider */
746 data = xgene_clk_read(pclk->param.divider_reg +
747 pclk->param.reg_divider_offset);
748 - data &= ~((1 << pclk->param.reg_divider_width) - 1)
749 - << pclk->param.reg_divider_shift;
750 + data &= ~(((1 << pclk->param.reg_divider_width) - 1)
751 + << pclk->param.reg_divider_shift);
752 data |= divider;
753 xgene_clk_write(data, pclk->param.divider_reg +
754 pclk->param.reg_divider_offset);
755 diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
756 index e44a1bfb0250..9d05d7dbcfa9 100644
757 --- a/drivers/dma/at_xdmac.c
758 +++ b/drivers/dma/at_xdmac.c
759 @@ -1183,8 +1183,8 @@ static struct at_xdmac_desc *at_xdmac_memset_create_desc(struct dma_chan *chan,
760 desc->lld.mbr_cfg = chan_cc;
761
762 dev_dbg(chan2dev(chan),
763 - "%s: lld: mbr_da=%pad, mbr_ds=%pad, mbr_ubc=0x%08x, mbr_cfg=0x%08x\n",
764 - __func__, &desc->lld.mbr_da, &desc->lld.mbr_ds, desc->lld.mbr_ubc,
765 + "%s: lld: mbr_da=%pad, mbr_ds=0x%08x, mbr_ubc=0x%08x, mbr_cfg=0x%08x\n",
766 + __func__, &desc->lld.mbr_da, desc->lld.mbr_ds, desc->lld.mbr_ubc,
767 desc->lld.mbr_cfg);
768
769 return desc;
770 @@ -2055,7 +2055,7 @@ err_dma_unregister:
771 err_clk_disable:
772 clk_disable_unprepare(atxdmac->clk);
773 err_free_irq:
774 - free_irq(atxdmac->irq, atxdmac->dma.dev);
775 + free_irq(atxdmac->irq, atxdmac);
776 return ret;
777 }
778
779 @@ -2071,7 +2071,7 @@ static int at_xdmac_remove(struct platform_device *pdev)
780
781 synchronize_irq(atxdmac->irq);
782
783 - free_irq(atxdmac->irq, atxdmac->dma.dev);
784 + free_irq(atxdmac->irq, atxdmac);
785
786 for (i = 0; i < atxdmac->dma.chancnt; i++) {
787 struct at_xdmac_chan *atchan = &atxdmac->chan[i];
788 diff --git a/drivers/gpio/gpio-sa1100.c b/drivers/gpio/gpio-sa1100.c
789 index 990fa9023e22..3b6bce0518ab 100644
790 --- a/drivers/gpio/gpio-sa1100.c
791 +++ b/drivers/gpio/gpio-sa1100.c
792 @@ -155,7 +155,7 @@ static int sa1100_gpio_irqdomain_map(struct irq_domain *d,
793 {
794 irq_set_chip_and_handler(irq, &sa1100_gpio_irq_chip,
795 handle_edge_irq);
796 - irq_set_noprobe(irq);
797 + irq_set_probe(irq);
798
799 return 0;
800 }
801 diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c
802 index bfcc6408a772..b7f4b826febe 100644
803 --- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c
804 +++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c
805 @@ -36,7 +36,10 @@ nv04_fifo_dma_object_dtor(struct nvkm_fifo_chan *base, int cookie)
806 {
807 struct nv04_fifo_chan *chan = nv04_fifo_chan(base);
808 struct nvkm_instmem *imem = chan->fifo->base.engine.subdev.device->imem;
809 +
810 + mutex_lock(&chan->fifo->base.engine.subdev.mutex);
811 nvkm_ramht_remove(imem->ramht, cookie);
812 + mutex_unlock(&chan->fifo->base.engine.subdev.mutex);
813 }
814
815 static int
816 diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c
817 index caa73de584a5..3aaa07dafc00 100644
818 --- a/drivers/gpu/drm/radeon/si_dpm.c
819 +++ b/drivers/gpu/drm/radeon/si_dpm.c
820 @@ -3015,6 +3015,12 @@ static void si_apply_state_adjust_rules(struct radeon_device *rdev,
821 if (rdev->pdev->device == 0x6811 &&
822 rdev->pdev->revision == 0x81)
823 max_mclk = 120000;
824 + /* limit sclk/mclk on Jet parts for stability */
825 + if (rdev->pdev->device == 0x6665 &&
826 + rdev->pdev->revision == 0xc3) {
827 + max_sclk = 75000;
828 + max_mclk = 80000;
829 + }
830
831 if (rps->vce_active) {
832 rps->evclk = rdev->pm.dpm.vce_states[rdev->pm.dpm.vce_level].evclk;
833 diff --git a/drivers/hwmon/adt7411.c b/drivers/hwmon/adt7411.c
834 index 827c03703128..a7f886961830 100644
835 --- a/drivers/hwmon/adt7411.c
836 +++ b/drivers/hwmon/adt7411.c
837 @@ -30,6 +30,7 @@
838
839 #define ADT7411_REG_CFG1 0x18
840 #define ADT7411_CFG1_START_MONITOR (1 << 0)
841 +#define ADT7411_CFG1_RESERVED_BIT3 (1 << 3)
842
843 #define ADT7411_REG_CFG2 0x19
844 #define ADT7411_CFG2_DISABLE_AVG (1 << 5)
845 @@ -296,8 +297,10 @@ static int adt7411_probe(struct i2c_client *client,
846 mutex_init(&data->device_lock);
847 mutex_init(&data->update_lock);
848
849 + /* According to the datasheet, we must only write 1 to bit 3 */
850 ret = adt7411_modify_bit(client, ADT7411_REG_CFG1,
851 - ADT7411_CFG1_START_MONITOR, 1);
852 + ADT7411_CFG1_RESERVED_BIT3
853 + | ADT7411_CFG1_START_MONITOR, 1);
854 if (ret < 0)
855 return ret;
856
857 diff --git a/drivers/infiniband/core/multicast.c b/drivers/infiniband/core/multicast.c
858 index bb6685fb08c6..6aa648cb5381 100644
859 --- a/drivers/infiniband/core/multicast.c
860 +++ b/drivers/infiniband/core/multicast.c
861 @@ -106,7 +106,6 @@ struct mcast_group {
862 atomic_t refcount;
863 enum mcast_group_state state;
864 struct ib_sa_query *query;
865 - int query_id;
866 u16 pkey_index;
867 u8 leave_state;
868 int retries;
869 @@ -339,11 +338,7 @@ static int send_join(struct mcast_group *group, struct mcast_member *member)
870 member->multicast.comp_mask,
871 3000, GFP_KERNEL, join_handler, group,
872 &group->query);
873 - if (ret >= 0) {
874 - group->query_id = ret;
875 - ret = 0;
876 - }
877 - return ret;
878 + return (ret > 0) ? 0 : ret;
879 }
880
881 static int send_leave(struct mcast_group *group, u8 leave_state)
882 @@ -363,11 +358,7 @@ static int send_leave(struct mcast_group *group, u8 leave_state)
883 IB_SA_MCMEMBER_REC_JOIN_STATE,
884 3000, GFP_KERNEL, leave_handler,
885 group, &group->query);
886 - if (ret >= 0) {
887 - group->query_id = ret;
888 - ret = 0;
889 - }
890 - return ret;
891 + return (ret > 0) ? 0 : ret;
892 }
893
894 static void join_group(struct mcast_group *group, struct mcast_member *member,
895 diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c
896 index 05179f47bbde..d862b9b7910e 100644
897 --- a/drivers/infiniband/hw/mlx4/mad.c
898 +++ b/drivers/infiniband/hw/mlx4/mad.c
899 @@ -1080,6 +1080,27 @@ void handle_port_mgmt_change_event(struct work_struct *work)
900
901 /* Generate GUID changed event */
902 if (changed_attr & MLX4_EQ_PORT_INFO_GID_PFX_CHANGE_MASK) {
903 + if (mlx4_is_master(dev->dev)) {
904 + union ib_gid gid;
905 + int err = 0;
906 +
907 + if (!eqe->event.port_mgmt_change.params.port_info.gid_prefix)
908 + err = __mlx4_ib_query_gid(&dev->ib_dev, port, 0, &gid, 1);
909 + else
910 + gid.global.subnet_prefix =
911 + eqe->event.port_mgmt_change.params.port_info.gid_prefix;
912 + if (err) {
913 + pr_warn("Could not change QP1 subnet prefix for port %d: query_gid error (%d)\n",
914 + port, err);
915 + } else {
916 + pr_debug("Changing QP1 subnet prefix for port %d. old=0x%llx. new=0x%llx\n",
917 + port,
918 + (u64)atomic64_read(&dev->sriov.demux[port - 1].subnet_prefix),
919 + be64_to_cpu(gid.global.subnet_prefix));
920 + atomic64_set(&dev->sriov.demux[port - 1].subnet_prefix,
921 + be64_to_cpu(gid.global.subnet_prefix));
922 + }
923 + }
924 mlx4_ib_dispatch_event(dev, port, IB_EVENT_GID_CHANGE);
925 /*if master, notify all slaves*/
926 if (mlx4_is_master(dev->dev))
927 @@ -2154,6 +2175,8 @@ int mlx4_ib_init_sriov(struct mlx4_ib_dev *dev)
928 if (err)
929 goto demux_err;
930 dev->sriov.demux[i].guid_cache[0] = gid.global.interface_id;
931 + atomic64_set(&dev->sriov.demux[i].subnet_prefix,
932 + be64_to_cpu(gid.global.subnet_prefix));
933 err = alloc_pv_object(dev, mlx4_master_func_num(dev->dev), i + 1,
934 &dev->sriov.sqps[i]);
935 if (err)
936 diff --git a/drivers/infiniband/hw/mlx4/mcg.c b/drivers/infiniband/hw/mlx4/mcg.c
937 index 99451d887266..36ec8aa048aa 100644
938 --- a/drivers/infiniband/hw/mlx4/mcg.c
939 +++ b/drivers/infiniband/hw/mlx4/mcg.c
940 @@ -489,7 +489,7 @@ static u8 get_leave_state(struct mcast_group *group)
941 if (!group->members[i])
942 leave_state |= (1 << i);
943
944 - return leave_state & (group->rec.scope_join_state & 7);
945 + return leave_state & (group->rec.scope_join_state & 0xf);
946 }
947
948 static int join_group(struct mcast_group *group, int slave, u8 join_mask)
949 @@ -564,8 +564,8 @@ static void mlx4_ib_mcg_timeout_handler(struct work_struct *work)
950 } else
951 mcg_warn_group(group, "DRIVER BUG\n");
952 } else if (group->state == MCAST_LEAVE_SENT) {
953 - if (group->rec.scope_join_state & 7)
954 - group->rec.scope_join_state &= 0xf8;
955 + if (group->rec.scope_join_state & 0xf)
956 + group->rec.scope_join_state &= 0xf0;
957 group->state = MCAST_IDLE;
958 mutex_unlock(&group->lock);
959 if (release_group(group, 1))
960 @@ -605,7 +605,7 @@ static int handle_leave_req(struct mcast_group *group, u8 leave_mask,
961 static int handle_join_req(struct mcast_group *group, u8 join_mask,
962 struct mcast_req *req)
963 {
964 - u8 group_join_state = group->rec.scope_join_state & 7;
965 + u8 group_join_state = group->rec.scope_join_state & 0xf;
966 int ref = 0;
967 u16 status;
968 struct ib_sa_mcmember_data *sa_data = (struct ib_sa_mcmember_data *)req->sa_mad.data;
969 @@ -690,8 +690,8 @@ static void mlx4_ib_mcg_work_handler(struct work_struct *work)
970 u8 cur_join_state;
971
972 resp_join_state = ((struct ib_sa_mcmember_data *)
973 - group->response_sa_mad.data)->scope_join_state & 7;
974 - cur_join_state = group->rec.scope_join_state & 7;
975 + group->response_sa_mad.data)->scope_join_state & 0xf;
976 + cur_join_state = group->rec.scope_join_state & 0xf;
977
978 if (method == IB_MGMT_METHOD_GET_RESP) {
979 /* successfull join */
980 @@ -710,7 +710,7 @@ process_requests:
981 req = list_first_entry(&group->pending_list, struct mcast_req,
982 group_list);
983 sa_data = (struct ib_sa_mcmember_data *)req->sa_mad.data;
984 - req_join_state = sa_data->scope_join_state & 0x7;
985 + req_join_state = sa_data->scope_join_state & 0xf;
986
987 /* For a leave request, we will immediately answer the VF, and
988 * update our internal counters. The actual leave will be sent
989 diff --git a/drivers/infiniband/hw/mlx4/mlx4_ib.h b/drivers/infiniband/hw/mlx4/mlx4_ib.h
990 index 1caa11edac03..78f29e91653a 100644
991 --- a/drivers/infiniband/hw/mlx4/mlx4_ib.h
992 +++ b/drivers/infiniband/hw/mlx4/mlx4_ib.h
993 @@ -441,7 +441,7 @@ struct mlx4_ib_demux_ctx {
994 struct workqueue_struct *wq;
995 struct workqueue_struct *ud_wq;
996 spinlock_t ud_lock;
997 - __be64 subnet_prefix;
998 + atomic64_t subnet_prefix;
999 __be64 guid_cache[128];
1000 struct mlx4_ib_dev *dev;
1001 /* the following lock protects both mcg_table and mcg_mgid0_list */
1002 diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
1003 index ea1e2ddaddf5..f350f2d61c15 100644
1004 --- a/drivers/infiniband/hw/mlx4/qp.c
1005 +++ b/drivers/infiniband/hw/mlx4/qp.c
1006 @@ -2331,24 +2331,27 @@ static int build_mlx_header(struct mlx4_ib_sqp *sqp, struct ib_ud_wr *wr,
1007 sqp->ud_header.grh.flow_label =
1008 ah->av.ib.sl_tclass_flowlabel & cpu_to_be32(0xfffff);
1009 sqp->ud_header.grh.hop_limit = ah->av.ib.hop_limit;
1010 - if (is_eth)
1011 + if (is_eth) {
1012 memcpy(sqp->ud_header.grh.source_gid.raw, sgid.raw, 16);
1013 - else {
1014 - if (mlx4_is_mfunc(to_mdev(ib_dev)->dev)) {
1015 - /* When multi-function is enabled, the ib_core gid
1016 - * indexes don't necessarily match the hw ones, so
1017 - * we must use our own cache */
1018 - sqp->ud_header.grh.source_gid.global.subnet_prefix =
1019 - to_mdev(ib_dev)->sriov.demux[sqp->qp.port - 1].
1020 - subnet_prefix;
1021 - sqp->ud_header.grh.source_gid.global.interface_id =
1022 - to_mdev(ib_dev)->sriov.demux[sqp->qp.port - 1].
1023 - guid_cache[ah->av.ib.gid_index];
1024 - } else
1025 - ib_get_cached_gid(ib_dev,
1026 - be32_to_cpu(ah->av.ib.port_pd) >> 24,
1027 - ah->av.ib.gid_index,
1028 - &sqp->ud_header.grh.source_gid, NULL);
1029 + } else {
1030 + if (mlx4_is_mfunc(to_mdev(ib_dev)->dev)) {
1031 + /* When multi-function is enabled, the ib_core gid
1032 + * indexes don't necessarily match the hw ones, so
1033 + * we must use our own cache
1034 + */
1035 + sqp->ud_header.grh.source_gid.global.subnet_prefix =
1036 + cpu_to_be64(atomic64_read(&(to_mdev(ib_dev)->sriov.
1037 + demux[sqp->qp.port - 1].
1038 + subnet_prefix)));
1039 + sqp->ud_header.grh.source_gid.global.interface_id =
1040 + to_mdev(ib_dev)->sriov.demux[sqp->qp.port - 1].
1041 + guid_cache[ah->av.ib.gid_index];
1042 + } else {
1043 + ib_get_cached_gid(ib_dev,
1044 + be32_to_cpu(ah->av.ib.port_pd) >> 24,
1045 + ah->av.ib.gid_index,
1046 + &sqp->ud_header.grh.source_gid, NULL);
1047 + }
1048 }
1049 memcpy(sqp->ud_header.grh.destination_gid.raw,
1050 ah->av.ib.dgid, 16);
1051 diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h
1052 index 3ede10309754..69a151ae8261 100644
1053 --- a/drivers/infiniband/ulp/ipoib/ipoib.h
1054 +++ b/drivers/infiniband/ulp/ipoib/ipoib.h
1055 @@ -472,6 +472,7 @@ void ipoib_send(struct net_device *dev, struct sk_buff *skb,
1056 struct ipoib_ah *address, u32 qpn);
1057 void ipoib_reap_ah(struct work_struct *work);
1058
1059 +struct ipoib_path *__path_find(struct net_device *dev, void *gid);
1060 void ipoib_mark_paths_invalid(struct net_device *dev);
1061 void ipoib_flush_paths(struct net_device *dev);
1062 struct ipoib_dev_priv *ipoib_intf_alloc(const char *format);
1063 diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
1064 index 3ae9726efb98..8ca75af0e6d1 100644
1065 --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
1066 +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
1067 @@ -1299,6 +1299,8 @@ void ipoib_cm_destroy_tx(struct ipoib_cm_tx *tx)
1068 }
1069 }
1070
1071 +#define QPN_AND_OPTIONS_OFFSET 4
1072 +
1073 static void ipoib_cm_tx_start(struct work_struct *work)
1074 {
1075 struct ipoib_dev_priv *priv = container_of(work, struct ipoib_dev_priv,
1076 @@ -1307,6 +1309,7 @@ static void ipoib_cm_tx_start(struct work_struct *work)
1077 struct ipoib_neigh *neigh;
1078 struct ipoib_cm_tx *p;
1079 unsigned long flags;
1080 + struct ipoib_path *path;
1081 int ret;
1082
1083 struct ib_sa_path_rec pathrec;
1084 @@ -1319,7 +1322,19 @@ static void ipoib_cm_tx_start(struct work_struct *work)
1085 p = list_entry(priv->cm.start_list.next, typeof(*p), list);
1086 list_del_init(&p->list);
1087 neigh = p->neigh;
1088 +
1089 qpn = IPOIB_QPN(neigh->daddr);
1090 + /*
1091 + * As long as the search is with these 2 locks,
1092 + * path existence indicates its validity.
1093 + */
1094 + path = __path_find(dev, neigh->daddr + QPN_AND_OPTIONS_OFFSET);
1095 + if (!path) {
1096 + pr_info("%s ignore not valid path %pI6\n",
1097 + __func__,
1098 + neigh->daddr + QPN_AND_OPTIONS_OFFSET);
1099 + goto free_neigh;
1100 + }
1101 memcpy(&pathrec, &p->path->pathrec, sizeof pathrec);
1102
1103 spin_unlock_irqrestore(&priv->lock, flags);
1104 @@ -1331,6 +1346,7 @@ static void ipoib_cm_tx_start(struct work_struct *work)
1105 spin_lock_irqsave(&priv->lock, flags);
1106
1107 if (ret) {
1108 +free_neigh:
1109 neigh = p->neigh;
1110 if (neigh) {
1111 neigh->cm = NULL;
1112 diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
1113 index fa9c42ff1fb0..85de078fb0ce 100644
1114 --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c
1115 +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
1116 @@ -1028,8 +1028,17 @@ static void __ipoib_ib_dev_flush(struct ipoib_dev_priv *priv,
1117 }
1118
1119 if (level == IPOIB_FLUSH_LIGHT) {
1120 + int oper_up;
1121 ipoib_mark_paths_invalid(dev);
1122 + /* Set IPoIB operation as down to prevent races between:
1123 + * the flush flow which leaves MCG and on the fly joins
1124 + * which can happen during that time. mcast restart task
1125 + * should deal with join requests we missed.
1126 + */
1127 + oper_up = test_and_clear_bit(IPOIB_FLAG_OPER_UP, &priv->flags);
1128 ipoib_mcast_dev_flush(dev);
1129 + if (oper_up)
1130 + set_bit(IPOIB_FLAG_OPER_UP, &priv->flags);
1131 ipoib_flush_ah(dev);
1132 }
1133
1134 diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
1135 index 942dffca6a9d..5f7681b975d0 100644
1136 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
1137 +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
1138 @@ -481,7 +481,7 @@ int ipoib_set_mode(struct net_device *dev, const char *buf)
1139 return -EINVAL;
1140 }
1141
1142 -static struct ipoib_path *__path_find(struct net_device *dev, void *gid)
1143 +struct ipoib_path *__path_find(struct net_device *dev, void *gid)
1144 {
1145 struct ipoib_dev_priv *priv = netdev_priv(dev);
1146 struct rb_node *n = priv->path_tree.rb_node;
1147 diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
1148 index 2fc499a2207e..44aa57edf207 100644
1149 --- a/drivers/irqchip/irq-gic-v3.c
1150 +++ b/drivers/irqchip/irq-gic-v3.c
1151 @@ -544,7 +544,7 @@ static struct notifier_block gic_cpu_notifier = {
1152 static u16 gic_compute_target_list(int *base_cpu, const struct cpumask *mask,
1153 unsigned long cluster_id)
1154 {
1155 - int cpu = *base_cpu;
1156 + int next_cpu, cpu = *base_cpu;
1157 unsigned long mpidr = cpu_logical_map(cpu);
1158 u16 tlist = 0;
1159
1160 @@ -558,9 +558,10 @@ static u16 gic_compute_target_list(int *base_cpu, const struct cpumask *mask,
1161
1162 tlist |= 1 << (mpidr & 0xf);
1163
1164 - cpu = cpumask_next(cpu, mask);
1165 - if (cpu >= nr_cpu_ids)
1166 + next_cpu = cpumask_next(cpu, mask);
1167 + if (next_cpu >= nr_cpu_ids)
1168 goto out;
1169 + cpu = next_cpu;
1170
1171 mpidr = cpu_logical_map(cpu);
1172
1173 diff --git a/drivers/md/dm-log-writes.c b/drivers/md/dm-log-writes.c
1174 index d8956b4a7b09..c8b513ee117c 100644
1175 --- a/drivers/md/dm-log-writes.c
1176 +++ b/drivers/md/dm-log-writes.c
1177 @@ -259,7 +259,7 @@ static int log_one_block(struct log_writes_c *lc,
1178 sector++;
1179
1180 atomic_inc(&lc->io_blocks);
1181 - bio = bio_alloc(GFP_KERNEL, block->vec_cnt);
1182 + bio = bio_alloc(GFP_KERNEL, min(block->vec_cnt, BIO_MAX_PAGES));
1183 if (!bio) {
1184 DMERR("Couldn't alloc log bio");
1185 goto error;
1186 @@ -280,7 +280,7 @@ static int log_one_block(struct log_writes_c *lc,
1187 if (ret != block->vecs[i].bv_len) {
1188 atomic_inc(&lc->io_blocks);
1189 submit_bio(WRITE, bio);
1190 - bio = bio_alloc(GFP_KERNEL, block->vec_cnt - i);
1191 + bio = bio_alloc(GFP_KERNEL, min(block->vec_cnt - i, BIO_MAX_PAGES));
1192 if (!bio) {
1193 DMERR("Couldn't alloc log bio");
1194 goto error;
1195 diff --git a/drivers/media/usb/em28xx/em28xx-i2c.c b/drivers/media/usb/em28xx/em28xx-i2c.c
1196 index a19b5c8b56ff..1a9e1e556706 100644
1197 --- a/drivers/media/usb/em28xx/em28xx-i2c.c
1198 +++ b/drivers/media/usb/em28xx/em28xx-i2c.c
1199 @@ -507,9 +507,8 @@ static int em28xx_i2c_xfer(struct i2c_adapter *i2c_adap,
1200 if (dev->disconnected)
1201 return -ENODEV;
1202
1203 - rc = rt_mutex_trylock(&dev->i2c_bus_lock);
1204 - if (rc < 0)
1205 - return rc;
1206 + if (!rt_mutex_trylock(&dev->i2c_bus_lock))
1207 + return -EAGAIN;
1208
1209 /* Switch I2C bus if needed */
1210 if (bus != dev->cur_i2c_bus &&
1211 diff --git a/drivers/media/usb/gspca/cpia1.c b/drivers/media/usb/gspca/cpia1.c
1212 index f23df4a9d8c5..52b88e9e656b 100644
1213 --- a/drivers/media/usb/gspca/cpia1.c
1214 +++ b/drivers/media/usb/gspca/cpia1.c
1215 @@ -1624,7 +1624,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
1216
1217 static void sd_stopN(struct gspca_dev *gspca_dev)
1218 {
1219 - struct sd *sd = (struct sd *) gspca_dev;
1220 + struct sd *sd __maybe_unused = (struct sd *) gspca_dev;
1221
1222 command_pause(gspca_dev);
1223
1224 diff --git a/drivers/media/usb/gspca/konica.c b/drivers/media/usb/gspca/konica.c
1225 index 39c96bb4c985..0712b1bc90b4 100644
1226 --- a/drivers/media/usb/gspca/konica.c
1227 +++ b/drivers/media/usb/gspca/konica.c
1228 @@ -243,7 +243,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
1229
1230 static void sd_stopN(struct gspca_dev *gspca_dev)
1231 {
1232 - struct sd *sd = (struct sd *) gspca_dev;
1233 + struct sd *sd __maybe_unused = (struct sd *) gspca_dev;
1234
1235 konica_stream_off(gspca_dev);
1236 #if IS_ENABLED(CONFIG_INPUT)
1237 diff --git a/drivers/media/usb/gspca/t613.c b/drivers/media/usb/gspca/t613.c
1238 index e2cc4e5a0ccb..bb52fc1fe598 100644
1239 --- a/drivers/media/usb/gspca/t613.c
1240 +++ b/drivers/media/usb/gspca/t613.c
1241 @@ -837,7 +837,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
1242 u8 *data, /* isoc packet */
1243 int len) /* iso packet length */
1244 {
1245 - struct sd *sd = (struct sd *) gspca_dev;
1246 + struct sd *sd __maybe_unused = (struct sd *) gspca_dev;
1247 int pkt_type;
1248
1249 if (data[0] == 0x5a) {
1250 diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
1251 index 28a057fae0a1..72bbb12fb938 100644
1252 --- a/drivers/mmc/host/pxamci.c
1253 +++ b/drivers/mmc/host/pxamci.c
1254 @@ -798,14 +798,16 @@ static int pxamci_probe(struct platform_device *pdev)
1255 gpio_direction_output(gpio_power,
1256 host->pdata->gpio_power_invert);
1257 }
1258 - if (gpio_is_valid(gpio_ro))
1259 + if (gpio_is_valid(gpio_ro)) {
1260 ret = mmc_gpio_request_ro(mmc, gpio_ro);
1261 - if (ret) {
1262 - dev_err(&pdev->dev, "Failed requesting gpio_ro %d\n", gpio_ro);
1263 - goto out;
1264 - } else {
1265 - mmc->caps2 |= host->pdata->gpio_card_ro_invert ?
1266 - 0 : MMC_CAP2_RO_ACTIVE_HIGH;
1267 + if (ret) {
1268 + dev_err(&pdev->dev, "Failed requesting gpio_ro %d\n",
1269 + gpio_ro);
1270 + goto out;
1271 + } else {
1272 + mmc->caps2 |= host->pdata->gpio_card_ro_invert ?
1273 + 0 : MMC_CAP2_RO_ACTIVE_HIGH;
1274 + }
1275 }
1276
1277 if (gpio_is_valid(gpio_cd))
1278 diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
1279 index c72313d66cf6..bc054a5ed7f8 100644
1280 --- a/drivers/mtd/nand/davinci_nand.c
1281 +++ b/drivers/mtd/nand/davinci_nand.c
1282 @@ -241,6 +241,9 @@ static void nand_davinci_hwctl_4bit(struct mtd_info *mtd, int mode)
1283 unsigned long flags;
1284 u32 val;
1285
1286 + /* Reset ECC hardware */
1287 + davinci_nand_readl(info, NAND_4BIT_ECC1_OFFSET);
1288 +
1289 spin_lock_irqsave(&davinci_nand_lock, flags);
1290
1291 /* Start 4-bit ECC calculation for read/write */
1292 diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c
1293 index ad535a854e5c..eab132778e67 100644
1294 --- a/drivers/net/can/dev.c
1295 +++ b/drivers/net/can/dev.c
1296 @@ -21,6 +21,7 @@
1297 #include <linux/slab.h>
1298 #include <linux/netdevice.h>
1299 #include <linux/if_arp.h>
1300 +#include <linux/workqueue.h>
1301 #include <linux/can.h>
1302 #include <linux/can/dev.h>
1303 #include <linux/can/skb.h>
1304 @@ -471,9 +472,8 @@ EXPORT_SYMBOL_GPL(can_free_echo_skb);
1305 /*
1306 * CAN device restart for bus-off recovery
1307 */
1308 -static void can_restart(unsigned long data)
1309 +static void can_restart(struct net_device *dev)
1310 {
1311 - struct net_device *dev = (struct net_device *)data;
1312 struct can_priv *priv = netdev_priv(dev);
1313 struct net_device_stats *stats = &dev->stats;
1314 struct sk_buff *skb;
1315 @@ -513,6 +513,14 @@ restart:
1316 netdev_err(dev, "Error %d during restart", err);
1317 }
1318
1319 +static void can_restart_work(struct work_struct *work)
1320 +{
1321 + struct delayed_work *dwork = to_delayed_work(work);
1322 + struct can_priv *priv = container_of(dwork, struct can_priv, restart_work);
1323 +
1324 + can_restart(priv->dev);
1325 +}
1326 +
1327 int can_restart_now(struct net_device *dev)
1328 {
1329 struct can_priv *priv = netdev_priv(dev);
1330 @@ -526,8 +534,8 @@ int can_restart_now(struct net_device *dev)
1331 if (priv->state != CAN_STATE_BUS_OFF)
1332 return -EBUSY;
1333
1334 - /* Runs as soon as possible in the timer context */
1335 - mod_timer(&priv->restart_timer, jiffies);
1336 + cancel_delayed_work_sync(&priv->restart_work);
1337 + can_restart(dev);
1338
1339 return 0;
1340 }
1341 @@ -548,8 +556,8 @@ void can_bus_off(struct net_device *dev)
1342 netif_carrier_off(dev);
1343
1344 if (priv->restart_ms)
1345 - mod_timer(&priv->restart_timer,
1346 - jiffies + (priv->restart_ms * HZ) / 1000);
1347 + schedule_delayed_work(&priv->restart_work,
1348 + msecs_to_jiffies(priv->restart_ms));
1349 }
1350 EXPORT_SYMBOL_GPL(can_bus_off);
1351
1352 @@ -658,6 +666,7 @@ struct net_device *alloc_candev(int sizeof_priv, unsigned int echo_skb_max)
1353 return NULL;
1354
1355 priv = netdev_priv(dev);
1356 + priv->dev = dev;
1357
1358 if (echo_skb_max) {
1359 priv->echo_skb_max = echo_skb_max;
1360 @@ -667,7 +676,7 @@ struct net_device *alloc_candev(int sizeof_priv, unsigned int echo_skb_max)
1361
1362 priv->state = CAN_STATE_STOPPED;
1363
1364 - init_timer(&priv->restart_timer);
1365 + INIT_DELAYED_WORK(&priv->restart_work, can_restart_work);
1366
1367 return dev;
1368 }
1369 @@ -748,8 +757,6 @@ int open_candev(struct net_device *dev)
1370 if (!netif_carrier_ok(dev))
1371 netif_carrier_on(dev);
1372
1373 - setup_timer(&priv->restart_timer, can_restart, (unsigned long)dev);
1374 -
1375 return 0;
1376 }
1377 EXPORT_SYMBOL_GPL(open_candev);
1378 @@ -764,7 +771,7 @@ void close_candev(struct net_device *dev)
1379 {
1380 struct can_priv *priv = netdev_priv(dev);
1381
1382 - del_timer_sync(&priv->restart_timer);
1383 + cancel_delayed_work_sync(&priv->restart_work);
1384 can_flush_echo_skb(dev);
1385 }
1386 EXPORT_SYMBOL_GPL(close_candev);
1387 diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c
1388 index 2d74c6e4d7b6..1cf715c72683 100644
1389 --- a/drivers/net/ethernet/intel/i40e/i40e_common.c
1390 +++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
1391 @@ -302,13 +302,15 @@ void i40e_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask, void *desc,
1392 void *buffer, u16 buf_len)
1393 {
1394 struct i40e_aq_desc *aq_desc = (struct i40e_aq_desc *)desc;
1395 - u16 len = le16_to_cpu(aq_desc->datalen);
1396 + u16 len;
1397 u8 *buf = (u8 *)buffer;
1398 u16 i = 0;
1399
1400 if ((!(mask & hw->debug_mask)) || (desc == NULL))
1401 return;
1402
1403 + len = le16_to_cpu(aq_desc->datalen);
1404 +
1405 i40e_debug(hw, mask,
1406 "AQ CMD: opcode 0x%04X, flags 0x%04X, datalen 0x%04X, retval 0x%04X\n",
1407 le16_to_cpu(aq_desc->opcode),
1408 diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
1409 index 8b4561e8ce1a..ef493271c712 100644
1410 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
1411 +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
1412 @@ -4176,7 +4176,7 @@ static void ath9k_hw_ar9300_set_board_values(struct ath_hw *ah,
1413 if (!AR_SREV_9330(ah) && !AR_SREV_9340(ah) && !AR_SREV_9531(ah))
1414 ar9003_hw_internal_regulator_apply(ah);
1415 ar9003_hw_apply_tuning_caps(ah);
1416 - ar9003_hw_apply_minccapwr_thresh(ah, chan);
1417 + ar9003_hw_apply_minccapwr_thresh(ah, is2ghz);
1418 ar9003_hw_txend_to_xpa_off_apply(ah, is2ghz);
1419 ar9003_hw_thermometer_apply(ah);
1420 ar9003_hw_thermo_cal_apply(ah);
1421 diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
1422 index 410a6645d316..59cef6c69fe8 100644
1423 --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
1424 +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
1425 @@ -726,8 +726,10 @@ int brcmf_sdiod_recv_chain(struct brcmf_sdio_dev *sdiodev,
1426 return -ENOMEM;
1427 err = brcmf_sdiod_buffrw(sdiodev, SDIO_FUNC_2, false, addr,
1428 glom_skb);
1429 - if (err)
1430 + if (err) {
1431 + brcmu_pkt_buf_free_skb(glom_skb);
1432 goto done;
1433 + }
1434
1435 skb_queue_walk(pktq, skb) {
1436 memcpy(skb->data, glom_skb->data, skb->len);
1437 diff --git a/drivers/net/wireless/brcm80211/brcmsmac/dma.c b/drivers/net/wireless/brcm80211/brcmsmac/dma.c
1438 index 796f5f9d5d5a..b7df576bb84d 100644
1439 --- a/drivers/net/wireless/brcm80211/brcmsmac/dma.c
1440 +++ b/drivers/net/wireless/brcm80211/brcmsmac/dma.c
1441 @@ -1079,8 +1079,10 @@ bool dma_rxfill(struct dma_pub *pub)
1442
1443 pa = dma_map_single(di->dmadev, p->data, di->rxbufsize,
1444 DMA_FROM_DEVICE);
1445 - if (dma_mapping_error(di->dmadev, pa))
1446 + if (dma_mapping_error(di->dmadev, pa)) {
1447 + brcmu_pkt_buf_free_skb(p);
1448 return false;
1449 + }
1450
1451 /* save the free packet pointer */
1452 di->rxp[rxout] = p;
1453 diff --git a/drivers/net/wireless/brcm80211/brcmsmac/stf.c b/drivers/net/wireless/brcm80211/brcmsmac/stf.c
1454 index dd9162722495..0ab865de1491 100644
1455 --- a/drivers/net/wireless/brcm80211/brcmsmac/stf.c
1456 +++ b/drivers/net/wireless/brcm80211/brcmsmac/stf.c
1457 @@ -87,7 +87,7 @@ void
1458 brcms_c_stf_ss_algo_channel_get(struct brcms_c_info *wlc, u16 *ss_algo_channel,
1459 u16 chanspec)
1460 {
1461 - struct tx_power power;
1462 + struct tx_power power = { };
1463 u8 siso_mcs_id, cdd_mcs_id, stbc_mcs_id;
1464
1465 /* Clear previous settings */
1466 diff --git a/drivers/net/wireless/iwlwifi/mvm/fw.c b/drivers/net/wireless/iwlwifi/mvm/fw.c
1467 index 610c442c7ab2..9584f950fd2f 100644
1468 --- a/drivers/net/wireless/iwlwifi/mvm/fw.c
1469 +++ b/drivers/net/wireless/iwlwifi/mvm/fw.c
1470 @@ -935,7 +935,8 @@ int iwl_mvm_start_fw_dbg_conf(struct iwl_mvm *mvm, u8 conf_id)
1471 }
1472
1473 mvm->fw_dbg_conf = conf_id;
1474 - return ret;
1475 +
1476 + return 0;
1477 }
1478
1479 static int iwl_mvm_config_ltr(struct iwl_mvm *mvm)
1480 diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
1481 index f96ab2f4b90e..ce12717e656a 100644
1482 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
1483 +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
1484 @@ -3992,8 +3992,8 @@ static int iwl_mvm_mac_get_survey(struct ieee80211_hw *hw, int idx,
1485 if (idx != 0)
1486 return -ENOENT;
1487
1488 - if (fw_has_capa(&mvm->fw->ucode_capa,
1489 - IWL_UCODE_TLV_CAPA_RADIO_BEACON_STATS))
1490 + if (!fw_has_capa(&mvm->fw->ucode_capa,
1491 + IWL_UCODE_TLV_CAPA_RADIO_BEACON_STATS))
1492 return -ENOENT;
1493
1494 mutex_lock(&mvm->mutex);
1495 @@ -4039,8 +4039,8 @@ static void iwl_mvm_mac_sta_statistics(struct ieee80211_hw *hw,
1496 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
1497 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);
1498
1499 - if (fw_has_capa(&mvm->fw->ucode_capa,
1500 - IWL_UCODE_TLV_CAPA_RADIO_BEACON_STATS))
1501 + if (!fw_has_capa(&mvm->fw->ucode_capa,
1502 + IWL_UCODE_TLV_CAPA_RADIO_BEACON_STATS))
1503 return;
1504
1505 /* if beacon filtering isn't on mac80211 does it anyway */
1506 diff --git a/drivers/net/wireless/iwlwifi/mvm/sf.c b/drivers/net/wireless/iwlwifi/mvm/sf.c
1507 index b0f59fdd287c..d7d72adb6343 100644
1508 --- a/drivers/net/wireless/iwlwifi/mvm/sf.c
1509 +++ b/drivers/net/wireless/iwlwifi/mvm/sf.c
1510 @@ -215,7 +215,7 @@ static int iwl_mvm_sf_config(struct iwl_mvm *mvm, u8 sta_id,
1511 enum iwl_sf_state new_state)
1512 {
1513 struct iwl_sf_cfg_cmd sf_cmd = {
1514 - .state = cpu_to_le32(SF_FULL_ON),
1515 + .state = cpu_to_le32(new_state),
1516 };
1517 struct ieee80211_sta *sta;
1518 int ret = 0;
1519 diff --git a/drivers/net/wireless/iwlwifi/pcie/tx.c b/drivers/net/wireless/iwlwifi/pcie/tx.c
1520 index a8c8a4a7420b..8dfe6b2bc703 100644
1521 --- a/drivers/net/wireless/iwlwifi/pcie/tx.c
1522 +++ b/drivers/net/wireless/iwlwifi/pcie/tx.c
1523 @@ -1508,9 +1508,9 @@ static int iwl_pcie_enqueue_hcmd(struct iwl_trans *trans,
1524
1525 /* start the TFD with the scratchbuf */
1526 scratch_size = min_t(int, copy_size, IWL_HCMD_SCRATCHBUF_SIZE);
1527 - memcpy(&txq->scratchbufs[q->write_ptr], &out_cmd->hdr, scratch_size);
1528 + memcpy(&txq->scratchbufs[idx], &out_cmd->hdr, scratch_size);
1529 iwl_pcie_txq_build_tfd(trans, txq,
1530 - iwl_pcie_get_scratchbuf_dma(txq, q->write_ptr),
1531 + iwl_pcie_get_scratchbuf_dma(txq, idx),
1532 scratch_size, true);
1533
1534 /* map first command fragment, if any remains */
1535 diff --git a/drivers/nfc/fdp/fdp.c b/drivers/nfc/fdp/fdp.c
1536 index ccb07a1b153d..23e53780728b 100644
1537 --- a/drivers/nfc/fdp/fdp.c
1538 +++ b/drivers/nfc/fdp/fdp.c
1539 @@ -352,7 +352,7 @@ static int fdp_nci_patch_otp(struct nci_dev *ndev)
1540 {
1541 struct fdp_nci_info *info = nci_get_drvdata(ndev);
1542 struct device *dev = &info->phy->i2c_dev->dev;
1543 - u8 conn_id;
1544 + int conn_id;
1545 int r = 0;
1546
1547 if (info->otp_version >= info->otp_patch_version)
1548 @@ -423,7 +423,7 @@ static int fdp_nci_patch_ram(struct nci_dev *ndev)
1549 {
1550 struct fdp_nci_info *info = nci_get_drvdata(ndev);
1551 struct device *dev = &info->phy->i2c_dev->dev;
1552 - u8 conn_id;
1553 + int conn_id;
1554 int r = 0;
1555
1556 if (info->ram_version >= info->ram_patch_version)
1557 diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c
1558 index be3755c973e9..8af1f900ea65 100644
1559 --- a/drivers/perf/arm_pmu.c
1560 +++ b/drivers/perf/arm_pmu.c
1561 @@ -815,6 +815,7 @@ static int of_pmu_irq_cfg(struct arm_pmu *pmu)
1562 if (i > 0 && spi != using_spi) {
1563 pr_err("PPI/SPI IRQ type mismatch for %s!\n",
1564 dn->name);
1565 + of_node_put(dn);
1566 kfree(irqs);
1567 return -EINVAL;
1568 }
1569 diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
1570 index 589872cc8adb..a19c29c79b0a 100644
1571 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
1572 +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
1573 @@ -73,6 +73,12 @@ static void uniphier_pctl_pin_dbg_show(struct pinctrl_dev *pctldev,
1574 case UNIPHIER_PIN_PULL_DOWN:
1575 pull_dir = "DOWN";
1576 break;
1577 + case UNIPHIER_PIN_PULL_UP_FIXED:
1578 + pull_dir = "UP(FIXED)";
1579 + break;
1580 + case UNIPHIER_PIN_PULL_DOWN_FIXED:
1581 + pull_dir = "DOWN(FIXED)";
1582 + break;
1583 case UNIPHIER_PIN_PULL_NONE:
1584 pull_dir = "NONE";
1585 break;
1586 diff --git a/drivers/regulator/qcom_smd-regulator.c b/drivers/regulator/qcom_smd-regulator.c
1587 index 6fa0c7d13290..4bda998afdef 100644
1588 --- a/drivers/regulator/qcom_smd-regulator.c
1589 +++ b/drivers/regulator/qcom_smd-regulator.c
1590 @@ -166,29 +166,30 @@ static const struct regulator_desc pm8x41_hfsmps = {
1591 static const struct regulator_desc pm8841_ftsmps = {
1592 .linear_ranges = (struct regulator_linear_range[]) {
1593 REGULATOR_LINEAR_RANGE(350000, 0, 184, 5000),
1594 - REGULATOR_LINEAR_RANGE(700000, 185, 339, 10000),
1595 + REGULATOR_LINEAR_RANGE(1280000, 185, 261, 10000),
1596 },
1597 .n_linear_ranges = 2,
1598 - .n_voltages = 340,
1599 + .n_voltages = 262,
1600 .ops = &rpm_smps_ldo_ops,
1601 };
1602
1603 static const struct regulator_desc pm8941_boost = {
1604 .linear_ranges = (struct regulator_linear_range[]) {
1605 - REGULATOR_LINEAR_RANGE(4000000, 0, 15, 100000),
1606 + REGULATOR_LINEAR_RANGE(4000000, 0, 30, 50000),
1607 },
1608 .n_linear_ranges = 1,
1609 - .n_voltages = 16,
1610 + .n_voltages = 31,
1611 .ops = &rpm_smps_ldo_ops,
1612 };
1613
1614 static const struct regulator_desc pm8941_pldo = {
1615 .linear_ranges = (struct regulator_linear_range[]) {
1616 - REGULATOR_LINEAR_RANGE( 750000, 0, 30, 25000),
1617 - REGULATOR_LINEAR_RANGE(1500000, 31, 99, 50000),
1618 + REGULATOR_LINEAR_RANGE( 750000, 0, 63, 12500),
1619 + REGULATOR_LINEAR_RANGE(1550000, 64, 126, 25000),
1620 + REGULATOR_LINEAR_RANGE(3100000, 127, 163, 50000),
1621 },
1622 - .n_linear_ranges = 2,
1623 - .n_voltages = 100,
1624 + .n_linear_ranges = 3,
1625 + .n_voltages = 164,
1626 .ops = &rpm_smps_ldo_ops,
1627 };
1628
1629 diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c
1630 index 88a5dc88badc..fee6457e3111 100644
1631 --- a/drivers/regulator/qcom_spmi-regulator.c
1632 +++ b/drivers/regulator/qcom_spmi-regulator.c
1633 @@ -1050,6 +1050,8 @@ static struct regulator_ops spmi_vs_ops = {
1634 .set_pull_down = spmi_regulator_common_set_pull_down,
1635 .set_soft_start = spmi_regulator_common_set_soft_start,
1636 .set_over_current_protection = spmi_regulator_vs_ocp,
1637 + .set_mode = spmi_regulator_common_set_mode,
1638 + .get_mode = spmi_regulator_common_get_mode,
1639 };
1640
1641 static struct regulator_ops spmi_boost_ops = {
1642 @@ -1440,6 +1442,7 @@ static const struct spmi_regulator_data pm8941_regulators[] = {
1643 { "s1", 0x1400, "vdd_s1", },
1644 { "s2", 0x1700, "vdd_s2", },
1645 { "s3", 0x1a00, "vdd_s3", },
1646 + { "s4", 0xa000, },
1647 { "l1", 0x4000, "vdd_l1_l3", },
1648 { "l2", 0x4100, "vdd_l2_lvs_1_2_3", },
1649 { "l3", 0x4200, "vdd_l1_l3", },
1650 @@ -1467,8 +1470,8 @@ static const struct spmi_regulator_data pm8941_regulators[] = {
1651 { "lvs1", 0x8000, "vdd_l2_lvs_1_2_3", },
1652 { "lvs2", 0x8100, "vdd_l2_lvs_1_2_3", },
1653 { "lvs3", 0x8200, "vdd_l2_lvs_1_2_3", },
1654 - { "mvs1", 0x8300, "vin_5vs", },
1655 - { "mvs2", 0x8400, "vin_5vs", },
1656 + { "5vs1", 0x8300, "vin_5vs", "ocp-5vs1", },
1657 + { "5vs2", 0x8400, "vin_5vs", "ocp-5vs2", },
1658 { }
1659 };
1660
1661 diff --git a/drivers/scsi/fnic/fnic_fcs.c b/drivers/scsi/fnic/fnic_fcs.c
1662 index 67669a9e73c1..f3a33312a9a6 100644
1663 --- a/drivers/scsi/fnic/fnic_fcs.c
1664 +++ b/drivers/scsi/fnic/fnic_fcs.c
1665 @@ -954,8 +954,8 @@ int fnic_alloc_rq_frame(struct vnic_rq *rq)
1666 skb_put(skb, len);
1667 pa = pci_map_single(fnic->pdev, skb->data, len, PCI_DMA_FROMDEVICE);
1668
1669 - r = pci_dma_mapping_error(fnic->pdev, pa);
1670 - if (r) {
1671 + if (pci_dma_mapping_error(fnic->pdev, pa)) {
1672 + r = -ENOMEM;
1673 printk(KERN_ERR "PCI mapping failed with error %d\n", r);
1674 goto free_skb;
1675 }
1676 @@ -1093,8 +1093,8 @@ static int fnic_send_frame(struct fnic *fnic, struct fc_frame *fp)
1677
1678 pa = pci_map_single(fnic->pdev, eth_hdr, tot_len, PCI_DMA_TODEVICE);
1679
1680 - ret = pci_dma_mapping_error(fnic->pdev, pa);
1681 - if (ret) {
1682 + if (pci_dma_mapping_error(fnic->pdev, pa)) {
1683 + ret = -ENOMEM;
1684 printk(KERN_ERR "DMA map failed with error %d\n", ret);
1685 goto free_skb_on_err;
1686 }
1687 diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
1688 index a7934ab00b96..d22de4c8c399 100644
1689 --- a/drivers/spi/spi-sh-msiof.c
1690 +++ b/drivers/spi/spi-sh-msiof.c
1691 @@ -263,6 +263,9 @@ static void sh_msiof_spi_set_clk_regs(struct sh_msiof_spi_priv *p,
1692
1693 for (k = 0; k < ARRAY_SIZE(sh_msiof_spi_div_table); k++) {
1694 brps = DIV_ROUND_UP(div, sh_msiof_spi_div_table[k].div);
1695 + /* SCR_BRDV_DIV_1 is valid only if BRPS is x 1/1 or x 1/2 */
1696 + if (sh_msiof_spi_div_table[k].div == 1 && brps > 2)
1697 + continue;
1698 if (brps <= 32) /* max of brdv is 32 */
1699 break;
1700 }
1701 diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
1702 index b1e45161eefc..18c2b6daf588 100644
1703 --- a/drivers/staging/fbtft/fbtft-core.c
1704 +++ b/drivers/staging/fbtft/fbtft-core.c
1705 @@ -392,11 +392,11 @@ static void fbtft_update_display(struct fbtft_par *par, unsigned start_line,
1706
1707 if (unlikely(timeit)) {
1708 ts_end = ktime_get();
1709 - if (ktime_to_ns(par->update_time))
1710 + if (!ktime_to_ns(par->update_time))
1711 par->update_time = ts_start;
1712
1713 - par->update_time = ts_start;
1714 fps = ktime_us_delta(ts_start, par->update_time);
1715 + par->update_time = ts_start;
1716 fps = fps ? 1000000 / fps : 0;
1717
1718 throughput = ktime_us_delta(ts_end, ts_start);
1719 diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
1720 index 7a11a8263171..deaddb950c20 100644
1721 --- a/drivers/usb/class/usbtmc.c
1722 +++ b/drivers/usb/class/usbtmc.c
1723 @@ -121,6 +121,7 @@ static void usbtmc_delete(struct kref *kref)
1724 struct usbtmc_device_data *data = to_usbtmc_data(kref);
1725
1726 usb_put_dev(data->usb_dev);
1727 + kfree(data);
1728 }
1729
1730 static int usbtmc_open(struct inode *inode, struct file *filp)
1731 @@ -1104,7 +1105,7 @@ static int usbtmc_probe(struct usb_interface *intf,
1732
1733 dev_dbg(&intf->dev, "%s called\n", __func__);
1734
1735 - data = devm_kzalloc(&intf->dev, sizeof(*data), GFP_KERNEL);
1736 + data = kmalloc(sizeof(*data), GFP_KERNEL);
1737 if (!data)
1738 return -ENOMEM;
1739
1740 diff --git a/drivers/usb/gadget/udc/fsl_qe_udc.c b/drivers/usb/gadget/udc/fsl_qe_udc.c
1741 index c73689b72f95..b38a33584d4a 100644
1742 --- a/drivers/usb/gadget/udc/fsl_qe_udc.c
1743 +++ b/drivers/usb/gadget/udc/fsl_qe_udc.c
1744 @@ -1878,11 +1878,8 @@ static int qe_get_frame(struct usb_gadget *gadget)
1745
1746 tmp = in_be16(&udc->usb_param->frame_n);
1747 if (tmp & 0x8000)
1748 - tmp = tmp & 0x07ff;
1749 - else
1750 - tmp = -EINVAL;
1751 -
1752 - return (int)tmp;
1753 + return tmp & 0x07ff;
1754 + return -EINVAL;
1755 }
1756
1757 static int fsl_qe_start(struct usb_gadget *gadget,
1758 diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c
1759 index 7771be3ac178..4dd531ac5a7f 100644
1760 --- a/drivers/usb/misc/legousbtower.c
1761 +++ b/drivers/usb/misc/legousbtower.c
1762 @@ -898,24 +898,6 @@ static int tower_probe (struct usb_interface *interface, const struct usb_device
1763 dev->interrupt_in_interval = interrupt_in_interval ? interrupt_in_interval : dev->interrupt_in_endpoint->bInterval;
1764 dev->interrupt_out_interval = interrupt_out_interval ? interrupt_out_interval : dev->interrupt_out_endpoint->bInterval;
1765
1766 - /* we can register the device now, as it is ready */
1767 - usb_set_intfdata (interface, dev);
1768 -
1769 - retval = usb_register_dev (interface, &tower_class);
1770 -
1771 - if (retval) {
1772 - /* something prevented us from registering this driver */
1773 - dev_err(idev, "Not able to get a minor for this device.\n");
1774 - usb_set_intfdata (interface, NULL);
1775 - goto error;
1776 - }
1777 - dev->minor = interface->minor;
1778 -
1779 - /* let the user know what node this device is now attached to */
1780 - dev_info(&interface->dev, "LEGO USB Tower #%d now attached to major "
1781 - "%d minor %d\n", (dev->minor - LEGO_USB_TOWER_MINOR_BASE),
1782 - USB_MAJOR, dev->minor);
1783 -
1784 /* get the firmware version and log it */
1785 result = usb_control_msg (udev,
1786 usb_rcvctrlpipe(udev, 0),
1787 @@ -936,6 +918,23 @@ static int tower_probe (struct usb_interface *interface, const struct usb_device
1788 get_version_reply.minor,
1789 le16_to_cpu(get_version_reply.build_no));
1790
1791 + /* we can register the device now, as it is ready */
1792 + usb_set_intfdata (interface, dev);
1793 +
1794 + retval = usb_register_dev (interface, &tower_class);
1795 +
1796 + if (retval) {
1797 + /* something prevented us from registering this driver */
1798 + dev_err(idev, "Not able to get a minor for this device.\n");
1799 + usb_set_intfdata (interface, NULL);
1800 + goto error;
1801 + }
1802 + dev->minor = interface->minor;
1803 +
1804 + /* let the user know what node this device is now attached to */
1805 + dev_info(&interface->dev, "LEGO USB Tower #%d now attached to major "
1806 + "%d minor %d\n", (dev->minor - LEGO_USB_TOWER_MINOR_BASE),
1807 + USB_MAJOR, dev->minor);
1808
1809 exit:
1810 return retval;
1811 diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
1812 index 59a63a0b7985..e0a083f6ab68 100644
1813 --- a/drivers/usb/musb/musb_host.c
1814 +++ b/drivers/usb/musb/musb_host.c
1815 @@ -661,7 +661,7 @@ static int musb_tx_dma_set_mode_mentor(struct dma_controller *dma,
1816 csr &= ~(MUSB_TXCSR_AUTOSET | MUSB_TXCSR_DMAMODE);
1817 csr |= MUSB_TXCSR_DMAENAB; /* against programmer's guide */
1818 }
1819 - channel->desired_mode = mode;
1820 + channel->desired_mode = *mode;
1821 musb_writew(epio, MUSB_TXCSR, csr);
1822
1823 return 0;
1824 @@ -2008,10 +2008,8 @@ void musb_host_rx(struct musb *musb, u8 epnum)
1825 qh->offset,
1826 urb->transfer_buffer_length);
1827
1828 - done = musb_rx_dma_in_inventra_cppi41(c, hw_ep, qh,
1829 - urb, xfer_len,
1830 - iso_err);
1831 - if (done)
1832 + if (musb_rx_dma_in_inventra_cppi41(c, hw_ep, qh, urb,
1833 + xfer_len, iso_err))
1834 goto finish;
1835 else
1836 dev_err(musb->controller, "error: rx_dma failed\n");
1837 diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
1838 index a2b43a6e7fa7..6eccded3bc33 100644
1839 --- a/drivers/usb/serial/cp210x.c
1840 +++ b/drivers/usb/serial/cp210x.c
1841 @@ -117,6 +117,7 @@ static const struct usb_device_id id_table[] = {
1842 { USB_DEVICE(0x10C4, 0x8411) }, /* Kyocera GPS Module */
1843 { USB_DEVICE(0x10C4, 0x8418) }, /* IRZ Automation Teleport SG-10 GSM/GPRS Modem */
1844 { USB_DEVICE(0x10C4, 0x846E) }, /* BEI USB Sensor Interface (VCP) */
1845 + { USB_DEVICE(0x10C4, 0x8470) }, /* Juniper Networks BX Series System Console */
1846 { USB_DEVICE(0x10C4, 0x8477) }, /* Balluff RFID */
1847 { USB_DEVICE(0x10C4, 0x84B6) }, /* Starizona Hyperion */
1848 { USB_DEVICE(0x10C4, 0x85EA) }, /* AC-Services IBUS-IF */
1849 @@ -784,7 +785,7 @@ static void cp210x_set_termios(struct tty_struct *tty,
1850 } else {
1851 modem_ctl[0] &= ~0x7B;
1852 modem_ctl[0] |= 0x01;
1853 - modem_ctl[1] |= 0x40;
1854 + modem_ctl[1] = 0x40;
1855 dev_dbg(dev, "%s - flow control = NONE\n", __func__);
1856 }
1857
1858 diff --git a/fs/aio.c b/fs/aio.c
1859 index 155f84253f33..fe4f49212b99 100644
1860 --- a/fs/aio.c
1861 +++ b/fs/aio.c
1862 @@ -239,7 +239,12 @@ static struct dentry *aio_mount(struct file_system_type *fs_type,
1863 static const struct dentry_operations ops = {
1864 .d_dname = simple_dname,
1865 };
1866 - return mount_pseudo(fs_type, "aio:", NULL, &ops, AIO_RING_MAGIC);
1867 + struct dentry *root = mount_pseudo(fs_type, "aio:", NULL, &ops,
1868 + AIO_RING_MAGIC);
1869 +
1870 + if (!IS_ERR(root))
1871 + root->d_sb->s_iflags |= SB_I_NOEXEC;
1872 + return root;
1873 }
1874
1875 /* aio_setup
1876 diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
1877 index 498dcfa2dcdb..d98536c8abfc 100644
1878 --- a/fs/ceph/inode.c
1879 +++ b/fs/ceph/inode.c
1880 @@ -1358,15 +1358,20 @@ static int fill_readdir_cache(struct inode *dir, struct dentry *dn,
1881
1882 if (!ctl->page || pgoff != page_index(ctl->page)) {
1883 ceph_readdir_cache_release(ctl);
1884 - ctl->page = grab_cache_page(&dir->i_data, pgoff);
1885 + if (idx == 0)
1886 + ctl->page = grab_cache_page(&dir->i_data, pgoff);
1887 + else
1888 + ctl->page = find_lock_page(&dir->i_data, pgoff);
1889 if (!ctl->page) {
1890 ctl->index = -1;
1891 - return -ENOMEM;
1892 + return idx == 0 ? -ENOMEM : 0;
1893 }
1894 /* reading/filling the cache are serialized by
1895 * i_mutex, no need to use page lock */
1896 unlock_page(ctl->page);
1897 ctl->dentries = kmap(ctl->page);
1898 + if (idx == 0)
1899 + memset(ctl->dentries, 0, PAGE_CACHE_SIZE);
1900 }
1901
1902 if (req->r_dir_release_cnt == atomic64_read(&ci->i_release_count) &&
1903 diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c
1904 index 646cdac73488..e2e857affbf2 100644
1905 --- a/fs/nfs/callback_xdr.c
1906 +++ b/fs/nfs/callback_xdr.c
1907 @@ -912,7 +912,7 @@ static __be32 nfs4_callback_compound(struct svc_rqst *rqstp, void *argp, void *r
1908 if (hdr_arg.minorversion == 0) {
1909 cps.clp = nfs4_find_client_ident(SVC_NET(rqstp), hdr_arg.cb_ident);
1910 if (!cps.clp || !check_gss_callback_principal(cps.clp, rqstp))
1911 - return rpc_drop_reply;
1912 + goto out_invalidcred;
1913 }
1914
1915 cps.minorversion = hdr_arg.minorversion;
1916 @@ -940,6 +940,10 @@ static __be32 nfs4_callback_compound(struct svc_rqst *rqstp, void *argp, void *r
1917 nfs_put_client(cps.clp);
1918 dprintk("%s: done, status = %u\n", __func__, ntohl(status));
1919 return rpc_success;
1920 +
1921 +out_invalidcred:
1922 + pr_warn_ratelimited("NFS: NFSv4 callback contains invalid cred\n");
1923 + return rpc_autherr_badcred;
1924 }
1925
1926 /*
1927 diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c
1928 index 02ec07973bc4..fd8da630fd22 100644
1929 --- a/fs/nfs/filelayout/filelayout.c
1930 +++ b/fs/nfs/filelayout/filelayout.c
1931 @@ -374,8 +374,7 @@ static int filelayout_commit_done_cb(struct rpc_task *task,
1932 return -EAGAIN;
1933 }
1934
1935 - if (data->verf.committed == NFS_UNSTABLE)
1936 - pnfs_set_layoutcommit(data->inode, data->lseg, data->lwb);
1937 + pnfs_set_layoutcommit(data->inode, data->lseg, data->lwb);
1938
1939 return 0;
1940 }
1941 diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c
1942 index 2a2e2d8ddee5..54313322ee5b 100644
1943 --- a/fs/nfs/flexfilelayout/flexfilelayout.c
1944 +++ b/fs/nfs/flexfilelayout/flexfilelayout.c
1945 @@ -1414,8 +1414,7 @@ static int ff_layout_commit_done_cb(struct rpc_task *task,
1946 return -EAGAIN;
1947 }
1948
1949 - if (data->verf.committed == NFS_UNSTABLE
1950 - && ff_layout_need_layoutcommit(data->lseg))
1951 + if (ff_layout_need_layoutcommit(data->lseg))
1952 pnfs_set_layoutcommit(data->inode, data->lseg, data->lwb);
1953
1954 return 0;
1955 diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c
1956 index d8c439d813ce..ac6c78fe19cf 100644
1957 --- a/fs/pstore/inode.c
1958 +++ b/fs/pstore/inode.c
1959 @@ -178,7 +178,6 @@ static loff_t pstore_file_llseek(struct file *file, loff_t off, int whence)
1960 }
1961
1962 static const struct file_operations pstore_file_operations = {
1963 - .owner = THIS_MODULE,
1964 .open = pstore_file_open,
1965 .read = pstore_file_read,
1966 .llseek = pstore_file_llseek,
1967 diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h
1968 index 5261751f6bd4..5f5270941ba0 100644
1969 --- a/include/linux/can/dev.h
1970 +++ b/include/linux/can/dev.h
1971 @@ -32,6 +32,7 @@ enum can_mode {
1972 * CAN common private data
1973 */
1974 struct can_priv {
1975 + struct net_device *dev;
1976 struct can_device_stats can_stats;
1977
1978 struct can_bittiming bittiming, data_bittiming;
1979 @@ -47,7 +48,7 @@ struct can_priv {
1980 u32 ctrlmode_static; /* static enabled options for driver/hardware */
1981
1982 int restart_ms;
1983 - struct timer_list restart_timer;
1984 + struct delayed_work restart_work;
1985
1986 int (*do_set_bittiming)(struct net_device *dev);
1987 int (*do_set_data_bittiming)(struct net_device *dev);
1988 diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h
1989 index 9bb77d3ed6e0..c2256d746543 100644
1990 --- a/include/linux/nvmem-consumer.h
1991 +++ b/include/linux/nvmem-consumer.h
1992 @@ -74,7 +74,7 @@ static inline void nvmem_cell_put(struct nvmem_cell *cell)
1993 {
1994 }
1995
1996 -static inline char *nvmem_cell_read(struct nvmem_cell *cell, size_t *len)
1997 +static inline void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len)
1998 {
1999 return ERR_PTR(-ENOSYS);
2000 }
2001 diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
2002 index fa7bc29925c9..ef17db6caaed 100644
2003 --- a/include/linux/sysctl.h
2004 +++ b/include/linux/sysctl.h
2005 @@ -41,6 +41,8 @@ extern int proc_dostring(struct ctl_table *, int,
2006 void __user *, size_t *, loff_t *);
2007 extern int proc_dointvec(struct ctl_table *, int,
2008 void __user *, size_t *, loff_t *);
2009 +extern int proc_douintvec(struct ctl_table *, int,
2010 + void __user *, size_t *, loff_t *);
2011 extern int proc_dointvec_minmax(struct ctl_table *, int,
2012 void __user *, size_t *, loff_t *);
2013 extern int proc_dointvec_jiffies(struct ctl_table *, int,
2014 diff --git a/kernel/cpuset.c b/kernel/cpuset.c
2015 index b9279a2844d8..b271353d5202 100644
2016 --- a/kernel/cpuset.c
2017 +++ b/kernel/cpuset.c
2018 @@ -324,8 +324,7 @@ static struct file_system_type cpuset_fs_type = {
2019 /*
2020 * Return in pmask the portion of a cpusets's cpus_allowed that
2021 * are online. If none are online, walk up the cpuset hierarchy
2022 - * until we find one that does have some online cpus. The top
2023 - * cpuset always has some cpus online.
2024 + * until we find one that does have some online cpus.
2025 *
2026 * One way or another, we guarantee to return some non-empty subset
2027 * of cpu_online_mask.
2028 @@ -334,8 +333,20 @@ static struct file_system_type cpuset_fs_type = {
2029 */
2030 static void guarantee_online_cpus(struct cpuset *cs, struct cpumask *pmask)
2031 {
2032 - while (!cpumask_intersects(cs->effective_cpus, cpu_online_mask))
2033 + while (!cpumask_intersects(cs->effective_cpus, cpu_online_mask)) {
2034 cs = parent_cs(cs);
2035 + if (unlikely(!cs)) {
2036 + /*
2037 + * The top cpuset doesn't have any online cpu as a
2038 + * consequence of a race between cpuset_hotplug_work
2039 + * and cpu hotplug notifier. But we know the top
2040 + * cpuset's effective_cpus is on its way to to be
2041 + * identical to cpu_online_mask.
2042 + */
2043 + cpumask_copy(pmask, cpu_online_mask);
2044 + return;
2045 + }
2046 + }
2047 cpumask_and(pmask, cs->effective_cpus, cpu_online_mask);
2048 }
2049
2050 diff --git a/kernel/events/core.c b/kernel/events/core.c
2051 index 12ecd4f0329f..bc6371b0e4fb 100644
2052 --- a/kernel/events/core.c
2053 +++ b/kernel/events/core.c
2054 @@ -1539,12 +1539,33 @@ static int __init perf_workqueue_init(void)
2055
2056 core_initcall(perf_workqueue_init);
2057
2058 -static inline int pmu_filter_match(struct perf_event *event)
2059 +static inline int __pmu_filter_match(struct perf_event *event)
2060 {
2061 struct pmu *pmu = event->pmu;
2062 return pmu->filter_match ? pmu->filter_match(event) : 1;
2063 }
2064
2065 +/*
2066 + * Check whether we should attempt to schedule an event group based on
2067 + * PMU-specific filtering. An event group can consist of HW and SW events,
2068 + * potentially with a SW leader, so we must check all the filters, to
2069 + * determine whether a group is schedulable:
2070 + */
2071 +static inline int pmu_filter_match(struct perf_event *event)
2072 +{
2073 + struct perf_event *child;
2074 +
2075 + if (!__pmu_filter_match(event))
2076 + return 0;
2077 +
2078 + list_for_each_entry(child, &event->sibling_list, group_entry) {
2079 + if (!__pmu_filter_match(child))
2080 + return 0;
2081 + }
2082 +
2083 + return 1;
2084 +}
2085 +
2086 static inline int
2087 event_filter_match(struct perf_event *event)
2088 {
2089 diff --git a/kernel/fork.c b/kernel/fork.c
2090 index 8860d1f50d24..7161ebe67cbb 100644
2091 --- a/kernel/fork.c
2092 +++ b/kernel/fork.c
2093 @@ -901,14 +901,12 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm)
2094 deactivate_mm(tsk, mm);
2095
2096 /*
2097 - * If we're exiting normally, clear a user-space tid field if
2098 - * requested. We leave this alone when dying by signal, to leave
2099 - * the value intact in a core dump, and to save the unnecessary
2100 - * trouble, say, a killed vfork parent shouldn't touch this mm.
2101 - * Userland only wants this done for a sys_exit.
2102 + * Signal userspace if we're not exiting with a core dump
2103 + * because we want to leave the value intact for debugging
2104 + * purposes.
2105 */
2106 if (tsk->clear_child_tid) {
2107 - if (!(tsk->flags & PF_SIGNALED) &&
2108 + if (!(tsk->signal->flags & SIGNAL_GROUP_COREDUMP) &&
2109 atomic_read(&mm->mm_users) > 1) {
2110 /*
2111 * We don't check the error code - if userspace has
2112 diff --git a/kernel/printk/braille.c b/kernel/printk/braille.c
2113 index 276762f3a460..d5760c42f042 100644
2114 --- a/kernel/printk/braille.c
2115 +++ b/kernel/printk/braille.c
2116 @@ -9,10 +9,10 @@
2117
2118 char *_braille_console_setup(char **str, char **brl_options)
2119 {
2120 - if (!memcmp(*str, "brl,", 4)) {
2121 + if (!strncmp(*str, "brl,", 4)) {
2122 *brl_options = "";
2123 *str += 4;
2124 - } else if (!memcmp(str, "brl=", 4)) {
2125 + } else if (!strncmp(*str, "brl=", 4)) {
2126 *brl_options = *str + 4;
2127 *str = strchr(*brl_options, ',');
2128 if (!*str)
2129 diff --git a/kernel/sysctl.c b/kernel/sysctl.c
2130 index 2781141a89f9..999e025bf68e 100644
2131 --- a/kernel/sysctl.c
2132 +++ b/kernel/sysctl.c
2133 @@ -2051,6 +2051,21 @@ static int do_proc_dointvec_conv(bool *negp, unsigned long *lvalp,
2134 return 0;
2135 }
2136
2137 +static int do_proc_douintvec_conv(bool *negp, unsigned long *lvalp,
2138 + int *valp,
2139 + int write, void *data)
2140 +{
2141 + if (write) {
2142 + if (*negp)
2143 + return -EINVAL;
2144 + *valp = *lvalp;
2145 + } else {
2146 + unsigned int val = *valp;
2147 + *lvalp = (unsigned long)val;
2148 + }
2149 + return 0;
2150 +}
2151 +
2152 static const char proc_wspace_sep[] = { ' ', '\t', '\n' };
2153
2154 static int __do_proc_dointvec(void *tbl_data, struct ctl_table *table,
2155 @@ -2178,8 +2193,27 @@ static int do_proc_dointvec(struct ctl_table *table, int write,
2156 int proc_dointvec(struct ctl_table *table, int write,
2157 void __user *buffer, size_t *lenp, loff_t *ppos)
2158 {
2159 - return do_proc_dointvec(table,write,buffer,lenp,ppos,
2160 - NULL,NULL);
2161 + return do_proc_dointvec(table, write, buffer, lenp, ppos, NULL, NULL);
2162 +}
2163 +
2164 +/**
2165 + * proc_douintvec - read a vector of unsigned integers
2166 + * @table: the sysctl table
2167 + * @write: %TRUE if this is a write to the sysctl file
2168 + * @buffer: the user buffer
2169 + * @lenp: the size of the user buffer
2170 + * @ppos: file position
2171 + *
2172 + * Reads/writes up to table->maxlen/sizeof(unsigned int) unsigned integer
2173 + * values from/to the user buffer, treated as an ASCII string.
2174 + *
2175 + * Returns 0 on success.
2176 + */
2177 +int proc_douintvec(struct ctl_table *table, int write,
2178 + void __user *buffer, size_t *lenp, loff_t *ppos)
2179 +{
2180 + return do_proc_dointvec(table, write, buffer, lenp, ppos,
2181 + do_proc_douintvec_conv, NULL);
2182 }
2183
2184 /*
2185 @@ -2792,6 +2826,12 @@ int proc_dointvec(struct ctl_table *table, int write,
2186 return -ENOSYS;
2187 }
2188
2189 +int proc_douintvec(struct ctl_table *table, int write,
2190 + void __user *buffer, size_t *lenp, loff_t *ppos)
2191 +{
2192 + return -ENOSYS;
2193 +}
2194 +
2195 int proc_dointvec_minmax(struct ctl_table *table, int write,
2196 void __user *buffer, size_t *lenp, loff_t *ppos)
2197 {
2198 @@ -2837,6 +2877,7 @@ int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write,
2199 * exception granted :-)
2200 */
2201 EXPORT_SYMBOL(proc_dointvec);
2202 +EXPORT_SYMBOL(proc_douintvec);
2203 EXPORT_SYMBOL(proc_dointvec_jiffies);
2204 EXPORT_SYMBOL(proc_dointvec_minmax);
2205 EXPORT_SYMBOL(proc_dointvec_userhz_jiffies);
2206 diff --git a/mm/ksm.c b/mm/ksm.c
2207 index b5cd647daa52..2f028e6d0831 100644
2208 --- a/mm/ksm.c
2209 +++ b/mm/ksm.c
2210 @@ -283,7 +283,8 @@ static inline struct rmap_item *alloc_rmap_item(void)
2211 {
2212 struct rmap_item *rmap_item;
2213
2214 - rmap_item = kmem_cache_zalloc(rmap_item_cache, GFP_KERNEL);
2215 + rmap_item = kmem_cache_zalloc(rmap_item_cache, GFP_KERNEL |
2216 + __GFP_NORETRY | __GFP_NOWARN);
2217 if (rmap_item)
2218 ksm_rmap_items++;
2219 return rmap_item;
2220 diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c
2221 index 17851d3aaf22..6282f021ddfb 100644
2222 --- a/net/batman-adv/originator.c
2223 +++ b/net/batman-adv/originator.c
2224 @@ -197,18 +197,12 @@ static void batadv_neigh_node_release(struct batadv_neigh_node *neigh_node)
2225 {
2226 struct hlist_node *node_tmp;
2227 struct batadv_neigh_ifinfo *neigh_ifinfo;
2228 - struct batadv_algo_ops *bao;
2229 -
2230 - bao = neigh_node->orig_node->bat_priv->bat_algo_ops;
2231
2232 hlist_for_each_entry_safe(neigh_ifinfo, node_tmp,
2233 &neigh_node->ifinfo_list, list) {
2234 batadv_neigh_ifinfo_free_ref(neigh_ifinfo);
2235 }
2236
2237 - if (bao->bat_neigh_free)
2238 - bao->bat_neigh_free(neigh_node);
2239 -
2240 batadv_hardif_free_ref(neigh_node->if_incoming);
2241
2242 kfree_rcu(neigh_node, rcu);
2243 diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h
2244 index d260efd70499..cbd347c2e4a5 100644
2245 --- a/net/batman-adv/types.h
2246 +++ b/net/batman-adv/types.h
2247 @@ -1136,8 +1136,6 @@ struct batadv_forw_packet {
2248 * @bat_neigh_is_equiv_or_better: check if neigh1 is equally good or better
2249 * than neigh2 for their respective outgoing interface from the metric
2250 * prospective
2251 - * @bat_neigh_free: free the resources allocated by the routing algorithm for a
2252 - * neigh_node object
2253 * @bat_orig_print: print the originator table (optional)
2254 * @bat_orig_free: free the resources allocated by the routing algorithm for an
2255 * orig_node object
2256 @@ -1165,7 +1163,6 @@ struct batadv_algo_ops {
2257 struct batadv_hard_iface *if_outgoing1,
2258 struct batadv_neigh_node *neigh2,
2259 struct batadv_hard_iface *if_outgoing2);
2260 - void (*bat_neigh_free)(struct batadv_neigh_node *neigh);
2261 /* orig_node handling API */
2262 void (*bat_orig_print)(struct batadv_priv *priv, struct seq_file *seq,
2263 struct batadv_hard_iface *hard_iface);
2264 diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c
2265 index 803001a45aa1..1b07578bedf3 100644
2266 --- a/net/netfilter/ipvs/ip_vs_sync.c
2267 +++ b/net/netfilter/ipvs/ip_vs_sync.c
2268 @@ -1545,7 +1545,8 @@ error:
2269 /*
2270 * Set up receiving multicast socket over UDP
2271 */
2272 -static struct socket *make_receive_sock(struct netns_ipvs *ipvs, int id)
2273 +static struct socket *make_receive_sock(struct netns_ipvs *ipvs, int id,
2274 + int ifindex)
2275 {
2276 /* multicast addr */
2277 union ipvs_sockaddr mcast_addr;
2278 @@ -1566,6 +1567,7 @@ static struct socket *make_receive_sock(struct netns_ipvs *ipvs, int id)
2279 set_sock_size(sock->sk, 0, result);
2280
2281 get_mcast_sockaddr(&mcast_addr, &salen, &ipvs->bcfg, id);
2282 + sock->sk->sk_bound_dev_if = ifindex;
2283 result = sock->ops->bind(sock, (struct sockaddr *)&mcast_addr, salen);
2284 if (result < 0) {
2285 pr_err("Error binding to the multicast addr\n");
2286 @@ -1868,7 +1870,7 @@ int start_sync_thread(struct netns_ipvs *ipvs, struct ipvs_sync_daemon_cfg *c,
2287 if (state == IP_VS_STATE_MASTER)
2288 sock = make_send_sock(ipvs, id);
2289 else
2290 - sock = make_receive_sock(ipvs, id);
2291 + sock = make_receive_sock(ipvs, id, dev->ifindex);
2292 if (IS_ERR(sock)) {
2293 result = PTR_ERR(sock);
2294 goto outtinfo;
2295 diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
2296 index cc9852897395..c5b0cb4f4056 100644
2297 --- a/net/sunrpc/svc.c
2298 +++ b/net/sunrpc/svc.c
2299 @@ -1188,11 +1188,17 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)
2300 *statp = procp->pc_func(rqstp, rqstp->rq_argp, rqstp->rq_resp);
2301
2302 /* Encode reply */
2303 - if (test_bit(RQ_DROPME, &rqstp->rq_flags)) {
2304 + if (*statp == rpc_drop_reply ||
2305 + test_bit(RQ_DROPME, &rqstp->rq_flags)) {
2306 if (procp->pc_release)
2307 procp->pc_release(rqstp, NULL, rqstp->rq_resp);
2308 goto dropit;
2309 }
2310 + if (*statp == rpc_autherr_badcred) {
2311 + if (procp->pc_release)
2312 + procp->pc_release(rqstp, NULL, rqstp->rq_resp);
2313 + goto err_bad_auth;
2314 + }
2315 if (*statp == rpc_success &&
2316 (xdr = procp->pc_encode) &&
2317 !xdr(rqstp, resv->iov_base+resv->iov_len, rqstp->rq_resp)) {
2318 diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
2319 index 600af5878e75..36cd715986bc 100644
2320 --- a/sound/pci/hda/patch_conexant.c
2321 +++ b/sound/pci/hda/patch_conexant.c
2322 @@ -261,6 +261,7 @@ enum {
2323 CXT_FIXUP_HP_530,
2324 CXT_FIXUP_CAP_MIX_AMP_5047,
2325 CXT_FIXUP_MUTE_LED_EAPD,
2326 + CXT_FIXUP_HP_SPECTRE,
2327 };
2328
2329 /* for hda_fixup_thinkpad_acpi() */
2330 @@ -765,6 +766,14 @@ static const struct hda_fixup cxt_fixups[] = {
2331 .type = HDA_FIXUP_FUNC,
2332 .v.func = cxt_fixup_mute_led_eapd,
2333 },
2334 + [CXT_FIXUP_HP_SPECTRE] = {
2335 + .type = HDA_FIXUP_PINS,
2336 + .v.pins = (const struct hda_pintbl[]) {
2337 + /* enable NID 0x1d for the speaker on top */
2338 + { 0x1d, 0x91170111 },
2339 + { }
2340 + }
2341 + },
2342 };
2343
2344 static const struct snd_pci_quirk cxt5045_fixups[] = {
2345 @@ -814,6 +823,7 @@ static const struct snd_pci_quirk cxt5066_fixups[] = {
2346 SND_PCI_QUIRK(0x1025, 0x0543, "Acer Aspire One 522", CXT_FIXUP_STEREO_DMIC),
2347 SND_PCI_QUIRK(0x1025, 0x054c, "Acer Aspire 3830TG", CXT_FIXUP_ASPIRE_DMIC),
2348 SND_PCI_QUIRK(0x1025, 0x054f, "Acer Aspire 4830T", CXT_FIXUP_ASPIRE_DMIC),
2349 + SND_PCI_QUIRK(0x103c, 0x8174, "HP Spectre x360", CXT_FIXUP_HP_SPECTRE),
2350 SND_PCI_QUIRK(0x1043, 0x138d, "Asus", CXT_FIXUP_HEADPHONE_MIC_PIN),
2351 SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT_FIXUP_OLPC_XO),
2352 SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410),
2353 diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
2354 index eaee626ab185..b1fa50aed888 100644
2355 --- a/sound/pci/hda/patch_realtek.c
2356 +++ b/sound/pci/hda/patch_realtek.c
2357 @@ -5790,6 +5790,13 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
2358 {0x14, 0x90170110}, \
2359 {0x15, 0x0221401f}
2360
2361 +#define ALC295_STANDARD_PINS \
2362 + {0x12, 0xb7a60130}, \
2363 + {0x14, 0x90170110}, \
2364 + {0x17, 0x21014020}, \
2365 + {0x18, 0x21a19030}, \
2366 + {0x21, 0x04211020}
2367 +
2368 #define ALC298_STANDARD_PINS \
2369 {0x12, 0x90a60130}, \
2370 {0x21, 0x03211020}
2371 @@ -5830,6 +5837,10 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
2372 {0x14, 0x90170120},
2373 {0x21, 0x02211030}),
2374 SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
2375 + {0x14, 0x90170110},
2376 + {0x1b, 0x02011020},
2377 + {0x21, 0x0221101f}),
2378 + SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
2379 {0x14, 0x90170130},
2380 {0x1b, 0x01014020},
2381 {0x21, 0x0221103f}),
2382 @@ -5895,6 +5906,10 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
2383 {0x14, 0x90170120},
2384 {0x21, 0x02211030}),
2385 SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
2386 + {0x12, 0xb7a60130},
2387 + {0x14, 0x90170110},
2388 + {0x21, 0x02211020}),
2389 + SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
2390 ALC256_STANDARD_PINS),
2391 SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4,
2392 {0x12, 0x90a60130},
2393 @@ -6005,6 +6020,8 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
2394 SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE,
2395 ALC292_STANDARD_PINS,
2396 {0x13, 0x90a60140}),
2397 + SND_HDA_PIN_QUIRK(0x10ec0295, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
2398 + ALC295_STANDARD_PINS),
2399 SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE,
2400 ALC298_STANDARD_PINS,
2401 {0x17, 0x90170110}),
2402 diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c
2403 index caa69c4598a6..b4844f78266f 100644
2404 --- a/sound/soc/intel/skylake/skl.c
2405 +++ b/sound/soc/intel/skylake/skl.c
2406 @@ -464,8 +464,10 @@ static int skl_probe(struct pci_dev *pci,
2407
2408 skl->nhlt = skl_nhlt_init(bus->dev);
2409
2410 - if (skl->nhlt == NULL)
2411 + if (skl->nhlt == NULL) {
2412 + err = -ENODEV;
2413 goto out_free;
2414 + }
2415
2416 pci_set_drvdata(skl->pci, ebus);
2417
2418 diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c
2419 index b837265ac3e9..8d0d45d330e7 100644
2420 --- a/sound/soc/omap/omap-mcpdm.c
2421 +++ b/sound/soc/omap/omap-mcpdm.c
2422 @@ -390,8 +390,8 @@ static int omap_mcpdm_probe(struct snd_soc_dai *dai)
2423 pm_runtime_get_sync(mcpdm->dev);
2424 omap_mcpdm_write(mcpdm, MCPDM_REG_CTRL, 0x00);
2425
2426 - ret = devm_request_irq(mcpdm->dev, mcpdm->irq, omap_mcpdm_irq_handler,
2427 - 0, "McPDM", (void *)mcpdm);
2428 + ret = request_irq(mcpdm->irq, omap_mcpdm_irq_handler, 0, "McPDM",
2429 + (void *)mcpdm);
2430
2431 pm_runtime_put_sync(mcpdm->dev);
2432
2433 @@ -416,6 +416,7 @@ static int omap_mcpdm_remove(struct snd_soc_dai *dai)
2434 {
2435 struct omap_mcpdm *mcpdm = snd_soc_dai_get_drvdata(dai);
2436
2437 + free_irq(mcpdm->irq, (void *)mcpdm);
2438 pm_runtime_disable(mcpdm->dev);
2439
2440 return 0;
2441 diff --git a/tools/vm/slabinfo.c b/tools/vm/slabinfo.c
2442 index 86e698d07e20..499b8819d4c6 100644
2443 --- a/tools/vm/slabinfo.c
2444 +++ b/tools/vm/slabinfo.c
2445 @@ -510,10 +510,11 @@ static void slab_stats(struct slabinfo *s)
2446 s->alloc_node_mismatch, (s->alloc_node_mismatch * 100) / total);
2447 }
2448
2449 - if (s->cmpxchg_double_fail || s->cmpxchg_double_cpu_fail)
2450 + if (s->cmpxchg_double_fail || s->cmpxchg_double_cpu_fail) {
2451 printf("\nCmpxchg_double Looping\n------------------------\n");
2452 printf("Locked Cmpxchg Double redos %lu\nUnlocked Cmpxchg Double redos %lu\n",
2453 s->cmpxchg_double_fail, s->cmpxchg_double_cpu_fail);
2454 + }
2455 }
2456
2457 static void report(struct slabinfo *s)