All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Devel] [PATCH 3/3] ACPICA: Remove use of __DATE__ macro
  2015-01-06  0:30 ` Zheng, Lv
@ 2015-01-06 19:36 ` David E. Box
  -1 siblings, 0 replies; 19+ messages in thread
From: David E. Box @ 2015-01-06 19:36 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 1888 bytes --]

On Tue, Jan 06, 2015 at 12:30:05AM +0000, Zheng, Lv wrote:
> Hi,
> 
> > From: Rasmus Villemoes [mailto:linux(a)rasmusvillemoes.dk]
> > Sent: Monday, January 05, 2015 6:27 PM
> > 
> > On Mon, Jan 05 2015, "Zheng, Lv" <lv.zheng(a)intel.com> wrote:
> > 
> > > Hi,
> > >
> > >> From: Rasmus Villemoes [mailto:linux(a)rasmusvillemoes.dk]
> > >> Sent: Friday, December 12, 2014 6:51 PM
> > >> To: Zheng, Lv
> > >> Cc: Rasmus Villemoes; linux-acpi(a)vger.kernel.org; devel(a)acpica.org; linux-kernel(a)vger.kernel.org
> > >> Subject: [PATCH 3/3] ACPICA: Remove use of __DATE__ macro
> > >>
> > >> The macro __DATE__ and friends is not allowed in the kernel. Also,
> > >> including the build time in output doesn't seem to provide any value.
> > >>
> > >
> > > Could you confirm that it is not useful even for the user tools?
> > > Please perform the following commands in the kernel source tree
> > > 1. stay in tools folder
> > > 2. type "make acpi"
> > > 3. type "./power/acpi/acpidump -v"
> > >
> > 
> > Yeah, it's part of the output, but for what reason? What can userspace
> > possibly use that information for?
> 
> I also want to know.

I don't see a reason for userspace to know the build date.

> 
> > I can see some utility in printing a
> > version number, since that may tell something about the features
> > present or absent. The compilation date, on the other hand, seems
> > completely useless. Different distros may ship different versions which
> > happened to be compiled on the same day, or older versions compiled later.
> 
> If the deletion was done for this reason, IMO, it's acceptable.
> So let's wait to see others' feedback.
> 

I'm okay with removing it (the build date) in Linux and ACPICA as well. However
the version, which is essentially the release date, is important for the exact
reasons already stated.

Dave

^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: [Devel] [PATCH 3/3] ACPICA: Remove use of __DATE__ macro
  2015-01-13  2:33 ` Zheng, Lv
@ 2015-01-13  5:42 ` Zheng, Lv
  -1 siblings, 0 replies; 19+ messages in thread
From: Zheng, Lv @ 2015-01-13  5:42 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 3138 bytes --]

Hi, Rasmus

Just for your information.

There is also a known bug related to the application header printing.
The fix is:
https://github.com/zetalog/acpica/commit/79e75432
But this bug can only be seen for EFI ports of ACPICA utilities, it won't be detected in the kernel source tree.
Hope this is not the motivation that has caused you to try to remove the __DATE__ usages.

Thanks and best regards
-Lv

> From: Devel [mailto:devel-bounces(a)acpica.org] On Behalf Of Zheng, Lv
> Sent: Tuesday, January 13, 2015 10:33 AM
> 
> Hi,
> 
> I've added this patch into the 201501 ACPICA materials for review:
> https://github.com/acpica/acpica/pull/61
> If it is merged, it will appear in Linux kernel after 201501 ACPICA release.
> Thanks for reporting.
> 
> Best regards
> -Lv
> 
> > From: David E. Box [mailto:david.e.box(a)linux.intel.com]
> > Sent: Wednesday, January 07, 2015 3:36 AM
> >
> > On Tue, Jan 06, 2015 at 12:30:05AM +0000, Zheng, Lv wrote:
> > > Hi,
> > >
> > > > From: Rasmus Villemoes [mailto:linux(a)rasmusvillemoes.dk]
> > > > Sent: Monday, January 05, 2015 6:27 PM
> > > >
> > > > On Mon, Jan 05 2015, "Zheng, Lv" <lv.zheng(a)intel.com> wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > >> From: Rasmus Villemoes [mailto:linux(a)rasmusvillemoes.dk]
> > > > >> Sent: Friday, December 12, 2014 6:51 PM
> > > > >> To: Zheng, Lv
> > > > >> Cc: Rasmus Villemoes; linux-acpi(a)vger.kernel.org; devel(a)acpica.org; linux-kernel(a)vger.kernel.org
> > > > >> Subject: [PATCH 3/3] ACPICA: Remove use of __DATE__ macro
> > > > >>
> > > > >> The macro __DATE__ and friends is not allowed in the kernel. Also,
> > > > >> including the build time in output doesn't seem to provide any value.
> > > > >>
> > > > >
> > > > > Could you confirm that it is not useful even for the user tools?
> > > > > Please perform the following commands in the kernel source tree
> > > > > 1. stay in tools folder
> > > > > 2. type "make acpi"
> > > > > 3. type "./power/acpi/acpidump -v"
> > > > >
> > > >
> > > > Yeah, it's part of the output, but for what reason? What can userspace
> > > > possibly use that information for?
> > >
> > > I also want to know.
> >
> > I don't see a reason for userspace to know the build date.
> >
> > >
> > > > I can see some utility in printing a
> > > > version number, since that may tell something about the features
> > > > present or absent. The compilation date, on the other hand, seems
> > > > completely useless. Different distros may ship different versions which
> > > > happened to be compiled on the same day, or older versions compiled later.
> > >
> > > If the deletion was done for this reason, IMO, it's acceptable.
> > > So let's wait to see others' feedback.
> > >
> >
> > I'm okay with removing it (the build date) in Linux and ACPICA as well. However
> > the version, which is essentially the release date, is important for the exact
> > reasons already stated.
> >
> > Dave
> _______________________________________________
> Devel mailing list
> Devel(a)acpica.org
> https://lists.acpica.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: [Devel] [PATCH 3/3] ACPICA: Remove use of __DATE__ macro
  2015-01-06 19:36 ` David E. Box
@ 2015-01-13  2:33 ` Zheng, Lv
  -1 siblings, 0 replies; 19+ messages in thread
