Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp4536200rwo; Tue, 25 Jul 2023 07:30:29 -0700 (PDT) X-Google-Smtp-Source: APBJJlFnzB6l9YBwqA5qBaBybURcg2DqidGlw52jgL+gKw3Rp2CbAMpbBhtbdaWiQCMTMO7kuFF+ X-Received: by 2002:a17:902:e884:b0:1b8:b442:aa97 with SMTP id w4-20020a170902e88400b001b8b442aa97mr13372791plg.54.1690295429003; Tue, 25 Jul 2023 07:30:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690295428; cv=none; d=google.com; s=arc-20160816; b=IpuNZM6Z1aeOtPyDeuOJQWoeFUy/J1KXJHebA510LYVymPvDjNU/hbnvcj9fpzK5bz YRbXqzDImRJ/FTSBBpDggkdxZ7sLUjzf+QhawckwhXoA9kTB9ElTAuDyV7NsPiBdYG51 TIoXCTifWwitXIBSn8+Bi84X+v6SIRavt1ualUWjXAfLuFxYbW6PbxSv9sJcApsPCipL 5VmfyWMq/YuXf4pK+T/C32AT4aezJ0sM9bPe+cJ7NDSRh919Q4hKR3gLUwVolypLywV9 YTllqeLEbC6H8EySTWqLN2tqTdB2QY4Ui/iwv99rjxoMNuhGN/LiMLSuPa42weyU6Qt5 JiPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mCgBfFRkM739Vc8/KWMQEM0FMilnMg5t6hA0333CXlg=; fh=R523ZnP4N7O48iGEbgKYBfM0eoofLeWRxo/bWq35Los=; b=oyRFJPiLWuHVm9UM7CqBbfMxc8ieOObIcOhyw2Ni87odIfMtPsugMUDkEm/Q/B0pJy ZJaI50bjqRY5IvRnjBH5VyzhXcNUbfm0IsMr3d7DhHl0bQsQxaUHThvtvmaEnhu81TqC yF98xzWc5y3KYKrl2w9SNm2sYTQKWRNY22+NZ0SKaZlmL/zxSlJ8ePHt0H3l5pHUVti5 LmQgYbWNdB2AKyG2yMQgdmWnoQ1u6oYsR6e7MKbVdTPEoNxisFh3JLVYFTOyZiB1K3Ic Xm2Liw0eR97pgrFVAn3OwtG/vay+adkY0INlcQ46Dl6Vcoa+u84lp0YB+h7Gj033xh0Y 1RbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i30Mdi+O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e17-20020a17090301d100b001b866e8af8dsi8558202plh.43.2023.07.25.07.30.15; Tue, 25 Jul 2023 07:30:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i30Mdi+O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231617AbjGYNs6 (ORCPT + 99 others); Tue, 25 Jul 2023 09:48:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231569AbjGYNsy (ORCPT ); Tue, 25 Jul 2023 09:48:54 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8540211E for ; Tue, 25 Jul 2023 06:48:50 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7A83061726 for ; Tue, 25 Jul 2023 13:48:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1438DC433C8; Tue, 25 Jul 2023 13:48:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690292929; bh=hMCNeSXwQytHGCgIoVl9q90tknzoEJ95XhZLTksbe2E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i30Mdi+ObSX/DddiqBUFhH+lrNYNyVlnliMlm65DvWNF9v2kMj2VV9m/gcmb+R6ai 8HVuAXnsFbIti0Faj2A23ZNut99GHsiE6j/CircdPswo/czk6DQQTa7wYYIi8jDwOj aW4tdUWW7pfW4aP5um+rivNwa7cSFbmNKwmV8VCqMpeFDRjqVVYWkGqA/F8rwO1K7W Wm22gPcB4XRbB/8COnoX2T7s3xWDzqLDzeh7M1bbnyFJOJioDs3PyJ+ArdIeHrGxgP DkSLapIDPw7U2FAfGflgDkIpkTpAqBRd3QW1Ocqaut/M3vhEASgsDctjiuiA/0bk3J M3a+lJo7K20Mw== From: Arnd Bergmann To: linux-kernel@vger.kernel.org, x86@kernel.org Cc: Arnd Bergmann , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" Subject: [PATCH 1/5] [RESEND] x86: apic: hide unused safe_smp_processor_id on UP Date: Tue, 25 Jul 2023 15:48:33 +0200 Message-Id: <20230725134837.1534228-2-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230725134837.1534228-1-arnd@kernel.org> References: <20230725134837.1534228-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann When CONFIG_SMP is disabled, the prototype for safe_smp_processor_id() is hidden, which causes a W=1 warning: /home/arnd/arm-soc/arch/x86/kernel/apic/ipi.c:316:5: error: no previous prototype for 'safe_smp_processor_id' [-Werror=missing-prototypes] Since there are no callers in this configuration, just hide the definition as well. Signed-off-by: Arnd Bergmann --- arch/x86/kernel/apic/ipi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/kernel/apic/ipi.c b/arch/x86/kernel/apic/ipi.c index 2a6509e8c840d..9bfd6e3973845 100644 --- a/arch/x86/kernel/apic/ipi.c +++ b/arch/x86/kernel/apic/ipi.c @@ -301,6 +301,7 @@ void default_send_IPI_mask_logical(const struct cpumask *cpumask, int vector) local_irq_restore(flags); } +#ifdef CONFIG_SMP /* must come after the send_IPI functions above for inlining */ static int convert_apicid_to_cpu(int apic_id) { @@ -329,3 +330,4 @@ int safe_smp_processor_id(void) return cpuid >= 0 ? cpuid : 0; } #endif +#endif -- 2.39.2