diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-03 12:35:27 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-03 12:35:27 -0500 |
commit | 9099ff769faf879b5cb6e24e04c7904a8352aef0 (patch) | |
tree | bbda760074f0a5906f86a3e5c2486c6fee401179 | |
parent | 2595646791c319cadfdbf271563aac97d0843dc7 (diff) | |
parent | dac097c4546e4c5b16dd303a1e97c1d319c8ab3e (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Pull sparc fixes from David Miller:
1) Some implicit switch fallthrough fixes from Stephen Rothwell.
2) Missing of_node_put() in various sparc drivers from Yangtao Li.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
drivers/tty: add missing of_node_put()
drivers/sbus/char: add of_node_put()
sbus: char: add of_node_put()
sparc32: supress another implicit-fallthrough warning
sparc32: suppress an implicit-fallthrough warning
sparc: suppress the implicit-fallthrough warning
arch/sparc: Use kzalloc_node
-rw-r--r-- | arch/sparc/kernel/iommu.c | 3 | ||||
-rw-r--r-- | arch/sparc/kernel/signal32.c | 1 | ||||
-rw-r--r-- | arch/sparc/kernel/signal_32.c | 1 | ||||
-rw-r--r-- | arch/sparc/kernel/signal_64.c | 1 | ||||
-rw-r--r-- | drivers/sbus/char/display7seg.c | 1 | ||||
-rw-r--r-- | drivers/sbus/char/envctrl.c | 2 | ||||
-rw-r--r-- | drivers/tty/serial/suncore.c | 1 |
7 files changed, 8 insertions, 2 deletions
diff --git a/arch/sparc/kernel/iommu.c b/arch/sparc/kernel/iommu.c index 40d008b0bd3e..05eb016fc41b 100644 --- a/arch/sparc/kernel/iommu.c +++ b/arch/sparc/kernel/iommu.c | |||
@@ -108,10 +108,9 @@ int iommu_table_init(struct iommu *iommu, int tsbsize, | |||
108 | /* Allocate and initialize the free area map. */ | 108 | /* Allocate and initialize the free area map. */ |
109 | sz = num_tsb_entries / 8; | 109 | sz = num_tsb_entries / 8; |
110 | sz = (sz + 7UL) & ~7UL; | 110 | sz = (sz + 7UL) & ~7UL; |
111 | iommu->tbl.map = kmalloc_node(sz, GFP_KERNEL, numa_node); | 111 | iommu->tbl.map = kzalloc_node(sz, GFP_KERNEL, numa_node); |
112 | if (!iommu->tbl.map) | 112 | if (!iommu->tbl.map) |
113 | return -ENOMEM; | 113 | return -ENOMEM; |
114 | memset(iommu->tbl.map, 0, sz); | ||
115 | 114 | ||
116 | iommu_tbl_pool_init(&iommu->tbl, num_tsb_entries, IO_PAGE_SHIFT, | 115 | iommu_tbl_pool_init(&iommu->tbl, num_tsb_entries, IO_PAGE_SHIFT, |
117 | (tlb_type != hypervisor ? iommu_flushall : NULL), | 116 | (tlb_type != hypervisor ? iommu_flushall : NULL), |
diff --git a/arch/sparc/kernel/signal32.c b/arch/sparc/kernel/signal32.c index 4c5b3fcbed94..e800ce13cc6e 100644 --- a/arch/sparc/kernel/signal32.c +++ b/arch/sparc/kernel/signal32.c | |||
@@ -683,6 +683,7 @@ void do_signal32(struct pt_regs * regs) | |||
683 | regs->tpc -= 4; | 683 | regs->tpc -= 4; |
684 | regs->tnpc -= 4; | 684 | regs->tnpc -= 4; |
685 | pt_regs_clear_syscall(regs); | 685 | pt_regs_clear_syscall(regs); |
686 | /* fall through */ | ||
686 | case ERESTART_RESTARTBLOCK: | 687 | case ERESTART_RESTARTBLOCK: |
687 | regs->u_regs[UREG_G1] = __NR_restart_syscall; | 688 | regs->u_regs[UREG_G1] = __NR_restart_syscall; |
688 | regs->tpc -= 4; | 689 | regs->tpc -= 4; |
diff --git a/arch/sparc/kernel/signal_32.c b/arch/sparc/kernel/signal_32.c index 5665261cee37..83953780ca01 100644 --- a/arch/sparc/kernel/signal_32.c +++ b/arch/sparc/kernel/signal_32.c | |||
@@ -508,6 +508,7 @@ static void do_signal(struct pt_regs *regs, unsigned long orig_i0) | |||
508 | regs->pc -= 4; | 508 | regs->pc -= 4; |
509 | regs->npc -= 4; | 509 | regs->npc -= 4; |
510 | pt_regs_clear_syscall(regs); | 510 | pt_regs_clear_syscall(regs); |
511 | /* fall through */ | ||
511 | case ERESTART_RESTARTBLOCK: | 512 | case ERESTART_RESTARTBLOCK: |
512 | regs->u_regs[UREG_G1] = __NR_restart_syscall; | 513 | regs->u_regs[UREG_G1] = __NR_restart_syscall; |
513 | regs->pc -= 4; | 514 | regs->pc -= 4; |
diff --git a/arch/sparc/kernel/signal_64.c b/arch/sparc/kernel/signal_64.c index e9de1803a22e..ca70787efd8e 100644 --- a/arch/sparc/kernel/signal_64.c +++ b/arch/sparc/kernel/signal_64.c | |||
@@ -533,6 +533,7 @@ static void do_signal(struct pt_regs *regs, unsigned long orig_i0) | |||
533 | regs->tpc -= 4; | 533 | regs->tpc -= 4; |
534 | regs->tnpc -= 4; | 534 | regs->tnpc -= 4; |
535 | pt_regs_clear_syscall(regs); | 535 | pt_regs_clear_syscall(regs); |
536 | /* fall through */ | ||
536 | case ERESTART_RESTARTBLOCK: | 537 | case ERESTART_RESTARTBLOCK: |
537 | regs->u_regs[UREG_G1] = __NR_restart_syscall; | 538 | regs->u_regs[UREG_G1] = __NR_restart_syscall; |
538 | regs->tpc -= 4; | 539 | regs->tpc -= 4; |
diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c index 5c8ed7350a04..a36e4cf1841d 100644 --- a/drivers/sbus/char/display7seg.c +++ b/drivers/sbus/char/display7seg.c | |||
@@ -220,6 +220,7 @@ static int d7s_probe(struct platform_device *op) | |||
220 | dev_set_drvdata(&op->dev, p); | 220 | dev_set_drvdata(&op->dev, p); |
221 | d7s_device = p; | 221 | d7s_device = p; |
222 | err = 0; | 222 | err = 0; |
223 | of_node_put(opts); | ||
223 | 224 | ||
224 | out: | 225 | out: |
225 | return err; | 226 | return err; |
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c index 56e962a01493..b8481927bfe4 100644 --- a/drivers/sbus/char/envctrl.c +++ b/drivers/sbus/char/envctrl.c | |||
@@ -910,8 +910,10 @@ static void envctrl_init_i2c_child(struct device_node *dp, | |||
910 | for (len = 0; len < PCF8584_MAX_CHANNELS; ++len) { | 910 | for (len = 0; len < PCF8584_MAX_CHANNELS; ++len) { |
911 | pchild->mon_type[len] = ENVCTRL_NOMON; | 911 | pchild->mon_type[len] = ENVCTRL_NOMON; |
912 | } | 912 | } |
913 | of_node_put(root_node); | ||
913 | return; | 914 | return; |
914 | } | 915 | } |
916 | of_node_put(root_node); | ||
915 | } | 917 | } |
916 | 918 | ||
917 | /* Get the monitor channels. */ | 919 | /* Get the monitor channels. */ |
diff --git a/drivers/tty/serial/suncore.c b/drivers/tty/serial/suncore.c index 70a4ea4eaa6e..990376576970 100644 --- a/drivers/tty/serial/suncore.c +++ b/drivers/tty/serial/suncore.c | |||
@@ -112,6 +112,7 @@ void sunserial_console_termios(struct console *con, struct device_node *uart_dp) | |||
112 | mode = of_get_property(dp, mode_prop, NULL); | 112 | mode = of_get_property(dp, mode_prop, NULL); |
113 | if (!mode) | 113 | if (!mode) |
114 | mode = "9600,8,n,1,-"; | 114 | mode = "9600,8,n,1,-"; |
115 | of_node_put(dp); | ||
115 | } | 116 | } |
116 | 117 | ||
117 | cflag = CREAD | HUPCL | CLOCAL; | 118 | cflag = CREAD | HUPCL | CLOCAL; |