Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 2313022

Browse files
committed
Merge tag 'uml-for-linus-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux
Pull UML updates from Richard Weinberger: - Fixes for -Wmissing-prototypes warnings and further cleanup - Remove callback returning void from rtc and virtio drivers - Fix bash location * tag 'uml-for-linus-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux: (26 commits) um: virtio_uml: Convert to platform remove callback returning void um: rtc: Convert to platform remove callback returning void um: Remove unused do_get_thread_area function um: Fix -Wmissing-prototypes warnings for __vdso_* um: Add an internal header shared among the user code um: Fix the declaration of kasan_map_memory um: Fix the -Wmissing-prototypes warning for get_thread_reg um: Fix the -Wmissing-prototypes warning for __switch_mm um: Fix -Wmissing-prototypes warnings for (rt_)sigreturn um: Stop tracking host PID in cpu_tasks um: process: remove unused 'n' variable um: vector: remove unused len variable/calculation um: vector: fix bpfflash parameter evaluation um: slirp: remove set but unused variable 'pid' um: signal: move pid variable where needed um: Makefile: use bash from the environment um: Add winch to winch_handlers before registering winch IRQ um: Fix -Wmissing-prototypes warnings for __warp_* and foo um: Fix -Wmissing-prototypes warnings for text_poke* um: Move declarations to proper headers ...
2 parents 56fb6f9 + 919e3ec commit 2313022

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+136
-129
lines changed

arch/um/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ endif
2020
ARCH_DIR := arch/um
2121
# We require bash because the vmlinux link and loader script cpp use bash
2222
# features.
23-
SHELL := /bin/bash
23+
SHELL := bash
2424

2525
MODE_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include/shared/skas
2626

arch/um/drivers/line.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -676,24 +676,26 @@ void register_winch_irq(int fd, int tty_fd, int pid, struct tty_port *port,
676676
goto cleanup;
677677
}
678678