From: Zheng, Lv @ 2015-01-13  2:33 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 2331 bytes --]

Hi,

I've added this patch into the 201501 ACPICA materials for review:
https://github.com/acpica/acpica/pull/61
If it is merged, it will appear in Linux kernel after 201501 ACPICA release.
Thanks for reporting.

Best regards
-Lv

> From: David E. Box [mailto:david.e.box(a)linux.intel.com]
> Sent: Wednesday, January 07, 2015 3:36 AM
> 
> On Tue, Jan 06, 2015 at 12:30:05AM +0000, Zheng, Lv wrote:
> > Hi,
> >
> > > From: Rasmus Villemoes [mailto:linux(a)rasmusvillemoes.dk]
> > > Sent: Monday, January 05, 2015 6:27 PM
> > >
> > > On Mon, Jan 05 2015, "Zheng, Lv" <lv.zheng(a)intel.com> wrote:
> > >
> > > > Hi,
> > > >
> > > >> From: Rasmus Villemoes [mailto:linux(a)rasmusvillemoes.dk]
> > > >> Sent: Friday, December 12, 2014 6:51 PM
> > > >> To: Zheng, Lv
> > > >> Cc: Rasmus Villemoes; linux-acpi(a)vger.kernel.org; devel(a)acpica.org; linux-kernel(a)vger.kernel.org
> > > >> Subject: [PATCH 3/3] ACPICA: Remove use of __DATE__ macro
> > > >>
> > > >> The macro __DATE__ and friends is not allowed in the kernel. Also,
> > > >> including the build time in output doesn't seem to provide any value.
> > > >>
> > > >
> > > > Could you confirm that it is not useful even for the user tools?
> > > > Please perform the following commands in the kernel source tree
> > > > 1. stay in tools folder
> > > > 2. type "make acpi"
> > > > 3. type "./power/acpi/acpidump -v"
> > > >
> > >
> > > Yeah, it's part of the output, but for what reason? What can userspace
> > > possibly use that information for?
> >
> > I also want to know.
> 
> I don't see a reason for userspace to know the build date.
> 
> >
> > > I can see some utility in printing a
> > > version number, since that may tell something about the features
> > > present or absent. The compilation date, on the other hand, seems
> > > completely useless. Different distros may ship different versions which
> > > happened to be compiled on the same day, or older versions compiled later.
> >
> > If the deletion was done for this reason, IMO, it's acceptable.
> > So let's wait to see others' feedback.
> >
> 
> I'm okay with removing it (the build date) in Linux and ACPICA as well. However
> the version, which is essentially the release date, is important for the exact
> reasons already stated.
> 
> Dave

^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: [Devel] [PATCH 3/3] ACPICA: Remove use of __DATE__ macro
  2015-01-05 10:26       ` Rasmus Villemoes
@ 2015-01-06  0:30 ` Zheng, Lv
  -1 siblings, 0 replies; 19+ messages in thread
From: Zheng, Lv @ 2015-01-06  0:30 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 1763 bytes --]

Hi,

