Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp272690pxb; Thu, 7 Apr 2022 05:22:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyeYbZ2QeELoqEXRP+dyZ65dNzqBGaquTSI/sOeajcTzLnddTOJxrQYxlXi0RXztRvDH/uc X-Received: by 2002:a17:902:e547:b0:156:bde6:bd85 with SMTP id n7-20020a170902e54700b00156bde6bd85mr13576923plf.108.1649334151199; Thu, 07 Apr 2022 05:22:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649334151; cv=none; d=google.com; s=arc-20160816; b=NkxJYmBpkaTf5snVKZzqCT0ng54LYxloNVGrInxtBKJgNI59Y06YBp87L3aLcTU7CY AFlIDdQi4CPcriC8kOlsSBZVn5gXzv7akkVeixZYq0OZYV75NRILs0rz3OnneXJC2Iaz Rjusqn9dff3fpahqwHondgzmaw+ru+w4RfKCKq0kzBCC/vOt6beHdzMkIKPu23gQ5pZ/ 8HWmOzalZghOUKzxD6fdwLliFtngmiSCF0oNMmtMRo+oGCZq8YueIa8ZQcYgFtbmBLJG wwkemzDvBemHDfzlLP0sGva9J6LrC83G0myc1GqBDjZanSSQoTxItBopl2RFD2nICDs6 aOTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=A2uzp1VB6qZPb9v+8i65Ac3fQAGNJ0BYUHWC15GyxfQ=; b=QwxzFGo3MAVvEMDIpzk2DsPPGn7PCEORys7HtQRrNQLg6pqgEv11fg7RWF9RHIIu6o fj4oPf6uMz+0igWbVAl5MW46rV+IYQ+yI1n+CzXa9/GyV8F3q62c4WVToqfD4jGp1TiR Ua5dihpf5q4ut+vueVt4kXxxiGSodwjSIakLd1Cm327IeKZM/943bgfyG2Mjw3mjIwBw 7jQGc3j5/wwkf39lBUnUh/qrqNxt2R6l6lmSaG0nRgTNNmwnNChQ2SUR91NqDfKIx6o6 UY3MZH4S/6dnsX+XVqLXe+pZ2ycU9rMrSLG1oPJMwojW8d1BgbiwiVZduYUWFxA3/8WL dw3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=OUk4rI03; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e18-20020a17090301d200b00156a2cedc85si12749436plh.528.2022.04.07.05.22.12; Thu, 07 Apr 2022 05:22:31 -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=@messagingengine.com header.s=fm3 header.b=OUk4rI03; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231190AbiDGHeD (ORCPT + 99 others); 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 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 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).