From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by mx.groups.io with SMTP id smtpd.web10.349.1599237742389019848 for ; Fri, 04 Sep 2020 09:42:22 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=rUu5yCrk; spf=pass (domain: nuviainc.com, ip: 209.85.128.66, mailfrom: leif@nuviainc.com) Received: by mail-wm1-f66.google.com with SMTP id l9so6665687wme.3 for ; Fri, 04 Sep 2020 09:42:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=KmhwBjgRwdhY4eNHo2KCsgr0Eiob4J38WctOrvN6JyQ=; b=rUu5yCrkpo4A8eZbiY6b+lKZP0fus9Kk7DR6ts9zMd1/d5hxOWmaD3lL0Efc7BoyFU r+AIBnbRL4luo8mQPvP6TJMR03PtCv2OhMsqme21IEMjwg7l+rOd5/Xxto385cX+c0z0 pHpRpvlDDPpyTj7cQVOyGz6CYwaU8pYZHZ+/yAnxzobwylGNgEeZ9SYLWyxguAve97k2 dzPTudfuH1U3IlK5bJ5uU5Zcq4y0K3Suw2EhswgSk9xSD90ohvmsA0y4+dOOZDFsBjcc s3OT8dsWHhVV7+oZoUHOpqdxufHn2JzHo94y171qmqhqaTEsNjfRL5z5YjSh1RO7qKEB 7f9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=KmhwBjgRwdhY4eNHo2KCsgr0Eiob4J38WctOrvN6JyQ=; b=RcB+JoYc61fRSnzZwozxo4YxK2JWgyjqxtP2Apd/6o8E2W6Gfzy/DO/Rm0OYkCN3/z pe1OS93NIP69TLmRfRcJA8M/jp1qs8LnlVJsELjiXR88fBU+3kH0lFtiy0gi+eOsDUU3 6JkyUNIyuwDFmdCfP6Q5EuM6dncBjuK3qENa7yXFbX/do/lMh2S+DfZxdFyCYh2xFJwm DBwAjFgJUOHuK+h75eADz1PN3cN1lflZE9vv/4AKAbXaV7jKB6zgyiXPIUhvfhnTpyCW gKXVu5Vz0ugjPppkZhJAU3HvZkS8Vcq6MS5VD/jaasWCxOb8ytueglnV4jJmu+maj24E xVIQ== X-Gm-Message-State: AOAM531Ej/s8Fx80bEmcgW8Nd27QrTrr0f1qsbuRYg37iotxWMjeN4d2 pX61v/OjiJRbIUueMEnymdsOoQ== X-Google-Smtp-Source: ABdhPJwQL/51YOY4P3Q5vuSa5Lmf1rwRA7i+wf+sjQK3CiWHrgv41zaexQi0ynbHO5ipVHmz++75MQ== X-Received: by 2002:a05:600c:20b:: with SMTP id 11mr8757211wmi.147.1599237740879; Fri, 04 Sep 2020 09:42:20 -0700 (PDT) Return-Path: Received: from vanye ([2001:470:1f09:12f0:b26e:bfff:fea9:f1b8]) by smtp.gmail.com with ESMTPSA id q8sm12407949wrx.79.2020.09.04.09.42.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Sep 2020 09:42:19 -0700 (PDT) Date: Fri, 4 Sep 2020 17:42:17 +0100 From: "Leif Lindholm" To: Laszlo Ersek , xiewenyi2@huawei.com Cc: edk2-devel-groups-io , Ard Biesheuvel , Maciej Rabeda , Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= Subject: Re: [PATCH] EmbeddedPkg/TimeBaseLib: remove the SEC_PER_MONTH, SEC_PER_YEAR macros Message-ID: <20200904164217.GP20124@vanye> References: <20200904154541.23340-1-lersek@redhat.com> <20200904161644.GO20124@vanye> MIME-Version: 1.0 In-Reply-To: <20200904161644.GO20124@vanye> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit Ming bounced, adding xiewenyi2. On Fri, Sep 04, 2020 at 17:16:44 +0100, Leif Lindholm wrote: > +Ming > > On Fri, Sep 04, 2020 at 17:45:41 +0200, Laszlo Ersek wrote: > > The SEC_PER_MONTH and SEC_PER_YEAR macros are wrong: they both evaluate to > > 0 (of type "int"). They are also unused (they could never be used for > > division, for example); so remove them. The macros were originally > > introduced in commit 0f4386e775c7 ("ArmPlatformPkg/PL031RealTimeClockLib: > > Implement PL031 RTC drive", 2011-06-11). > > > > Cc: Ard Biesheuvel > > Cc: Leif Lindholm > > Cc: Maciej Rabeda > > Cc: Philippe Mathieu-Daudé > > Reported-by: Maciej Rabeda > > Signed-off-by: Laszlo Ersek > > Hmm, these are used in a couple of Hisilicon libraries in > edk2-platforms. Cleary, they are not now functioning as expected (but > they never invoke these macros for division). > > We should fix this, but possibly by correcting the macros instead of > deleting them? > > / > Leif (goes back to now hopefuly lit barbecue) > > > --- > > EmbeddedPkg/Include/Library/TimeBaseLib.h | 2 -- > > 1 file changed, 2 deletions(-) > > > > diff --git a/EmbeddedPkg/Include/Library/TimeBaseLib.h b/EmbeddedPkg/Include/Library/TimeBaseLib.h > > index ee2f191d985b..3c2d3660c66c 100644 > > --- a/EmbeddedPkg/Include/Library/TimeBaseLib.h > > +++ b/EmbeddedPkg/Include/Library/TimeBaseLib.h > > @@ -51,8 +51,6 @@ > > #define SEC_PER_MIN ((UINTN) 60) > > #define SEC_PER_HOUR ((UINTN) 3600) > > #define SEC_PER_DAY ((UINTN) 86400) > > -#define SEC_PER_MONTH ((UINTN) 2,592,000) > > -#define SEC_PER_YEAR ((UINTN) 31,536,000) > > > > BOOLEAN > > EFIAPI > > -- > > 2.19.1.3.g30247aa5d201 > >