From patchwork Thu Jul 20 15:59:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 704582 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:365:b0:317:2194:b2bc with SMTP id f5csp570298wrf; Thu, 20 Jul 2023 09:00:05 -0700 (PDT) X-Google-Smtp-Source: APBJJlEPdebqcoYsHpBt9JHgtw3RZ9OEyXp+gwXsOIaMZC/S/d8FNZbRmWnrfAr32lQUpvs6vyYk X-Received: by 2002:a0c:f38e:0:b0:62b:3c25:5ae9 with SMTP id i14-20020a0cf38e000000b0062b3c255ae9mr4797700qvk.65.1689868805207; Thu, 20 Jul 2023 09:00:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689868805; cv=none; d=google.com; s=arc-20160816; b=nmru91v9ByG6/IQuBROQuXYo6fpzoviAHRGcw6O0Iro2s2j6kk6dZSKYZfmRjAifYm 387cBr5vx2HynV7kzRiAE+9dzjNCBV4hugnONvY2zEHDJ7DrjS/flwrScsHQZm9kZvoZ CJZU6hVPi4Vh0XM+mKNNbO9bs2n1d6omdnyza5TNetId6DFZy1Ol7opGUemkuq8YnC8p LPN9ol6zvaKQzxy8YXPTgbGOph0M0Ja7p2ypHrj4TVgh4nIHIL0Hr/L6c18eeGVlLopJ TbLaDWNri8+wVkEjEHXnkKVu0XGsd8qgLuA+gs6DWFY6FqshlLU8VmRR5OLFjQ15XXIK zZJA== 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=xQLZW4i4RwSsIRthgz4zXgxBtJp6nXoRhcDsoNfo8Zg=; fh=lIqbxpHEzubfCCroXY/oPi4oahgr2te52JU7bS9LUSs=; b=E6U9/1aaJ0qrfJxzRI7rpySAf0BBaBCkxJPbxZPtm5DPsQIu50GfqduVqmeCj9W3ff L9r85Ms5dmYhQpPWXXJKC89cbRgtHvZGVq3PujTjckwXxqptrqEbEJ/tIrQ0JraWZCUc Dm9fVFrZjbyA100Wkxz9OxB09E5K2BqwOSRpp+7ASpKhCeqlhX6saRbCx+44gZRxdy/u 8LIFu0TvZO1fZWqLrK1ZqRodPnb4zdCqtQzkFkkNlpG2h2WMEyh8h4KP/n2BeWxgwOJe iNp5Bc8H5Vbu5C/DfAf2VC5jGujHL3zW+i7mx/k5D1XObgLL6y0a2w1vG0nbTLnwco9d 9ouA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="WjuU/m2J"; 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 z13-20020a0cf24d000000b0062fe5397100si462022qvl.144.2023.07.20.09.00.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Jul 2023 09:00:05 -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="WjuU/m2J"; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qMW3q-0000YJ-Gp; Thu, 20 Jul 2023 11:59:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qMW3X-0000X0-SY for qemu-devel@nongnu.org; Thu, 20 Jul 2023 11:59:07 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qMW3W-00053t-4B for qemu-devel@nongnu.org; Thu, 20 Jul 2023 11:59:07 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3fbd33a57b6so8486055e9.2 for ; Thu, 20 Jul 2023 08:59:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689868744; x=1690473544; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xQLZW4i4RwSsIRthgz4zXgxBtJp6nXoRhcDsoNfo8Zg=; b=WjuU/m2JrumlbIxMi6C4lDSTFURyPZy6V01bUd1JHSD5fuB2IJwbWhOU9nJUK3/JcY O/XpCbALYG+XV7X/LncX5UdOBlRSSrcocINyDMv1ArfG9tZfqV+OJji7gkW4eUzsBCtq PEIZzT1gP3d7qsI2a3bPUVHXv4Hwnt9neM4JpzLMqPkdYlAqZI9EDVl6NQnz4dPjSLzK k1pqFbftEU8bqLAcuPm1YGBQEzLHFNoV/iOMuJd+I4ndQsDPajIR0Niyu6pBv8JDCaWB tNQWKzcQjRtFDgJ4Wk2h392RJG4+gPPxovt4krz7WoToXP+HiQstMOP839nNAPxLn0HO M2MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689868744; x=1690473544; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xQLZW4i4RwSsIRthgz4zXgxBtJp6nXoRhcDsoNfo8Zg=; b=PvQOM2nubShZgl+iucNqQdgNBRPoPSaNsXNvOUeP/JRloB3BgOeqoDqTxpNLplz5Rw gwjyFQMaI8LIN8LqKfvc8JESrivh+jQJGuZ2UxE5bxXTmXl6nhFOWkSObge2eoYGErCt oU84puEtLM5SQpo8JoTVxltmK4QPUmEcmnZ/l37NzS1ZKLrcUv3+yfmb4Zfm4GsUhnd5 kxH16k79tjdqkrFK73blPggcqrV9S/H0KnMHO2rK3/eBvZ+yBQmJVZQTrE0QZ7/CTDAK lwo6yzDJFkLYpIrGOQ8oARVMV6CSRnn3Opn0XxSpWGfyiKbthl5tMknusRNWlidNCGT5 IH8A== X-Gm-Message-State: ABy/qLYxC++T0jwWkV3P0E/YLi4FbAZHmTqx2uH3M6vkWJDlsKY1OJYT uuT3zZAXsEx+8DAsIN7u+jAm7KpN5jTb1m8/rwY= X-Received: by 2002:a1c:4c11:0:b0:3f9:b748:ff37 with SMTP id z17-20020a1c4c11000000b003f9b748ff37mr7722489wmf.20.1689868744659; Thu, 20 Jul 2023 08:59:04 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id z5-20020a05600c220500b003fc02a410d0sm4187572wml.48.2023.07.20.08.59.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jul 2023 08:59:04 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Cc: =?utf-8?q?C=C3=A9dric_Le_Goater?= , Andrew Jeffery , Joel Stanley , Paolo Bonzini , =?utf-8?q?Herv=C3=A9_Poussineau?= Subject: [PATCH for-8.2 2/4] hw/rtc/twl92230: Use int64_t for sec_offset and alm_sec Date: Thu, 20 Jul 2023 16:59:00 +0100 Message-Id: <20230720155902.1590362-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230720155902.1590362-1-peter.maydell@linaro.org> References: <20230720155902.1590362-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32a.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-bounces+patch=linaro.org@nongnu.org In the twl92230 device, use int64_t for the two state fields sec_offset and alm_sec, because we set these to values that are either time_t or differences between two time_t values. These fields aren't saved in vmstate anywhere, so we can safely widen them. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé --- I have a suspicion that really these fields *should* be being migrated, but this device is only used in the n800 and n810 boards, so I'm not going to investigate how broken migration/vmsave is there... --- hw/rtc/twl92230.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/rtc/twl92230.c b/hw/rtc/twl92230.c index d8534dad949..64c61c3daeb 100644 --- a/hw/rtc/twl92230.c +++ b/hw/rtc/twl92230.c @@ -65,8 +65,8 @@ struct MenelausState { struct tm tm; struct tm new; struct tm alm; - int sec_offset; - int alm_sec; + int64_t sec_offset; + int64_t alm_sec; int next_comp; } rtc; uint16_t rtc_next_vmstate;