679-
*winch = ((struct winch) { .list = LIST_HEAD_INIT(winch->list),
680-
.fd = fd,
679+
*winch = ((struct winch) { .fd = fd,
681680
.tty_fd = tty_fd,
682681
.pid = pid,
683682
.port = port,
684683
.stack = stack });
685684

685+
spin_lock(&winch_handler_lock);
686+
list_add(&winch->list, &winch_handlers);
687+
spin_unlock(&winch_handler_lock);
688+
686689
if (um_request_irq(WINCH_IRQ, fd, IRQ_READ, winch_interrupt,
687690
IRQF_SHARED, "winch", winch) < 0) {
688691
printk(KERN_ERR "register_winch_irq - failed to register "
689692
"IRQ\n");
693+
spin_lock(&winch_handler_lock);
694+
list_del(&winch->list);
695+
spin_unlock(&winch_handler_lock);
690696
goto out_free;
691697
}
692698

693-
spin_lock(&winch_handler_lock);
694-
list_add(&winch->list, &winch_handlers);
695-
spin_unlock(&winch_handler_lock);
696-
697699
return;
698700

699701
out_free:

arch/um/drivers/pcap_kern.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ struct pcap_init {
1515
char *filter;
1616
};
1717

18-
void pcap_init_kern(struct net_device *dev, void *data)
18+
static void pcap_init_kern(struct net_device *dev, void *data)
1919
{
2020
struct uml_net_private *pri;
2121
struct pcap_data *ppri;
@@ -50,7 +50,7 @@ static const struct net_kern_info pcap_kern_info = {
5050
.write = pcap_write,
5151
};
5252

53-
int pcap_setup(char *str, char **mac_out, void *data)
53+
static int pcap_setup(char *str, char **mac_out, void *data)
5454
{
5555
struct pcap_init *init = data;
5656
char *remain, *host_if = NULL, *options[2] = { NULL, NULL };

arch/um/drivers/rtc_kern.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,16 +168,15 @@ static int uml_rtc_probe(struct platform_device *pdev)
168168
return err;
169169
}
170170

171-
static int uml_rtc_remove(struct platform_device *pdev)
171+
static void uml_rtc_remove(struct platform_device *pdev)
172172
{
173173
device_init_wakeup(&pdev->dev, 0);
174174
uml_rtc_cleanup();
175-
return 0;
176175
}
177176

178177
static struct platform_driver uml_rtc_driver = {
179178
.probe = uml_rtc_probe,
180-
.remove = uml_rtc_remove,
179+
.remove_new = uml_rtc_remove,
181180
.driver = {
182181
.name = "uml-rtc",
183182
},

arch/um/drivers/slirp_user.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ static int slirp_tramp(char **argv, int fd)
4949
static int slirp_open(void *data)
5050
{
5151
struct slirp_data *pri = data;
52-
int fds[2], pid, err;
52+
int fds[2], err;
5353

5454
err = os_pipe(fds, 1, 1);
5555
if (err)
@@ -60,7 +60,6 @@ static int slirp_open(void *data)
6060
printk(UM_KERN_ERR "slirp_tramp failed - errno = %d\n", -err);
6161
goto out;
6262
}
63-
pid = err;
6463

6564
pri->slave = fds[1];
6665
pri->slip.pos = 0;

arch/um/drivers/ubd_kern.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,7 +1092,7 @@ static int __init ubd_init(void)
10921092

10931093
if (irq_req_buffer == NULL) {
10941094
printk(KERN_ERR "Failed to initialize ubd buffering\n");
1095-
return -1;
1095+
return -ENOMEM;
10961096
}
10971097
io_req_buffer = kmalloc_array(UBD_REQ_BUFFER_SIZE,
10981098
sizeof(struct io_thread_req *),
@@ -1103,7 +1103,7 @@ static int __init ubd_init(void)
11031103

11041104
if (io_req_buffer == NULL) {
11051105
printk(KERN_ERR "Failed to initialize ubd buffering\n");
1106-
return -1;
1106+
return -ENOMEM;
11071107
}
11081108
platform_driver_register(&ubd_driver);
11091109
mutex_lock(&ubd_lock);

arch/um/drivers/ubd_user.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include <os.h>
2424
#include <poll.h>
2525

26-
struct pollfd kernel_pollfd;
26+
static struct pollfd kernel_pollfd;
2727

2828
int start_io_thread(unsigned long sp, int *fd_out)
2929
{

arch/um/drivers/vector_kern.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ static bool get_bpf_flash(struct arglist *def)
141141

142142
if (allow != NULL) {
143143
if (kstrtoul(allow, 10, &result) == 0)
144-
return (allow > 0);
144+
return result > 0;
145145
}
146146
return false;
147147
}
@@ -712,11 +712,9 @@ static struct vector_device *find_device(int n)
712712
static int vector_parse(char *str, int *index_out, char **str_out,
713713
char **error_out)
714714
{
715-
int n, len, err;
715+
int n, err;
716716
char *start = str;
717717

718-
len = strlen(str);
719-
720718
while ((*str != ':') && (strlen(str) > 1))
721719
str++;
722720
if (*str != ':') {

arch/um/drivers/virtio_uml.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,12 +1241,11 @@ static int virtio_uml_probe(struct platform_device *pdev)
12411241
return rc;
12421242
}
12431243

1244-
static int virtio_uml_remove(struct platform_device *pdev)
1244+
static void virtio_uml_remove(struct platform_device *pdev)
12451245
{
12461246
struct virtio_uml_device *vu_dev = platform_get_drvdata(pdev);
12471247

12481248
unregister_virtio_device(&vu_dev->vdev);
1249-
return 0;
12501249
}
12511250

12521251
/* Command line device list */
@@ -1445,7 +1444,7 @@ static int virtio_uml_resume(struct platform_device *pdev)
14451444

14461445
static struct platform_driver virtio_uml_driver = {
14471446
.probe = virtio_uml_probe,
1448-
.remove = virtio_uml_remove,
1447+
.remove_new = virtio_uml_remove,
14491448
.driver = {
14501449
.name = "virtio-uml",
14511450
.of_match_table = virtio_uml_match,

arch/um/include/asm/kasan.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
#ifdef CONFIG_KASAN
2626
void kasan_init(void);
27-
void kasan_map_memory(void *start, unsigned long len);
2827
extern int kasan_um_is_ready;
2928

3029
#ifdef CONFIG_STATIC_LINK

0 commit comments

Comments
 (0)