Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1994042imm; Tue, 22 May 2018 12:49:53 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo5TPnSJ5uItat2w6WgXbdM1zKmRdliJtxORD8AISTkOthBQrbw00eVUFKXrPArAKTYcFYC X-Received: by 2002:a62:fb14:: with SMTP id x20-v6mr25615075pfm.48.1527018593869; Tue, 22 May 2018 12:49:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527018593; cv=none; d=google.com; s=arc-20160816; b=pyJ/FWLHtgYq+1GoH3RTwKuDkW8qajTggSKBQsii/CMaRhD+JlkDiGq1BdOde/ZQzw brp8y+AsVbKM+Ow7TH0F74pJ0vC9mbSBvQKVGNGokJrlvydv/+mhF0FhFUOeeWBOEsyU 4tAxEsN0u1JOPb33ZW9kQOfrOxrjAWdRL9j9dzLMz3tttXILf/7pm6kDdd1YZ/Cvg+Ah M0MSjnIt01tz3ciKTp9DBf59h/Zm/mhzUfrXmYCA9hjuIrAowyoQXZXWNqjVtgYyudz/ L/ZbSj5x4AXAMwd+7yaM/YWRMRFzpVHfWPM8Vhh+JyU48/EniCgKF9vZRnfcqYtfj2g4 aivw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=wvdd7oF1fMzWX8wk2xoyt9RoWAVxYJU3ZdLZFzQJhT0=; b=XFIHT9zuEok2USd99NTDC04lduz+q8n++XItGZeEcLs2wkZbEGxxFYdsb09O1lAkV4 T35f86kc2/YVfbWww0lVlqPYbX2Mt6LtC/iRU4jb5XAKvVpgU8tL2nfhTt2JwBvBHj2y 7GtAbR6o8oOzpy2tIyVBBzvkILiCUeal+vs1jlG37GrRQpPSdfPXYVIpWsU9ngx2X/nZ yocxkfo10s3+wlxoieytYJBJD0wqVO7BHRuzwA/iEEeIV9Cp7JlzVaPWYhN121j27DHQ Fy3AgyqHkK5HkgLmzB4JwT7f/aYEFlqVPzKDSZJyuqpQrIy1jw5wGY7ZqW2mFtjtwnBv hctw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=DVVGGUrb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 203-v6si16795472pfa.60.2018.05.22.12.49.27; Tue, 22 May 2018 12:49:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=DVVGGUrb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752665AbeEVTrv (ORCPT + 99 others); Tue, 22 May 2018 15:47:51 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:39406 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751544AbeEVTru (ORCPT ); Tue, 22 May 2018 15:47:50 -0400 Received: by mail-wr0-f195.google.com with SMTP id w18-v6so18506422wrn.6 for ; Tue, 22 May 2018 12:47:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=wvdd7oF1fMzWX8wk2xoyt9RoWAVxYJU3ZdLZFzQJhT0=; b=DVVGGUrbsgSXKon0VGy5LgKnGtI/69GjwPOLkr6RBy1Y5efD3p+b3FLrqSBevH1nF7 ySre+T2AnrQWI+0PKwE67tIwAbXaq1Mypqpn1/+ZQKDH9+DNimd9aD+OVQXTim6F9juj sZ94xSUneexTp92Rtwhj/vVta14pVlVOLTZzjj8bKK0rPfsK3rEZMl39i6R4KOgzh7ke M1TuKeylX9/RhYzkx9PdAB+lK4aD0CYXsF3TdfsbhxHa23ze+M4DJce0cql6NT88gRQh vNNuVXETjQge9HwFIk8H9o+b3byTsW1flIJhjAEtvonk8nyxEynSmBtLI3yBRir1Z4Nn tPoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=wvdd7oF1fMzWX8wk2xoyt9RoWAVxYJU3ZdLZFzQJhT0=; b=XTrHQPPATXNRbsLL7CiY9SGnTJUhP5MuOHFNkZm0RDPWwKFCaIyqyI3lZxlOTHQfOr LQ8lkL40gz9EVBemQbquI93dRM38sZw6NQE+kHvCN0j/qYWVGICJlHi/PgBJ6w7u7GXc HOkhqfAgN6A1XCkj8mVUDo00sJulogwInuZeWxQtOIU/+iDyIhWa4ewmgQ8cqkkSNG+Q CmSmMVKPw4rn3j4/z4FDvrcHefVnButFey2V64+KOVyqX5cKswtefse9Hw1jfJHlyFJp vohqhPm+GZDcsFEutVJe6Oh8GcH6EJCUhmu2N3+Yh2nvNfN2lxGzpcSIDl4bmorm6UMB uwhQ== X-Gm-Message-State: ALKqPwfycK12zF7b3sG6raZTHDVP/MN7AtjXkNum1sbwUTjJ5fgXbIRW yvp0tkfyEcSdFzAmsCkx7WY= X-Received: by 2002:adf:e892:: with SMTP id d18-v6mr555481wrm.220.1527018468807; Tue, 22 May 2018 12:47:48 -0700 (PDT) Received: from macbookpro.malat.net (bru31-1-78-225-226-121.fbx.proxad.net. [78.225.226.121]) by smtp.gmail.com with ESMTPSA id u89-v6sm884497wma.4.2018.05.22.12.47.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 May 2018 12:47:48 -0700 (PDT) Received: by macbookpro.malat.net (Postfix, from userid 1000) id DD7E410C03F1; Tue, 22 May 2018 21:47:46 +0200 (CEST) From: Mathieu Malaterre To: Tejun Heo Cc: Mathieu Malaterre , Lai Jiangshan , linux-kernel@vger.kernel.org Subject: [PATCH] workqueue: move function definitions within CONFIG_SMP block Date: Tue, 22 May 2018 21:47:32 +0200 Message-Id: <20180522194732.29140-1-malat@debian.org> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In commit 7ee681b25284 ("workqueue: Convert to state machine callbacks"), three new function definitions were added: ‘workqueue_prepare_cpu’, ‘workqueue_online_cpu’ and ‘workqueue_offline_cpu’. Move these function definitions within a CONFIG_SMP block since they are not used outside of it. This will match function declarations in header , and silence the following gcc warning (W=1): kernel/workqueue.c:4743:5: warning: no previous prototype for ‘workqueue_prepare_cpu’ [-Wmissing-prototypes] kernel/workqueue.c:4756:5: warning: no previous prototype for ‘workqueue_online_cpu’ [-Wmissing-prototypes] kernel/workqueue.c:4783:5: warning: no previous prototype for ‘workqueue_offline_cpu’ [-Wmissing-prototypes] Signed-off-by: Mathieu Malaterre --- kernel/workqueue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index ca7959be8aaa..c1544225c696 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -4579,6 +4579,8 @@ void show_workqueue_state(void) rcu_read_unlock_sched(); } +#ifdef CONFIG_SMP + /* * CPU hotplug. * @@ -4799,8 +4801,6 @@ int workqueue_offline_cpu(unsigned int cpu) return 0; } -#ifdef CONFIG_SMP - struct work_for_cpu { struct work_struct work; long (*fn)(void *); -- 2.11.0