From patchwork Tue Jan 23 11:03:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tiwei Bie X-Patchwork-Id: 190858 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp257932dyi; Tue, 23 Jan 2024 03:11:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IFpTli0hnPpCSyWwRwETtKOS5kNuPXuk6S/oHxD8MlXYL+o2eTEJQRkydIkdJAtFP8Srn4M X-Received: by 2002:ac8:5a91:0:b0:42a:4918:5479 with SMTP id c17-20020ac85a91000000b0042a49185479mr783823qtc.129.1706008262186; Tue, 23 Jan 2024 03:11:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706008262; cv=pass; d=google.com; s=arc-20160816; b=qUWsl05MojwfiP0UDOYMruL+FeHv4nSuRV7w33USA8E25d+nCkYuqUtIY6fg1PDQ82 Alkmz+KZYsbVO+WB8rv93HXAgbrXFAROHwWpaZteE91mcHyKsPNal0P2u/i8qmLPA5mj QF+R+Dyp/YN8v15v4eFViu8HjdE11LR36xZ8pf6U2Q4DNz7Iyx+QJK73uJjpDu6+4X1G QknBG/qD+eYCmYxUMolUN5if8m3zhG14itrGoIl+OZRJhjGKKxnmh4t8HDTRQzP4L284 DJRb+19vgNwm/WrqVDA0p9a17oUszhhAA/7csA5B9jNUAbsMENHLlC/1uT435QKmT6Ay P5LA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=thGngCGzJUMo1GZHVFzXxkSEN7RL4c5M22VIb9paXp4=; fh=2OUCyawv763RJuh0tp1OY7aBUf41Q8m3nxrITJmYLpc=; b=If9N1oqLaYv5SLHOpXoH03zfAOYBj7TqIZxcrn29QiGEfCuqsPFts3xJfAMHubPPUR q+4Szger73UNp+0ZbGr9Ima5k8a5zHHNsN/7niJSUjDUUTAYoFcOJUER9qmncAQvO5Fw yQpN3c2pMrELUXnOq6uhWvc8IFzKO5NExdZWwU285rZuP6KlaWjr4510M7+Qlv2aXCW/ P9J0/JiJiSW724VcvCt0NNmGAYcPOEyhm+acukZdmNnl52Q0uFfI2TxgD44rOe+OM627 7eiJaFMFVDIVzAqmF/1LBbod9eDhSNpdnnIVNyEspft3OnF01kXeOpNelbNRwbTwGcUJ ITJQ== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=antgroup.com dmarc=pass fromdomain=antgroup.com); spf=pass (google.com: domain of linux-kernel+bounces-35167-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35167-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f20-20020ac87f14000000b0042a2b19539csi7629993qtk.214.2024.01.23.03.11.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 03:11:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35167-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=antgroup.com dmarc=pass fromdomain=antgroup.com); spf=pass (google.com: domain of linux-kernel+bounces-35167-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35167-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E6E791C2210E for ; Tue, 23 Jan 2024 11:11:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0EA665DF28; Tue, 23 Jan 2024 11:09:21 +0000 (UTC) Received: from out0-205.mail.aliyun.com (out0-205.mail.aliyun.com [140.205.0.205]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F2595D725 for ; Tue, 23 Jan 2024 11:09:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.205.0.205 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706008159; cv=none; b=LueeFDrAAov4xv1HKCjFbXZLnNK+wi0ozlBtXuMPJsKaThQwjpZ1jE8on1bIwony2dLDyTGL9Zw17g1/B0g8OD34pcMWhdxFHBiN6qHKoQJmHC6yLj3a9jBWZoJsWweUuVWpJBm2yzon02kkThkNu8CPd1zT0s369uOpxsp51Bw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706008159; c=relaxed/simple; bh=1sr2sdDMijyrY3fpb7f0Qr+PhaKz1rnNX0kYmghypxM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=ZErlpClVIFZoJwrSzZGtynpVcd3A3rgK7nQcl0M553K5Q16OmurFGCh5hhOo3yV4NydalPQgm6vK6LxCLl48Sm1teODBg67IVtWUSL/wj4OFYGfx6iCBEoFiTiAiAKbKBVgrxrA4kYbMDrBr8emkpbSAB/shycq5cU0orPoA7BM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com; spf=pass smtp.mailfrom=antgroup.com; arc=none smtp.client-ip=140.205.0.205 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=antgroup.com X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047211;MF=tiwei.btw@antgroup.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---.WDCKTjh_1706007835; Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.WDCKTjh_1706007835) by smtp.aliyun-inc.com; Tue, 23 Jan 2024 19:03:55 +0800 From: "Tiwei Bie" To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net Cc: , , "Tiwei Bie" Subject: [PATCH 1/5] um: Make local functions and variables static Date: Tue, 23 Jan 2024 19:03:43 +0800 Message-Id: <20240123110347.1274217-2-tiwei.btw@antgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240123110347.1274217-1-tiwei.btw@antgroup.com> References: <20240123110347.1274217-1-tiwei.btw@antgroup.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788879319625942580 X-GMAIL-MSGID: 1788879319625942580 This will also fix the warnings like: warning: no previous prototype for ‘fork_handler’ [-Wmissing-prototypes] 140 | void fork_handler(void) | ^~~~~~~~~~~~ Signed-off-by: Tiwei Bie --- arch/um/drivers/pcap_kern.c | 4 ++-- arch/um/drivers/ubd_user.c | 2 +- arch/um/kernel/kmsg_dump.c | 2 +- arch/um/kernel/process.c | 8 ++++---- arch/um/kernel/time.c | 6 +++--- arch/um/os-Linux/drivers/ethertap_kern.c | 2 +- arch/um/os-Linux/drivers/tuntap_kern.c | 2 +- arch/um/os-Linux/signal.c | 4 ++-- arch/x86/um/os-Linux/registers.c | 2 +- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/arch/um/drivers/pcap_kern.c b/arch/um/drivers/pcap_kern.c index 25ee2c97ca21..d9bf95d7867b 100644 --- a/arch/um/drivers/pcap_kern.c +++ b/arch/um/drivers/pcap_kern.c @@ -15,7 +15,7 @@ struct pcap_init { char *filter; }; -void pcap_init_kern(struct net_device *dev, void *data) +static void pcap_init_kern(struct net_device *dev, void *data) { struct uml_net_private *pri; struct pcap_data *ppri; @@ -50,7 +50,7 @@ static const struct net_kern_info pcap_kern_info = { .write = pcap_write, }; -int pcap_setup(char *str, char **mac_out, void *data) +static int pcap_setup(char *str, char **mac_out, void *data) { struct pcap_init *init = data; char *remain, *host_if = NULL, *options[2] = { NULL, NULL }; diff --git a/arch/um/drivers/ubd_user.c b/arch/um/drivers/ubd_user.c index a1afe414ce48..b4f8b8e60564 100644 --- a/arch/um/drivers/ubd_user.c +++ b/arch/um/drivers/ubd_user.c @@ -23,7 +23,7 @@ #include #include -struct pollfd kernel_pollfd; +static struct pollfd kernel_pollfd; int start_io_thread(unsigned long sp, int *fd_out) { diff --git a/arch/um/kernel/kmsg_dump.c b/arch/um/kernel/kmsg_dump.c index 427dd5a61a38..4382cf02a6d1 100644 --- a/arch/um/kernel/kmsg_dump.c +++ b/arch/um/kernel/kmsg_dump.c @@ -57,7 +57,7 @@ static struct kmsg_dumper kmsg_dumper = { .dump = kmsg_dumper_stdout }; -int __init kmsg_dumper_stdout_init(void) +static int __init kmsg_dumper_stdout_init(void) { return kmsg_dump_register(&kmsg_dumper); } diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index ab95648e93e1..20f3813143d8 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c @@ -137,7 +137,7 @@ void new_thread_handler(void) } /* Called magically, see new_thread_handler above */ -void fork_handler(void) +static void fork_handler(void) { force_flush_all(); @@ -268,14 +268,14 @@ int clear_user_proc(void __user *buf, int size) static atomic_t using_sysemu = ATOMIC_INIT(0); int sysemu_supported; -void set_using_sysemu(int value) +static void set_using_sysemu(int value) { if (value > sysemu_supported) return; atomic_set(&using_sysemu, value); } -int get_using_sysemu(void) +static int get_using_sysemu(void) { return atomic_read(&using_sysemu); } @@ -313,7 +313,7 @@ static const struct proc_ops sysemu_proc_ops = { .proc_write = sysemu_proc_write, }; -int __init make_proc_sysemu(void) +static int __init make_proc_sysemu(void) { struct proc_dir_entry *ent; if (!sysemu_supported) diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c index 3e270da6b6f6..efa5b9c97992 100644 --- a/arch/um/kernel/time.c +++ b/arch/um/kernel/time.c @@ -319,7 +319,7 @@ void time_travel_add_event_rel(struct time_travel_event *e, time_travel_add_event(e, time_travel_time + delay_ns); } -void time_travel_periodic_timer(struct time_travel_event *e) +static void time_travel_periodic_timer(struct time_travel_event *e) { time_travel_add_event(&time_travel_timer_event, time_travel_time + time_travel_timer_interval); @@ -812,7 +812,7 @@ unsigned long calibrate_delay_is_known(void) return 0; } -int setup_time_travel(char *str) +static int setup_time_travel(char *str) { if (strcmp(str, "=inf-cpu") == 0) { time_travel_mode = TT_MODE_INFCPU; @@ -862,7 +862,7 @@ __uml_help(setup_time_travel, "devices using it, assuming the device has the right capabilities.\n" "The optional ID is a 64-bit integer that's sent to the central scheduler.\n"); -int setup_time_travel_start(char *str) +static int setup_time_travel_start(char *str) { int err; diff --git a/arch/um/os-Linux/drivers/ethertap_kern.c b/arch/um/os-Linux/drivers/ethertap_kern.c index 3182e759d8de..5e5ee40680ce 100644 --- a/arch/um/os-Linux/drivers/ethertap_kern.c +++ b/arch/um/os-Linux/drivers/ethertap_kern.c @@ -63,7 +63,7 @@ const struct net_kern_info ethertap_kern_info = { .write = etap_write, }; -int ethertap_setup(char *str, char **mac_out, void *data) +static int ethertap_setup(char *str, char **mac_out, void *data) { struct ethertap_init *init = data; diff --git a/arch/um/os-Linux/drivers/tuntap_kern.c b/arch/um/os-Linux/drivers/tuntap_kern.c index adcb6717be6f..ff022d9cf0dd 100644 --- a/arch/um/os-Linux/drivers/tuntap_kern.c +++ b/arch/um/os-Linux/drivers/tuntap_kern.c @@ -53,7 +53,7 @@ const struct net_kern_info tuntap_kern_info = { .write = tuntap_write, }; -int tuntap_setup(char *str, char **mac_out, void *data) +static int tuntap_setup(char *str, char **mac_out, void *data) { struct tuntap_init *init = data; diff --git a/arch/um/os-Linux/signal.c b/arch/um/os-Linux/signal.c index 24a403a70a02..787cfb9a0308 100644 --- a/arch/um/os-Linux/signal.c +++ b/arch/um/os-Linux/signal.c @@ -72,7 +72,7 @@ static int signals_blocked; static unsigned int signals_pending; static unsigned int signals_active = 0; -void sig_handler(int sig, struct siginfo *si, mcontext_t *mc) +static void sig_handler(int sig, struct siginfo *si, mcontext_t *mc) { int enabled = signals_enabled; @@ -108,7 +108,7 @@ static void timer_real_alarm_handler(mcontext_t *mc) timer_handler(SIGALRM, NULL, ®s); } -void timer_alarm_handler(int sig, struct siginfo *unused_si, mcontext_t *mc) +static void timer_alarm_handler(int sig, struct siginfo *unused_si, mcontext_t *mc) { int enabled; diff --git a/arch/x86/um/os-Linux/registers.c b/arch/x86/um/os-Linux/registers.c index df8f4b4bf98b..f3638dd09cec 100644 --- a/arch/x86/um/os-Linux/registers.c +++ b/arch/x86/um/os-Linux/registers.c @@ -17,7 +17,7 @@ #include #include -int have_xstate_support; +static int have_xstate_support; int save_i387_registers(int pid, unsigned long *fp_regs) { From patchwork Tue Jan 23 11:03:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiwei Bie X-Patchwork-Id: 190870 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp262476dyi; Tue, 23 Jan 2024 03:20:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IG1GUjMpFj7c7KPD7+RU5px3kL/RqztKZ2Z3EGcRThjYjF3NdwEkcipsrM2M8UxluZJ0aSm X-Received: by 2002:a05:6214:5186:b0:686:c31:bc0c with SMTP id kl6-20020a056214518600b006860c31bc0cmr882381qvb.13.1706008815201; Tue, 23 Jan 2024 03:20:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706008815; cv=pass; d=google.com; s=arc-20160816; b=dAWUMIbcAHcBMzwZgWsrcOejFcc0w04lF11icMNujuK5FIFlZrxIeOpPdD51mWtflP lls6K/xpUBUuwc5p52ixbgo3Qj/OGhdH1NM2AVPe9quRJmWk4Un7AwG2DbJ4X1D3j/9+ aN7rUIHIgjHZcmI5aFJkZpXRP4IsaNVu/RPBcFvx4EfG8/tLhV5qE3D7uYn3DoRAfwy4 ktXxCk+2lOaw0UEksZfE1d/8tg+xXBrwEWZU9D4PKDP+bxgK3I562BN/tttLuHwabryS mNPfQJd54/Y/YwIIVXy1Y0lfBIjx3tNoHRFHo27o2vD+yrRfRLZrSWCDN8u4+J1mqUE7 aMag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=6wBb4qQBTjRG4qCKgqlX5rEI/gvPtNFtR103JaQWAfU=; fh=2OUCyawv763RJuh0tp1OY7aBUf41Q8m3nxrITJmYLpc=; b=f3Z6LZOFwfsfMC6H8uiMpslpO95xQHw1AGbrrLUYgm0OaaSP5goIXz5gVPNvFYiO+t kUXYIWFZ3L3PRPkcIZ06BcJfixnqcaeBOBpb7ZNbAa+DwZMHvG+xGEwbCRqEWCWgFtv8 gY9Ub9o9dqh86U7MqwCn8Wec02Ed7eMEmq/Gh1k8MXXCJooXfyaM6YDhlQZRiJbkG0Ma AwFakKX4Mpc2QKQEJF0kuCWNGEwpkPT4Dh2NvNgK8N+NtlE9UEzfvD8kxOzR2mJTsdjm J6e52XIGURerDEtiIFQ0vnip1BkPVyzkohc4z7I7GqbS4XwZuRahxN11/iYALz+wLiaa zzuA== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=antgroup.com dmarc=pass fromdomain=antgroup.com); spf=pass (google.com: domain of linux-kernel+bounces-35185-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35185-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id m14-20020a0cdb8e000000b0067f28704aacsi7708838qvk.565.2024.01.23.03.20.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 03:20:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35185-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=antgroup.com dmarc=pass fromdomain=antgroup.com); spf=pass (google.com: domain of linux-kernel+bounces-35185-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35185-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 05FE21C2159E for ; Tue, 23 Jan 2024 11:20:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E9B385DF12; Tue, 23 Jan 2024 11:19:36 +0000 (UTC) Received: from out0-218.mail.aliyun.com (out0-218.mail.aliyun.com [140.205.0.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 729EF5C8EE for ; Tue, 23 Jan 2024 11:19:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.205.0.218 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706008775; cv=none; b=GBeFsBgz8ZjGcUWW84c+u9kbTlrJqAC7DBmb1JOiM6Ignp0Ve7aW/BG1qiEMr6zQ4HetZtAWWZN/roF0nLiySz07N9iE3wl9MmpvD8RrcHrv5HDoAL9Ef+ePcyslaVZcemz0QHkqsqZHPvJPu023yfjSCV7OI3O8B8RQZhWWkU0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706008775; c=relaxed/simple; bh=IPelaOlLNzUGstOhPXdkzDn7BzmoqqeZFdhJ5KOY6+A=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ThW3C3S/f5vYDBV3YGzU0z/P2qE/Tn5PhltSReoXDRMDoCd/pMiNvR9GaJRA/uZd9seF0G9QFPEhq0BdGWVHX3uyJg8JQxlDMfoWnzVBnvTVPUxLLTnJX2vYZdA0OX4u/lrxSMaxgtOWVhi+4ij12w3N3Pqqjoag6jzK5k9BszY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com; spf=pass smtp.mailfrom=antgroup.com; arc=none smtp.client-ip=140.205.0.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=antgroup.com X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R571e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047187;MF=tiwei.btw@antgroup.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---.WDCKTjv_1706007836; Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.WDCKTjv_1706007836) by smtp.aliyun-inc.com; Tue, 23 Jan 2024 19:03:56 +0800 From: "Tiwei Bie" To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net Cc: , , "Tiwei Bie" Subject: [PATCH 2/5] um: Fix the declaration of vfree Date: Tue, 23 Jan 2024 19:03:44 +0800 Message-Id: <20240123110347.1274217-3-tiwei.btw@antgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240123110347.1274217-1-tiwei.btw@antgroup.com> References: <20240123110347.1274217-1-tiwei.btw@antgroup.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788879899518347269 X-GMAIL-MSGID: 1788879899518347269 The definition of vfree has changed since commit b3bdda02aa54 ("vmalloc: add const to void* parameters"). Update the declaration of vfree in um_malloc.h to match the latest definition. Signed-off-by: Tiwei Bie --- arch/um/include/shared/um_malloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/um/include/shared/um_malloc.h b/arch/um/include/shared/um_malloc.h index 13da93284c2c..d25084447c69 100644 --- a/arch/um/include/shared/um_malloc.h +++ b/arch/um/include/shared/um_malloc.h @@ -12,7 +12,7 @@ extern void *uml_kmalloc(int size, int flags); extern void kfree(const void *ptr); extern void *vmalloc(unsigned long size); -extern void vfree(void *ptr); +extern void vfree(const void *ptr); #endif /* __UM_MALLOC_H__ */ From patchwork Tue Jan 23 11:03:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tiwei Bie X-Patchwork-Id: 190871 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp265306dyi; Tue, 23 Jan 2024 03:26:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IEI6La9rzmx5BjETeqVPSyBLAXlHWuVsgLLNNrX2qeeNfA59xgGS++r4EBJaiqTDnGP9Qlm X-Received: by 2002:a17:907:6a0e:b0:a30:c661:8ed0 with SMTP id rf14-20020a1709076a0e00b00a30c6618ed0mr438448ejc.16.1706009195018; Tue, 23 Jan 2024 03:26:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706009195; cv=pass; d=google.com; s=arc-20160816; b=oYP+NI3ZhykZ3uY++EuJBl2rt2shTjE/f+Aa8WjRNomM4nt9cQeMRd3wFWC/1rYxf4 G87x6H9O8OeXAaHNu/XHuVEhQCoJhpCjtppmh2JLJfuAZFXfEkiIlesBQ9bqwg4iESMB gtxuL2o2hu1ngVkMgmk+LLf7VZ7nFbdGBxFbtrApLs6zwSMR9exGZAEfemDlaPsjNr+T QnOLoq+iDFdh1SXYGFlT0Jml1ECh8DYjMrPWCtdvNS/nqytOlxDIPxxlFTCWYuaR04tC wR3xq+y8yi55LF1IPDe0+D7o6+tuOHk7e5IaPfIDA+RuisjfJRNWCZO2lo1ZXhGGdlX1 JQVQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=4+a6MSyPXgEKom2aMNv4B3aI5DSh2DcgVCjXb8KtvOY=; fh=2OUCyawv763RJuh0tp1OY7aBUf41Q8m3nxrITJmYLpc=; b=p7b8fMZ0HODL/uGv/paTM9cOcPO4piAgrYsjon50lQ/jRAsMVgnclOlq+xxtq9fHBx 5YajqRWJlg+yygu2ebgYYxBtPqO3mkWEuo91peAf9ia9Ostbl2wMohiiUC4FGCCMNedX rKLlK6MHD16oOSWSrfpTYv3fNL7Wjqh/SYK1+B7ODl8UJbSZGlZEtAXq8xxwxLuLddeS OAqmyW0hAPbqBKH/vW+/IB+sPheBOoPbCOXVBeB7BTiweaYRq7+L5UEIY5PEsUWn1rvJ UPI3uhFNW5NwvV94ieWsSR9k+ro47XO6Nk6Ix9TdWgnEEkqFQAtCG7SImCTv22YBewCK jVLQ== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=antgroup.com dmarc=pass fromdomain=antgroup.com); spf=pass (google.com: domain of linux-kernel+bounces-35184-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35184-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id h16-20020a170906399000b00a2c2a7b792asi11610510eje.377.2024.01.23.03.26.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 03:26:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35184-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=antgroup.com dmarc=pass fromdomain=antgroup.com); spf=pass (google.com: domain of linux-kernel+bounces-35184-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35184-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 9A4231F28653 for ; Tue, 23 Jan 2024 11:20:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EA0F45DF13; Tue, 23 Jan 2024 11:19:36 +0000 (UTC) Received: from out0-205.mail.aliyun.com (out0-205.mail.aliyun.com [140.205.0.205]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 31E8B5D72F for ; Tue, 23 Jan 2024 11:19:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.205.0.205 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706008775; cv=none; b=i9FaBP7/EBNE9DaG/sqnY3/gAX8IbFBOmKzENobCVWlsfeVtR9FpwyIPgLjOf5mcPoXOOpV1vQM2vhqbhyNt50BHQ58E64/hpHRSbPyGhIDlO7MbJNrFPHsG217O1ypqIrZhO3Fdpva+bzJ7wUDMh9GEt8/Run4SiLQilyPJNuE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706008775; c=relaxed/simple; bh=5BvnaK+Q3e30bHwbnZ/Zuza3SgyqFfcHiBGD0cfTfMY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=nTLuuKU9eMPNXBzGCK8RZl29KOtsrHwszWBDajJSjQ+vB9KN8BiklSWYX6Pg4DhbSuxxh4gRME8pd2pV2u+yIl1E1bM1uaFxP9RLRjwop+FbEKKcqZBrjP387ffylsa0vqISZMaXHMvg4DkZ52em0UEwYSYUAF9yn+46elRlxzs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com; spf=pass smtp.mailfrom=antgroup.com; arc=none smtp.client-ip=140.205.0.205 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=antgroup.com X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047190;MF=tiwei.btw@antgroup.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---.WDCKTk0_1706007836; Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.WDCKTk0_1706007836) by smtp.aliyun-inc.com; Tue, 23 Jan 2024 19:03:56 +0800 From: "Tiwei Bie" To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net Cc: , , "Tiwei Bie" Subject: [PATCH 3/5] um: Remove unused functions Date: Tue, 23 Jan 2024 19:03:45 +0800 Message-Id: <20240123110347.1274217-4-tiwei.btw@antgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240123110347.1274217-1-tiwei.btw@antgroup.com> References: <20240123110347.1274217-1-tiwei.btw@antgroup.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788880297334275311 X-GMAIL-MSGID: 1788880297334275311 These functions are not used anymore. Removing them will also address below -Wmissing-prototypes warnings: arch/um/kernel/process.c:51:5: warning: no previous prototype for ‘pid_to_processor_id’ [-Wmissing-prototypes] arch/um/kernel/process.c:253:5: warning: no previous prototype for ‘copy_to_user_proc’ [-Wmissing-prototypes] arch/um/kernel/process.c:263:5: warning: no previous prototype for ‘clear_user_proc’ [-Wmissing-prototypes] arch/um/kernel/tlb.c:579:6: warning: no previous prototype for ‘flush_tlb_mm_range’ [-Wmissing-prototypes] Signed-off-by: Tiwei Bie --- arch/um/kernel/process.c | 21 --------------------- arch/um/kernel/tlb.c | 6 ------ 2 files changed, 27 deletions(-) diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index 20f3813143d8..292c8014aaa6 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c @@ -48,17 +48,6 @@ static inline int external_pid(void) return userspace_pid[0]; } -int pid_to_processor_id(int pid) -{ - int i; - - for (i = 0; i < ncpus; i++) { - if (cpu_tasks[i].pid == pid) - return i; - } - return -1; -} - void free_stack(unsigned long stack, int order) { free_pages(stack, order); @@ -250,21 +239,11 @@ char *uml_strdup(const char *string) } EXPORT_SYMBOL(uml_strdup); -int copy_to_user_proc(void __user *to, void *from, int size) -{ - return copy_to_user(to, from, size); -} - int copy_from_user_proc(void *to, void __user *from, int size) { return copy_from_user(to, from, size); } -int clear_user_proc(void __user *buf, int size) -{ - return clear_user(buf, size); -} - static atomic_t using_sysemu = ATOMIC_INIT(0); int sysemu_supported; diff --git a/arch/um/kernel/tlb.c b/arch/um/kernel/tlb.c index 7d050ab0f78a..70b5e47e9761 100644 --- a/arch/um/kernel/tlb.c +++ b/arch/um/kernel/tlb.c @@ -576,12 +576,6 @@ void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, } EXPORT_SYMBOL(flush_tlb_range); -void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start, - unsigned long end) -{ - fix_range(mm, start, end, 0); -} - void flush_tlb_mm(struct mm_struct *mm) { struct vm_area_struct *vma; From patchwork Tue Jan 23 11:03:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiwei Bie X-Patchwork-Id: 190859 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp257960dyi; Tue, 23 Jan 2024 03:11:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IHfLZYi1C4HovpfPryqOlvU8ERqiExjB+lVm0fP+Pbo+u3VUJJmR5Vn2cmQrfFc86oMxyDC X-Received: by 2002:a05:620a:4e8:b0:783:9b90:6ddd with SMTP id b8-20020a05620a04e800b007839b906dddmr4684873qkh.30.1706008265702; Tue, 23 Jan 2024 03:11:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706008265; cv=pass; d=google.com; s=arc-20160816; b=G36ElCs3lloFY9b5UD91IM27y9qBQcPiRRzfljREeShY1TUszhnKncjXXlxhvZvfBu VEXiftnK04Al/i4NqqemiAVKdnnZPDUheYBp2JE5OW2INzu0uClh8jrhkrzSaYMPZPdx hd8SjplSCcVlp/VvR1K2VBZksd+E2CznZYYKHleDqaVHCmuz9wL33mJj17hoa80gKJ// ril8wRI0sjApnLydpObpKya2DBV+00DbzrQxkoRAVnsXpPlpz/VpU2MgVdvuuK4qO76X lVpCjl7mozxM3o9wp+1Mi0tm4QEiIWFlqnPR4L4BqvDgtVjYpaOR496wa+p2gCXR+QGI 9IHQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=gr7z/SlPhRJd7tsl4kQkoTMn2fox0E9luuadMesY+gA=; fh=2OUCyawv763RJuh0tp1OY7aBUf41Q8m3nxrITJmYLpc=; b=EH+bt6Dc6PMvY/9scG3VOtc/kGU4yUHFBM5971eqXhkAfxALmwjeIgQIpLeSOP4AHy AVxJ0AxluRxoLDdwGXMAiraLrONtsXN6d7zSUA4Qge9XmDGBcwh3V9Y8RlnbdyDn64PM lkw1mcItf0tZC6avVAC3UEyBj408aW+SSscM3rFKqEC1M09FhGUJqGIrolh8NSuf3YTV OLVX5eXTa6zBxunqZzz2lxi/GFP1p411k4rTrnO5YuG4ET0JK9ht/clyGJLs1c0iVYRQ BNH7+kRQhdzdNyzphVoR2Ady26QL3TKF1t3VI3UsijiDWrSXXiGPvHQ/H3VUXaRS2Jwt tSlQ== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=antgroup.com dmarc=pass fromdomain=antgroup.com); spf=pass (google.com: domain of linux-kernel+bounces-35168-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35168-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id bk9-20020a05620a1a0900b0078350f54cfbsi8198039qkb.116.2024.01.23.03.11.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 03:11:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35168-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=antgroup.com dmarc=pass fromdomain=antgroup.com); spf=pass (google.com: domain of linux-kernel+bounces-35168-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35168-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7DD311C21D31 for ; Tue, 23 Jan 2024 11:11:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5646F5DF30; Tue, 23 Jan 2024 11:09:21 +0000 (UTC) Received: from out0-218.mail.aliyun.com (out0-218.mail.aliyun.com [140.205.0.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A5E15D72E for ; Tue, 23 Jan 2024 11:09:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.205.0.218 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706008159; cv=none; b=nwZP9SQmAK68DOdwNdBwjHcjG1R0eYSQ5YoWksnXuOwLrlS2U/IoMI1KXqMVSiSyihHtN9WotE40YylFfCbovqZE0Hkzy4zAj2rOczhPIypU4gs2PpLdI8x4VBSlzbrZ2AJQ9ZJT2Ku17gBYyWvUD2uG6bhjKsp3JainEA4b5JE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706008159; c=relaxed/simple; bh=e5W/30uahPxnnobqPEw5qPDCHBhsj0fyCzs0F+PD/V8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=kZFw8QVM0hXZifY1uSSPdpg1i6HbieVrHKSLlvg+ZaGt8hXjB84uVR/R0jpI1k1J2S+WWOGFrDhbuakp7KeR/plTO5vGtiiYiDRsZICUfe3bLVRzDquE8t/WEyg/bjuU8BlxRJQZIPWDL6FnB4k2Kpgi6AD0rM9ThNCLPa0xRic= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com; spf=pass smtp.mailfrom=antgroup.com; arc=none smtp.client-ip=140.205.0.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=antgroup.com X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R161e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047199;MF=tiwei.btw@antgroup.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---.WDCKTk8_1706007836; Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.WDCKTk8_1706007836) by smtp.aliyun-inc.com; Tue, 23 Jan 2024 19:03:57 +0800 From: "Tiwei Bie" To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net Cc: , , "Tiwei Bie" Subject: [PATCH 4/5] um: Fix the return type of __switch_to Date: Tue, 23 Jan 2024 19:03:46 +0800 Message-Id: <20240123110347.1274217-5-tiwei.btw@antgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240123110347.1274217-1-tiwei.btw@antgroup.com> References: <20240123110347.1274217-1-tiwei.btw@antgroup.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788879323221321398 X-GMAIL-MSGID: 1788879323221321398 Make it match the declaration in asm-generic/switch_to.h. And also include the header to allow the compiler to check it. Signed-off-by: Tiwei Bie --- arch/um/kernel/process.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index 292c8014aaa6..a7607ef1b02f 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -73,7 +74,7 @@ static inline void set_current(struct task_struct *task) extern void arch_switch_to(struct task_struct *to); -void *__switch_to(struct task_struct *from, struct task_struct *to) +struct task_struct *__switch_to(struct task_struct *from, struct task_struct *to) { to->thread.prev_sched = from; set_current(to); From patchwork Tue Jan 23 11:03:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tiwei Bie X-Patchwork-Id: 190860 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp258223dyi; Tue, 23 Jan 2024 03:11:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IFDneMGduNDHqC1krijj+ZSIqcm6rKI38uqHdtX+kVzNMJmeX1CMdMDZcJ+257cAFVb6N7Q X-Received: by 2002:a05:622a:215:b0:42a:3c96:913d with SMTP id b21-20020a05622a021500b0042a3c96913dmr703078qtx.25.1706008294320; Tue, 23 Jan 2024 03:11:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706008294; cv=pass; d=google.com; s=arc-20160816; b=dgI5/lT6zCZQloyvJd/dDzTz8a32bAuV3bUeKNMNzca3SbiKE68krHaYszq6uFtzqY M7HgjSipMwoQ9JDsBmzxGNZrsCPL4n9jCsOXc6roppX0p4AttFtoMeaswB9o8IhsXYyG Yx8XNJ34dRGkVAavIwGsSpl5R7XR6qq/R2CPgPzVQ9i3le6qXfCAhbqQeSTyG/i5ddi3 xRWb5bcvyOfuv6QEHyBZkAZ8rjQdaVWuwFtxoIRWa5VhIEYNQuQF7gewMdX+DzYhKls3 5jqyaupc+/TQnF30Ot86XSW/7UNEJHcjFpyVH4skhP0pX7F+LmA5B6JqTHY07BkmV7p1 RNjA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=/8KqudNuaG7VvEBlqjtQGdHbMnE7fCC7VmhB0VY50BA=; fh=2OUCyawv763RJuh0tp1OY7aBUf41Q8m3nxrITJmYLpc=; b=DhU4cCREtAdxS8CxHV31u8A0xC/AvrHhj9twGtL6xDVnWN2sbXQWZHeETfU5yuYtVB ye6A8tsvTHegwWdFNTwURUB1Z2CW6m9Gx5EjOVDkInZ61L77VCD0UHR1956jU3cLAlxl taW8hLxFFjzeyMZdblTEEu8tm+TNOxitCc84PV/3L7Mey/YZ5U6UIo9n+beNABd7RPSr 9mfFi5MuVrc3l7hat4oH+b4yf4Vzc6eYfVeLizRZckmYlL4QwsvR7mAZZlu3xaj0f3oB hyDdGcJMgcHq2rMKyP3SpFzHMM+oJEQ1uwJ2W3veMgymoLMaWg40wlUnTb1OghqEHk3R 1KtQ== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=antgroup.com dmarc=pass fromdomain=antgroup.com); spf=pass (google.com: domain of linux-kernel+bounces-35170-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35170-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id z16-20020a05622a061000b004297543e51bsi7774829qta.679.2024.01.23.03.11.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 03:11:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35170-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=antgroup.com dmarc=pass fromdomain=antgroup.com); spf=pass (google.com: domain of linux-kernel+bounces-35170-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35170-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 12EEC1C21190 for ; Tue, 23 Jan 2024 11:11:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A4C175F87E; Tue, 23 Jan 2024 11:09:26 +0000 (UTC) Received: from out0-201.mail.aliyun.com (out0-201.mail.aliyun.com [140.205.0.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 223645DF3D for ; Tue, 23 Jan 2024 11:09:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.205.0.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706008164; cv=none; b=hc+U5Lq3vavuPL2YiaVeSnMQnhgrLn/g5ZTDOZci2E+c2MgIPAxAPXT4oMGyOkRHBtpW5nmlWOPqYz+oZLFdgASGaJ5+OFWjO8sx1RlA9ERCWCgp188+C6WYLKJPQ4DO1cAdV0/m56/VL2qpO8yzde8FV88NRULmQpMGOqWdV2I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706008164; c=relaxed/simple; bh=awK4ouFeeJNCU3Mx7RTOrJMX6P6PIS34KaVNNCUJsFQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=aODY4nqJjK47KHukY2hq9miRF5DciNhcFgMRnBKB2bokRpFNoQ7vJkBGELqXuiW06WC1v6ApZkL8IBmS8p/Q2Rk7kO+JlrcuLB/Us3fWA5IrWsOlCuXdBMyJtPcnqp5ajalv+Non9YSoW3dvJy+WvesVdSLDj5JqYSkRoSKkvcA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com; spf=pass smtp.mailfrom=antgroup.com; arc=none smtp.client-ip=140.205.0.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=antgroup.com X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R131e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047205;MF=tiwei.btw@antgroup.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---.WDCKTkS_1706007837; Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.WDCKTkS_1706007837) by smtp.aliyun-inc.com; Tue, 23 Jan 2024 19:03:57 +0800 From: "Tiwei Bie" To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net Cc: , , "Tiwei Bie" Subject: [PATCH 5/5] um: Add missing headers Date: Tue, 23 Jan 2024 19:03:47 +0800 Message-Id: <20240123110347.1274217-6-tiwei.btw@antgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240123110347.1274217-1-tiwei.btw@antgroup.com> References: <20240123110347.1274217-1-tiwei.btw@antgroup.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788879353025566461 X-GMAIL-MSGID: 1788879353025566461 This will address below -Wmissing-prototypes warnings: arch/um/kernel/mem.c:202:8: warning: no previous prototype for ‘pgd_alloc’ [-Wmissing-prototypes] arch/um/kernel/mem.c:215:7: warning: no previous prototype for ‘uml_kmalloc’ [-Wmissing-prototypes] arch/um/kernel/process.c:207:6: warning: no previous prototype for ‘arch_cpu_idle’ [-Wmissing-prototypes] arch/um/kernel/process.c:328:15: warning: no previous prototype for ‘arch_align_stack’ [-Wmissing-prototypes] arch/um/kernel/reboot.c:45:6: warning: no previous prototype for ‘machine_restart’ [-Wmissing-prototypes] arch/um/kernel/reboot.c:51:6: warning: no previous prototype for ‘machine_power_off’ [-Wmissing-prototypes] arch/um/kernel/reboot.c:57:6: warning: no previous prototype for ‘machine_halt’ [-Wmissing-prototypes] arch/um/kernel/skas/mmu.c:17:5: warning: no previous prototype for ‘init_new_context’ [-Wmissing-prototypes] arch/um/kernel/skas/mmu.c:60:6: warning: no previous prototype for ‘destroy_context’ [-Wmissing-prototypes] arch/um/kernel/skas/process.c:36:12: warning: no previous prototype for ‘start_uml’ [-Wmissing-prototypes] arch/um/kernel/tlb.c:594:6: warning: no previous prototype for ‘force_flush_all’ [-Wmissing-prototypes] arch/x86/um/bugs_64.c:9:6: warning: no previous prototype for ‘arch_check_bugs’ [-Wmissing-prototypes] arch/x86/um/bugs_64.c:13:6: warning: no previous prototype for ‘arch_examine_signal’ [-Wmissing-prototypes] arch/x86/um/fault.c:18:5: warning: no previous prototype for ‘arch_fixup’ [-Wmissing-prototypes] arch/x86/um/os-Linux/mcontext.c:7:6: warning: no previous prototype for ‘get_regs_from_mc’ [-Wmissing-prototypes] Signed-off-by: Tiwei Bie --- arch/um/kernel/mem.c | 2 ++ arch/um/kernel/process.c | 2 ++ arch/um/kernel/reboot.c | 1 + arch/um/kernel/skas/mmu.c | 1 + arch/um/kernel/skas/process.c | 1 + arch/um/kernel/tlb.c | 1 + arch/x86/um/bugs_32.c | 1 + arch/x86/um/bugs_64.c | 1 + arch/x86/um/fault.c | 1 + arch/x86/um/os-Linux/mcontext.c | 1 + 10 files changed, 12 insertions(+) diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c index 38d5a71a579b..ca91accd64fc 100644 --- a/arch/um/kernel/mem.c +++ b/arch/um/kernel/mem.c @@ -12,12 +12,14 @@ #include #include #include +#include #include #include #include #include #include #include +#include #include #ifdef CONFIG_KASAN diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index a7607ef1b02f..4235e2ca2664 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -27,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/um/kernel/reboot.c b/arch/um/kernel/reboot.c index 48c0610d506e..25840eee1068 100644 --- a/arch/um/kernel/reboot.c +++ b/arch/um/kernel/reboot.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c index 656fe16c9b63..aeed1c2aaf3c 100644 --- a/arch/um/kernel/skas/mmu.c +++ b/arch/um/kernel/skas/mmu.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/arch/um/kernel/skas/process.c b/arch/um/kernel/skas/process.c index f2ac134c9752..fdd5922f9222 100644 --- a/arch/um/kernel/skas/process.c +++ b/arch/um/kernel/skas/process.c @@ -12,6 +12,7 @@ #include #include #include +#include extern void start_kernel(void); diff --git a/arch/um/kernel/tlb.c b/arch/um/kernel/tlb.c index 70b5e47e9761..8784f03fa4a6 100644 --- a/arch/um/kernel/tlb.c +++ b/arch/um/kernel/tlb.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/arch/x86/um/bugs_32.c b/arch/x86/um/bugs_32.c index 33daff4dade4..d29929efcc07 100644 --- a/arch/x86/um/bugs_32.c +++ b/arch/x86/um/bugs_32.c @@ -3,6 +3,7 @@ * Licensed under the GPL */ +#include #include #include #include diff --git a/arch/x86/um/bugs_64.c b/arch/x86/um/bugs_64.c index 8cc8256c698d..b01295e8a676 100644 --- a/arch/x86/um/bugs_64.c +++ b/arch/x86/um/bugs_64.c @@ -4,6 +4,7 @@ * Licensed under the GPL */ +#include #include void arch_check_bugs(void) diff --git a/arch/x86/um/fault.c b/arch/x86/um/fault.c index 84ac7f7b0257..0dde4d613a87 100644 --- a/arch/x86/um/fault.c +++ b/arch/x86/um/fault.c @@ -3,6 +3,7 @@ * Licensed under the GPL */ +#include #include /* These two are from asm-um/uaccess.h and linux/module.h, check them. */ diff --git a/arch/x86/um/os-Linux/mcontext.c b/arch/x86/um/os-Linux/mcontext.c index 49c3744cac37..e80ab7d28117 100644 --- a/arch/x86/um/os-Linux/mcontext.c +++ b/arch/x86/um/os-Linux/mcontext.c @@ -3,6 +3,7 @@ #define __FRAME_OFFSETS #include #include +#include void get_regs_from_mc(struct uml_pt_regs *regs, mcontext_t *mc) {