From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.groups.io with SMTP id smtpd.web12.3020.1599808781365649384 for ; Fri, 11 Sep 2020 00:19:41 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AYiHragq; spf=pass (domain: redhat.com, ip: 63.128.21.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599808780; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2WZe0M2a0zsHWCtHBC3Zn097QWBGwmdk1pGZzmPqCko=; b=AYiHragqR6LDWl0Hmnl42DYKVJTyffkGX31KOU6mp36V7hK4d9Feckm6QOsJClZtpznPMy 6yu70KW/ky7RLgWAMfUavGP8akelzEKU71Ss8tos5baHyBc4tbluKFD7Z29xcCJ4GaU2a8 1hYmskO6uS4vWLnDlPPh7Al1T6+BKLE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-448-sxQLmGB7MISjrYuEjuVx3w-1; Fri, 11 Sep 2020 03:19:36 -0400 X-MC-Unique: sxQLmGB7MISjrYuEjuVx3w-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CDF0E64081; Fri, 11 Sep 2020 07:19:34 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-52.ams2.redhat.com [10.36.113.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id 64A7B60BFA; Fri, 11 Sep 2020 07:19:32 +0000 (UTC) Subject: Re: [PATCH v11 0/1] ShellPkg/DynamicCommand: add HttpDynamicCommand To: Vladimir Olovyannikov , devel@edk2.groups.io Cc: Zhichao Gao , Maciej Rabeda , Jiaxin Wu , Siyuan Fu , Ray Ni , Liming Gao , Nd , Samer El-Haj-Mahmoud References: <20200909184904.11129-1-vladimir.olovyannikov@broadcom.com> From: "Laszlo Ersek" Message-ID: Date: Fri, 11 Sep 2020 09:19:31 +0200 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US On 09/10/20 22:33, Vladimir Olovyannikov wrote: > Hi Laszlo, > >> -----Original Message----- >> From: Laszlo Ersek >> Sent: Wednesday, September 9, 2020 11:33 PM >>> PATCH v11 changes: >>> Address comments from Laszlo: >>> - use TimeBaseLib.h header to get rid of duplicated constants; >>> - explicitly return UINT32 in EfiTimeToEpoch(). >> >> to be clear, I explicitly *disagree* with returning UINT32 from >> EfiTimeToEpoch(). >> >> I'm not "demanding" (or even suggesting) that you update the >> EfiTimeToEpoch() implementation in this patch to return UINTN, but >> I'd like to be very clear that, IMO, for EfiTimeToEpoch() to suffer >> from a year 2106 problem on 64-bit systems too, is bad design. So >> please don't list the UINT32 return type as my suggestion -- that's >> the exact opposite of what I'd actually suggest. > Sorry, I must have misunderstood. Do you want me to resubmit the > patch? I am open to ideas. Ideally: - change the return type of EfiTimeToEpoch() to UNITN - drop the final UINT32 cast from EfiTimeToEpoch() - change the type of ElapsedSeconds to UINTN - change the expression ElapsedSeconds > 1 ? ElapsedSeconds : 1 to ElapsedSeconds > 1 ? (UINT64)ElapsedSeconds : 1 - print the expression mentioned above with the format specifier %Lu *BUT*. These are really just small details. It would be OK to fix these up later, incrementally. Where I see a real problem is the lack of timely feedback from the ShellPkg maintainers. Laszlo