From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C50F8C433F5 for ; Thu, 7 Apr 2022 07:32:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241814AbiDGHeD (ORCPT ); Thu, 7 Apr 2022 03:34:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234761AbiDGHeB (ORCPT ); Thu, 7 Apr 2022 03:34:01 -0400 Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1298541BF for ; Thu, 7 Apr 2022 00:32:02 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 149EB32009E5; Thu, 7 Apr 2022 03:32:00 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 07 Apr 2022 03:32:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=A2uzp1VB6qZPb9v+8 i65Ac3fQAGNJ0BYUHWC15GyxfQ=; b=OUk4rI03fHtv6kIgxgfmeIX3tHzmfemxg KFBHtlRVYjKaCgH6ekKV0jrMbRkICFT0WPfLCsHaDk62uaR8xXs4TUOew/O3lVI7 3RBy9IC/rMNEboLdPBzMTrQgppSrq22KmyoeUfKtnLWvlP1sWlKam2motp6imT5A RflsV5/zRNAt452+QimRdT2EXbtlRs226T/kjlspQgVOrsOv0faPdxg+25++LOyf 8GYlIGALKnUxrFwAy8TR0qh2td26Q9Ii+PC9YYpt3TBeNE9ytyYx2DQvHd/W6FjN 8tAX+mTKKQALdHelQw7cKwSeWXDyiInqajol1yq7HbyZkXMHaYgMw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudejjedguddvvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvufgjkfhfgggtsehttdertddttddvnecuhfhrohhmpefhihhnnhcu vfhhrghinhcuoehfthhhrghinheslhhinhhugidqmheikehkrdhorhhgqeenucggtffrrg htthgvrhhnpeffudfhgeefvdeitedugfelueegheekkeefveffhfeiveetledvhfdtveff teeuudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hfthhhrghinheslhhinhhugidqmheikehkrdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 7 Apr 2022 03:31:56 -0400 (EDT) Date: Thu, 7 Apr 2022 17:31:03 +1000 (AEST) From: Finn Thain To: Randy Dunlap cc: linux-kernel@vger.kernel.org, kernel test robot , Kees Cook , Arnd Bergmann , Michael Ellerman , Geert Uytterhoeven , Nathan Chancellor , Nick Desaulniers , Benjamin Herrenschmidt , linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH] macintosh: fix via-pmu and via-cuda build errors In-Reply-To: <20220407023700.7216-1-rdunlap@infradead.org> Message-ID: <7ddb26a1-be89-813f-8dcc-4bebaf8f5636@linux-m68k.org> References: <20220407023700.7216-1-rdunlap@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 6 Apr 2022, Randy Dunlap wrote: > When CONFIG_RTC_CLASS is not set, rtc_tm_to_time64() is not defined. > > ... > > m68k-linux-ld: drivers/macintosh/via-pmu.o: in function `pmu_set_rtc_time': > drivers/macintosh/via-pmu.c:1758: undefined reference to `rtc_tm_to_time64' > m68k-linux-ld: drivers/macintosh/via-cuda.o: in function `cuda_set_rtc_time': > drivers/macintosh/via-cuda.c:797: undefined reference to `rtc_tm_to_time64' > > ... > This is a big hammer type of patch. We could possibly do (a) some > conditional code blocks for RTC_CLASS rtc_tm_to_time64() call sites also appear in several other files without conditionals: arch/powerpc/kernel/time.c arch/powerpc/platforms/8xx/m8xx_setup.c arch/powerpc/platforms/maple/time.c arch/powerpc/platforms/powermac/time.c Why not use mktime64() instead? That seems to be a common pattern for this kind of thing (without needing conditional code).