Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1928329rwo; Thu, 3 Aug 2023 01:54:09 -0700 (PDT) X-Google-Smtp-Source: APBJJlGLt04TSTJ0qOmkmALbMw8yxQ1n/PBEhA63QZ4wqGH9SA09iu4a3Q3iFdQqR2Unwx8wF5VR X-Received: by 2002:a17:903:22c7:b0:1b8:9552:2249 with SMTP id y7-20020a17090322c700b001b895522249mr19914602plg.43.1691052849258; Thu, 03 Aug 2023 01:54:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691052849; cv=none; d=google.com; s=arc-20160816; b=g76l29CxqP1TJWh8EPHT30kIw4q2PfF5zNzJhw0VPccAqJbc92oXtS88Ljg4/Zbj/h 4bjPC38nU/F7DHZvZ8O0AIQN1m9oXfvG63YREz1oXWfM+tAfNT3XYyX8hHBBjF+qqMOc IvAVMWUWgfJp9/XRGRieW3MxYgTz3qbHDBLxESqjq43rHPZsgpwBxcE33QgmEgUXNz9u VlJlK9EqZXc+hDXdQJ+Axh8bR5cdsa9mCCNcuRf7uwmMpmVv6C/kNKWcdYG0NV0ry2UU ZkFtK6PCb7tgXzH776I2WsdYpOoZU4lWOLSvg7t5rtFNF9pFVMJHBaifgkNRnVWFWuvJ xbww== 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=3/4MDyH/knLuYntRya8npu0ASABjtXXSBg4oxzp1prM=; b=GQ7GI1wEbGmhQIlRrR5SvkH5jb+DOfH5odM11+WzA9qKXkQZkZDnirc2s/FWtig0fB JevQRqo5sWJOwGiXAqu2w+9QQzuP7SFnQxpq7fv105qRxQdaFrdavauzwC6C1x2MITct FjYSvsk4aFjW05C0iWoD6sI7IsW/o+7jxCg+FKIRSOr5Z7K5ErjKtdSyntnwFK7o2RmO 0Q7j6uyZDztiWa/ZAizRbwZHNzTNweq0hthZt2MaUOQnsc1Dmi2rOu9tIIxOp+AYCFas 8y7mj5s9DYrYYZKGOF2cAX30JxCh9thNHfCRdDmm7W9KFTJbzC6vaLavH0iDxbezxRNZ 6oXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AuxYNCGQ; 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 u8-20020a170902e5c800b001aff514a8f0si4689805plf.534.2023.08.03.01.53.56; Thu, 03 Aug 2023 01:54:09 -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=AuxYNCGQ; 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 S234562AbjHCI3Z (ORCPT + 99 others); Thu, 3 Aug 2023 04:29:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231674AbjHCI2l (ORCPT ); Thu, 3 Aug 2023 04:28:41 -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 958BB3AAC for ; Thu, 3 Aug 2023 01:26:30 -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 2955161CC6 for ; Thu, 3 Aug 2023 08:26:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC7B5C433C7; Thu, 3 Aug 2023 08:26:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691051189; bh=hMCNeSXwQytHGCgIoVl9q90tknzoEJ95XhZLTksbe2E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AuxYNCGQKNCXWTWgqyDHBWFCFoMrZ5izJ5PJiOCdXR+7iXP1x+RO4EWU5RMJ7wJC0 k4Cm+vzZvn39TkxcUa0I9DuCaFb7ckZ/gjA0IkQAk4IRqAvzxSpmDgQ469Eq/oLGIf YWw7F2fIbwFLviztYUcUq7NSI39x1ksjTAt4wc3RDHWidtdCiCe9pNPD5uyx2SpSIl fHeYga/UWaiY/lrFCRgXwiZCyj4zbpwznqZB6h2jQ0jTIlkUNcwm8kPyTH4CcUIS1e 6NwDXGbm1Ij1HwzSwHbYLaxrNxsCP2eDLd7vKmNjpcB/LMMeryZkzbOXeC0tOXDX6U 2tWBn39fnGSzg== From: Arnd Bergmann To: Borislav Petkov Cc: Thomas Gleixner , Ingo Molnar , Dave Hansen , linux-kernel@vger.kernel.org, x86@kernel.org, Arnd Bergmann Subject: [PATCH v3 2/7] x86: apic: hide unused safe_smp_processor_id on UP Date: Thu, 3 Aug 2023 10:26:14 +0200 Message-Id: <20230803082619.1369127-3-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230803082619.1369127-1-arnd@kernel.org> References: <20230803082619.1369127-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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