> From: Rasmus Villemoes [mailto:linux(a)rasmusvillemoes.dk]
> Sent: Monday, January 05, 2015 6:27 PM
> 
> On Mon, Jan 05 2015, "Zheng, Lv" <lv.zheng(a)intel.com> wrote:
> 
> > Hi,
> >
> >> From: Rasmus Villemoes [mailto:linux(a)rasmusvillemoes.dk]
> >> Sent: Friday, December 12, 2014 6:51 PM
> >> To: Zheng, Lv
> >> Cc: Rasmus Villemoes; linux-acpi(a)vger.kernel.org; devel(a)acpica.org; linux-kernel(a)vger.kernel.org
> >> Subject: [PATCH 3/3] ACPICA: Remove use of __DATE__ macro
> >>
> >> The macro __DATE__ and friends is not allowed in the kernel. Also,
> >> including the build time in output doesn't seem to provide any value.
> >>
> >
> > Could you confirm that it is not useful even for the user tools?
> > Please perform the following commands in the kernel source tree
> > 1. stay in tools folder
> > 2. type "make acpi"
> > 3. type "./power/acpi/acpidump -v"
> >
> 
> Yeah, it's part of the output, but for what reason? What can userspace
> possibly use that information for?

I also want to know.

> I can see some utility in printing a
> version number, since that may tell something about the features
> present or absent. The compilation date, on the other hand, seems
> completely useless. Different distros may ship different versions which
> happened to be compiled on the same day, or older versions compiled later.

If the deletion was done for this reason, IMO, it's acceptable.
So let's wait to see others' feedback.

Thanks and best regards
-Lv

> Note that -Werror=date-time was added to the kernel's default build
> flags in fe7c36c7bde12. It doesn't currently show because tools/ uses
> its own flags, and the ACPI_COMMON_SIGNON macro is not used within the
> kernel.
> 
> Rasmus

^ permalink raw reply	[flat|nested] 19+ messages in thread
* [PATCH 1/3] checkpatch: Check for use of disallowed macros
@ 2014-12-12 10:51 Rasmus Villemoes
  2014-12-12 10:51 ` [PATCH 2/3] staging: unisys: remove leftover __DATE__ Rasmus Villemoes
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Rasmus Villemoes @ 2014-12-12 10:51 UTC (permalink / raw)
  To: Joe Perches; +Cc: Rasmus Villemoes, linux-kernel

Since fe7c36c7 ("Makefile: Build with -Werror=date-time if the
compiler supports it"), use of __DATE__, __TIME__, __TIMESTAMP__ has
been disallowed. This hasn't prevented a few new users from creeping
in. Make checkpatch complain.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
 scripts/checkpatch.pl | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index f0bb6d60c07b..7fafd3b45539 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3008,6 +3008,12 @@ sub process {
 		$line =~ s@//.*@@;
 		$opline =~ s@//.*@@;
 
+
+# Use of __DATE__, __TIME__, __TIMESTAMP__ is not allowed
+		if ($line =~ m/\b__(?:DATE|TIME|TIMESTAMP)__\b/) {
+		    ERROR("DATETIME", "Do not use the macros __DATE__, __TIME__ and __TIMESTAMP__\n" . $herecurr)
+		}
+
 # EXPORT_SYMBOL should immediately follow the thing it is exporting, consider
 # the whole statement.
 #print "APW <$lines[$realline_next - 1]>\n";
-- 
2.1.3


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2015-01-13  5:42 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-06 19:36 [Devel] [PATCH 3/3] ACPICA: Remove use of __DATE__ macro David E. Box
2015-01-06 19:36 ` David E. Box
  -- strict thread matches above, loose matches on Subject: below --
2015-01-13  5:42 Zheng, Lv
2015-01-13  5:42 ` Zheng, Lv
2015-01-13  2:33 Zheng, Lv
2015-01-13  2:33 ` Zheng, Lv
2015-01-06  0:30 Zheng, Lv
2015-01-06  0:30 ` Zheng, Lv
2014-12-12 10:51 [PATCH 1/3] checkpatch: Check for use of disallowed macros Rasmus Villemoes
2014-12-12 10:51 ` [PATCH 2/3] staging: unisys: remove leftover __DATE__ Rasmus Villemoes
2014-12-12 10:51 ` [PATCH 3/3] ACPICA: Remove use of __DATE__ macro Rasmus Villemoes
2015-01-05  8:47   ` [Devel] " Zheng, Lv
2015-01-05  8:47     ` Zheng, Lv
2015-01-05 10:26     ` Rasmus Villemoes
2015-01-05 10:26       ` Rasmus Villemoes
2014-12-12 11:16 ` [PATCH 1/3] checkpatch: Check for use of disallowed macros Joe Perches
2014-12-18 21:15   ` Rasmus Villemoes
2014-12-18 21:26     ` Joe Perches
2014-12-18 22:17       ` checkpatch: Emit an error when using predefined timestamp macros Joe Perches

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.