Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1164596rwl; Fri, 7 Apr 2023 10:54:53 -0700 (PDT) X-Google-Smtp-Source: AKy350bnB9behAoWrsgn93lb1f5dfgOTQkfRKb1hwgEWxnAkB9fJban+/c1xkJaA6e1FaEC4k1UC X-Received: by 2002:a17:906:9249:b0:93b:5f2:36c with SMTP id c9-20020a170906924900b0093b05f2036cmr249558ejx.61.1680890093168; Fri, 07 Apr 2023 10:54:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680890093; cv=none; d=google.com; s=arc-20160816; b=XccxgnovHdcO038E5ejY39diMDn5DUu/hThsSv7WPC6omb1F4CYR2DbtPemVseV7iq 3XpqqJC2pMBBWjn3+Vc/oyPlbDw/RFZzC1HnMOCAEHKzBcrEp7n9rljaFWZ3cHwaEt0p w5CrbIQ6lvmEBtwg53b8ojA9ZHuJhdH9/lVr2k9xiqOGr92NHgP0h9f2xuDpD8xNbJRG HiOiO+wlbr8pSZEEB6w7+9FCL73SwYUG+8Zlbxbzp3yObR7aDKXeyZtkne0/nbjGCwTT TIJ253EHYb9urHwZpzRh5KPPeGB41XDEqqyMxyOXzDCP4M6DAjhpWNShtNdAA0GrHlXr FGvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-filter; bh=VNS8j224KC10lIB5867HLeqzbNqb1R2Gw6/D8+WPj0M=; b=eFzxqtjvz9pIkgLOkbNvPqBG+3RzD8u5CVNl4+GDz9r70drgPf+L7DnHS/kdymo9a3 VPcCWVvoEqQ549RGv6LktH+347iSCPP4SHv8G9imsjfZFEgpImZ2eDTSEkm6NU7e4piM ySfxsS7tbUzUKbmahljl7UTcx0sS2gmYX3+vDGQ0m9VTD0FcOMI7po+551ou+QH6IMlN 9ZrtNo6BNlmFopBIApS2NHQOm0Qz742/zDfUphaliMeiE6rb6Q2VvBNxEbugAIcFBThq ilK0/bAsI86ejzyfRKJ7+j0br+f9of1nWMTtLmsMGI2KisyahcAQHwmmgbvBOt5PJn3M FrLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=oLH+MoAB; 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=linux.microsoft.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qx11-20020a170906fccb00b0093388136b11si3384795ejb.233.2023.04.07.10.54.23; Fri, 07 Apr 2023 10:54:53 -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=@linux.microsoft.com header.s=default header.b=oLH+MoAB; 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=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229822AbjDGRnO (ORCPT + 99 others); Fri, 7 Apr 2023 13:43:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbjDGRnN (ORCPT ); Fri, 7 Apr 2023 13:43:13 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DEBCE11D; Fri, 7 Apr 2023 10:43:12 -0700 (PDT) Received: from skinsburskii.localdomain (unknown [131.107.1.229]) by linux.microsoft.com (Postfix) with ESMTPSA id 32B962121EA8; Fri, 7 Apr 2023 10:43:12 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 32B962121EA8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1680889392; bh=VNS8j224KC10lIB5867HLeqzbNqb1R2Gw6/D8+WPj0M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oLH+MoABPreTvuT/wx0glKynSk7bWJ4eFZZ4+DjM+LKqsfZ0+hAmw5WjPuL7uNR6Q 3t06ehm4tLMQuBJDpYzPzqGKX6fi8eYUJWi3ODZwnzq7dDBevF6UO+Owa4zsHQuIKv Gxf8FIVC0Pf3f6M0kS3bJ0gcNgY7yLPkLkK7KiV8= Date: Thu, 6 Apr 2023 06:45:40 -0700 From: Stanislav Kinsburskii To: Saurabh Sengar Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, arnd@arndb.de, tiala@microsoft.com, mikelley@microsoft.com, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-arch@vger.kernel.org, jgross@suse.com, mat.jonczyk@o2.pl Subject: Re: [PATCH v4 1/5] x86/init: Make get/set_rtc_noop() public Message-ID: <20230406134540.GA1317@skinsburskii.localdomain> References: <1680598864-16981-1-git-send-email-ssengar@linux.microsoft.com> <1680598864-16981-2-git-send-email-ssengar@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1680598864-16981-2-git-send-email-ssengar@linux.microsoft.com> X-Spam-Status: No, score=-17.4 required=5.0 tests=DATE_IN_PAST_24_48, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,ENV_AND_HDR_SPF_MATCH, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS,USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=unavailable 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 On Tue, Apr 04, 2023 at 02:01:00AM -0700, Saurabh Sengar wrote: > Make get/set_rtc_noop() to be public so that they can be used > in other modules as well. > > Co-developed-by: Tianyu Lan > Signed-off-by: Tianyu Lan > Signed-off-by: Saurabh Sengar > Reviewed-by: Wei Liu > Reviewed-by: Michael Kelley > --- > arch/x86/include/asm/x86_init.h | 2 ++ > arch/x86/kernel/x86_init.c | 4 ++-- > 2 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h > index acc20ae4079d..88085f369ff6 100644 > --- a/arch/x86/include/asm/x86_init.h > +++ b/arch/x86/include/asm/x86_init.h > @@ -330,5 +330,7 @@ extern void x86_init_uint_noop(unsigned int unused); > extern bool bool_x86_init_noop(void); > extern void x86_op_int_noop(int cpu); > extern bool x86_pnpbios_disabled(void); > +extern int set_rtc_noop(const struct timespec64 *now); > +extern void get_rtc_noop(struct timespec64 *now); > > #endif > diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c > index 95be3831df73..d82f4fa2f1bf 100644 > --- a/arch/x86/kernel/x86_init.c > +++ b/arch/x86/kernel/x86_init.c > @@ -33,8 +33,8 @@ static int __init iommu_init_noop(void) { return 0; } > static void iommu_shutdown_noop(void) { } > bool __init bool_x86_init_noop(void) { return false; } > void x86_op_int_noop(int cpu) { } > -static __init int set_rtc_noop(const struct timespec64 *now) { return -EINVAL; } > -static __init void get_rtc_noop(struct timespec64 *now) { } > +int set_rtc_noop(const struct timespec64 *now) { return -EINVAL; } > +void get_rtc_noop(struct timespec64 *now) { } > These functions are just empty place holders. What is the value in having then exported at all? Also, if you do want to use exactly there functions, a better option would be to move them to the header file as "static inline" ones. > static __initconst const struct of_device_id of_cmos_match[] = { > { .compatible = "motorola,mc146818" }, > -- > 2.34.1