From patchwork Tue Jul 5 10:59:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 587439 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:1ec:0:0:0:0 with SMTP id 12csp1647654map; Tue, 5 Jul 2022 04:08:51 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sheB9WnViTugBJTxb6svd4cHI/6TJP1ex+mZ5uSKQuIMwO78TN+ltuGPLZZBDgXSDYh7OY X-Received: by 2002:a37:591:0:b0:6b2:4cc1:ed6f with SMTP id 139-20020a370591000000b006b24cc1ed6fmr17180997qkf.427.1657019330981; Tue, 05 Jul 2022 04:08:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657019330; cv=none; d=google.com; s=arc-20160816; b=xzqywSiMWCXKTXEAdySMzZ3qcyuJn9kXhnLtwDbHXSlJWIEQrPq/9fi9w8Tp7NT1xn REj3PWsW7myXW9UFMkZDyF+4Rg9mOqcxXrAlaRckOfDWEEy989OoWYNkXxK/BZiWkzS6 VP5LB0sGAzLJJZQgyiiiO321wH3UY4eBUi5np/crQVa51LyP7KKnAuUejw5PwKLFVEEN RWmUKw1MmlwaN2EjvrPb9GkaYV05ZR5/KhHWu2XENo+5psF6YulAShJzdo0NcUj0DLZI u12xI8htmft8HlWSc8RDximMGYrHHPzvblOxzQK1zag3IlP+q5rm37tQuagVn60scyt5 y8ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CEQI5Tzq0ISDeB3fX3wDve+phtrCx3JrMsFA2JUk8Bg=; b=xjBUhFsVX/qgJ+bafLDhbQ5+u39P35S3guuXvvHPNE+oh2QyteMkFWHc72uuwZqKNH UbCoC6W3a8uKSPq2DfiYbXm3Bl6fMkctUTUAonaY/c6UNWdwAHfRn98wHPsNoldXxJaW TInIAYk7NsLYyKY4fcriUq3fKbb2AzNIb8vov5GbxTqLcZ8Ml9IAR5azey0NuGktTkpk V+hV+2OQRoLpK3lDj80Fgx+2xpulAgl5Eg8Ybyh7ISP4/yDwNT7X24pXWd+KlwvHZtXY DZ/d063zTVoTEkgUkhptG2m4bQ4M0W3oBkgrrtvQfz5GEY+jFEMaVz2cuihSnhUpY4Eb 2HWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="j/W8qN2K"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v3-20020a05622a144300b00318600691d8si17424275qtx.603.2022.07.05.04.08.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Jul 2022 04:08:50 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="j/W8qN2K"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:45734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8gQE-0004mZ-FU for patch@linaro.org; Tue, 05 Jul 2022 07:08:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40162) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8gHp-0006ox-1v for qemu-devel@nongnu.org; Tue, 05 Jul 2022 07:00:09 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]:36691) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o8gHm-0000fN-Tk for qemu-devel@nongnu.org; Tue, 05 Jul 2022 07:00:08 -0400 Received: by mail-pf1-x42c.google.com with SMTP id 3so1053429pfx.3 for ; Tue, 05 Jul 2022 04:00:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CEQI5Tzq0ISDeB3fX3wDve+phtrCx3JrMsFA2JUk8Bg=; b=j/W8qN2KdHSPSKGm8jTEQw1hQi/siLuI4jZja+5czS9oCjdLqSvwH0PGtowTpR7coX YJZDfcJaSjVfPxS/dxc8nHDlphSg9v7HrsKEH2znPGIZf/xlxvGQRBW7Wq8yxEk2Y+FV VG8fDJT1IoMt9yLSMNt+Lka6OEJ71nGyzValy5HeccadNVzij5tbV7gk8mA1Vp7ccpK5 v0YwX72qoouk0IpQjTLO0y56JyN2tsFohGwBVZcgoErvKhqmYiiKhBpOKX/3GqTpodDY bnnWtGpBgqvDGmmzbTcSy7uC3njk7HcDESBOdgwC2iFKhdZPk9vTYVBZp6rSbwE6Cd6z YJdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CEQI5Tzq0ISDeB3fX3wDve+phtrCx3JrMsFA2JUk8Bg=; b=JsfeYtM43q/Rm1XjUvrtEo4PzAMPsEAZo6LXYcdS2NvzNOiPH4AmAiVcCJl+h7DkKK hrqX1d4wjXKA6dj/j/ygUoNHp/nPySCU+YBK8DcYOy8fNGezRMqaJO6glJMksCJqXmcA BH2dvIlJiu1JCdoT+Ln/O8VSnIZt8hUR58bvEv/Ebz02au4v2FDCTO0Hpc6n1/NGIIdJ D8MOBltbGz+CDcefN0xzEO/aaq87pHIpjO3qZf0TO7KlC/dDLpe7+8pkLDyeQfdudRlZ EGEzUfGZ80GjzgXXAshDiYKyaRUxpRynrxYnZvI+JDuy2hofVFu49SgbMmVVHpq3lCyr VvMw== X-Gm-Message-State: AJIora+uY3SuVQlh0yuHOirgsRYfOicnT4f03PCZPdI8ecmKhe9FmC3M Fp1oGQPNioA75TyE8kBchmN8Uy2WS5dQJ97w X-Received: by 2002:a05:6a00:150a:b0:525:3030:fe41 with SMTP id q10-20020a056a00150a00b005253030fe41mr41275481pfu.37.1657018804943; Tue, 05 Jul 2022 04:00:04 -0700 (PDT) Received: from stoup.. ([122.255.60.245]) by smtp.gmail.com with ESMTPSA id d18-20020a170903231200b0016bf7981d0bsm508454plh.86.2022.07.05.04.00.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jul 2022 04:00:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Song Gao , Thomas Huth Subject: [PULL 1/6] hw/rtc/ls7a_rtc: Drop unused inline functions Date: Tue, 5 Jul 2022 16:29:51 +0530 Message-Id: <20220705105957.1144514-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220705105957.1144514-1-richard.henderson@linaro.org> References: <20220705105957.1144514-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Remove toy_val_to_time_mon and toy_val_to_time_year as unused, to avoid a build failure with clang. Remove all of the other inline markers too so that this does not creep back in. Reviewed-by: Song Gao Reviewed-by: Thomas Huth Signed-off-by: Richard Henderson --- hw/rtc/ls7a_rtc.c | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/hw/rtc/ls7a_rtc.c b/hw/rtc/ls7a_rtc.c index e8b75701e4..1f9e38a735 100644 --- a/hw/rtc/ls7a_rtc.c +++ b/hw/rtc/ls7a_rtc.c @@ -86,46 +86,31 @@ struct LS7ARtcState { }; /* switch nanoseconds time to rtc ticks */ -static inline uint64_t ls7a_rtc_ticks(void) +static uint64_t ls7a_rtc_ticks(void) { return qemu_clock_get_ns(rtc_clock) * LS7A_RTC_FREQ / NANOSECONDS_PER_SECOND; } /* switch rtc ticks to nanoseconds */ -static inline uint64_t ticks_to_ns(uint64_t ticks) +static uint64_t ticks_to_ns(uint64_t ticks) { return ticks * NANOSECONDS_PER_SECOND / LS7A_RTC_FREQ; } -static inline bool toy_enabled(LS7ARtcState *s) +static bool toy_enabled(LS7ARtcState *s) { return FIELD_EX32(s->cntrctl, RTC_CTRL, TOYEN) && FIELD_EX32(s->cntrctl, RTC_CTRL, EO); } -static inline bool rtc_enabled(LS7ARtcState *s) +static bool rtc_enabled(LS7ARtcState *s) { return FIELD_EX32(s->cntrctl, RTC_CTRL, RTCEN) && FIELD_EX32(s->cntrctl, RTC_CTRL, EO); } -/* parse toy value to struct tm */ -static inline void toy_val_to_time_mon(uint64_t toy_val, struct tm *tm) -{ - tm->tm_sec = FIELD_EX32(toy_val, TOY, SEC); - tm->tm_min = FIELD_EX32(toy_val, TOY, MIN); - tm->tm_hour = FIELD_EX32(toy_val, TOY, HOUR); - tm->tm_mday = FIELD_EX32(toy_val, TOY, DAY); - tm->tm_mon = FIELD_EX32(toy_val, TOY, MON) - 1; -} - -static inline void toy_val_to_time_year(uint64_t toy_year, struct tm *tm) -{ - tm->tm_year = toy_year; -} - /* parse struct tm to toy value */ -static inline uint64_t toy_time_to_val_mon(struct tm *tm) +static uint64_t toy_time_to_val_mon(const struct tm *tm) { uint64_t val = 0; @@ -137,7 +122,7 @@ static inline uint64_t toy_time_to_val_mon(struct tm *tm) return val; } -static inline void toymatch_val_to_time(LS7ARtcState *s, uint64_t val, struct tm *tm) +static void toymatch_val_to_time(LS7ARtcState *s, uint64_t val, struct tm *tm) { qemu_get_timedate(tm, s->offset_toy); tm->tm_sec = FIELD_EX32(val, TOY_MATCH, SEC);