public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/3] ACPICA: Remove use of __DATE__ macro
       [not found] <1418381488-25123-1-git-send-email-linux@rasmusvillemoes.dk>
@ 2014-12-12 10:51 ` Rasmus Villemoes
  2015-01-05  8:47   ` Zheng, Lv
  0 siblings, 1 reply; 7+ messages in thread
From: Rasmus Villemoes @ 2014-12-12 10:51 UTC (permalink / raw)
  To: Lv Zheng; +Cc: Rasmus Villemoes, linux-acpi, devel, linux-kernel

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.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
 drivers/acpi/acpica/acapps.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/acpi/acpica/acapps.h b/drivers/acpi/acpica/acapps.h
index 3d2c88289da9..f72826176ebe 100644
--- a/drivers/acpi/acpica/acapps.h
+++ b/drivers/acpi/acpica/acapps.h
@@ -64,15 +64,15 @@
 /* Macros for signons and file headers */
 
 #define ACPI_COMMON_SIGNON(utility_name) \
-	"\n%s\n%s version %8.8X%s [%s]\n%s\n\n", \
+	"\n%s\n%s version %8.8X%s\n%s\n\n", \
 	ACPICA_NAME, \
-	utility_name, ((u32) ACPI_CA_VERSION), ACPI_WIDTH, __DATE__, \
+	utility_name, ((u32) ACPI_CA_VERSION), ACPI_WIDTH, \
 	ACPICA_COPYRIGHT
 
 #define ACPI_COMMON_HEADER(utility_name, prefix) \
-	"%s%s\n%s%s version %8.8X%s [%s]\n%s%s\n%s\n", \
+	"%s%s\n%s%s version %8.8X%s\n%s%s\n%s\n", \
 	prefix, ACPICA_NAME, \
-	prefix, utility_name, ((u32) ACPI_CA_VERSION), ACPI_WIDTH, __DATE__, \
+	prefix, utility_name, ((u32) ACPI_CA_VERSION), ACPI_WIDTH, \
 	prefix, ACPICA_COPYRIGHT, \
 	prefix
 
-- 
2.1.3

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

* RE: [PATCH 3/3] ACPICA: Remove use of __DATE__ macro
  2014-12-12 10:51 ` [PATCH 3/3] ACPICA: Remove use of __DATE__ macro Rasmus Villemoes
@ 2015-01-05  8:47   ` Zheng, Lv
  2015-01-05 10:26     ` Rasmus Villemoes
  0 siblings, 1 reply; 7+ messages in thread
From: Zheng, Lv @ 2015-01-05  8:47 UTC (permalink / raw)
  To: Rasmus Villemoes
  Cc: linux-acpi@vger.kernel.org, devel@acpica.org,
	linux-kernel@vger.kernel.org

Hi,

> From: Rasmus Villemoes [mailto:linux@rasmusvillemoes.dk]
> Sent: Friday, December 12, 2014 6:51 PM
> To: Zheng, Lv
> Cc: Rasmus Villemoes; linux-acpi@vger.kernel.org; devel@acpica.org; linux-kernel@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"

Thanks and best regards
-Lv

> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> ---
>  drivers/acpi/acpica/acapps.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/acpi/acpica/acapps.h b/drivers/acpi/acpica/acapps.h
> index 3d2c88289da9..f72826176ebe 100644
> --- a/drivers/acpi/acpica/acapps.h
> +++ b/drivers/acpi/acpica/acapps.h
> @@ -64,15 +64,15 @@
>  /* Macros for signons and file headers */
> 
>  #define ACPI_COMMON_SIGNON(utility_name) \
> -	"\n%s\n%s version %8.8X%s [%s]\n%s\n\n", \
> +	"\n%s\n%s version %8.8X%s\n%s\n\n", \
>  	ACPICA_NAME, \
> -	utility_name, ((u32) ACPI_CA_VERSION), ACPI_WIDTH, __DATE__, \
> +	utility_name, ((u32) ACPI_CA_VERSION), ACPI_WIDTH, \
>  	ACPICA_COPYRIGHT
> 
>  #define ACPI_COMMON_HEADER(utility_name, prefix) \
> -	"%s%s\n%s%s version %8.8X%s [%s]\n%s%s\n%s\n", \
> +	"%s%s\n%s%s version %8.8X%s\n%s%s\n%s\n", \
>  	prefix, ACPICA_NAME, \
> -	prefix, utility_name, ((u32) ACPI_CA_VERSION), ACPI_WIDTH, __DATE__, \
> +	prefix, utility_name, ((u32) ACPI_CA_VERSION), ACPI_WIDTH, \
>  	prefix, ACPICA_COPYRIGHT, \
>  	prefix
> 
> --
> 2.1.3


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

* Re: [PATCH 3/3] ACPICA: Remove use of __DATE__ macro
  2015-01-05  8:47   ` Zheng, Lv
@ 2015-01-05 10:26     ` Rasmus Villemoes
  2015-01-06  0:30       ` Zheng, Lv
  0 siblings, 1 reply; 7+ messages in thread
From: Rasmus Villemoes @ 2015-01-05 10:26 UTC (permalink / raw)
  To: Zheng, Lv
  Cc: linux-acpi@vger.kernel.org, devel@acpica.org,
	linux-kernel@vger.kernel.org

On Mon, Jan 05 2015, "Zheng, Lv" <lv.zheng@intel.com> wrote:

> Hi,
>
>> From: Rasmus Villemoes [mailto:linux@rasmusvillemoes.dk]
>> Sent: Friday, December 12, 2014 6:51 PM
>> To: Zheng, Lv
>> Cc: Rasmus Villemoes; linux-acpi@vger.kernel.org; devel@acpica.org; linux-kernel@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 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.

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] 7+ messages in thread

* RE: [PATCH 3/3] ACPICA: Remove use of __DATE__ macro
  2015-01-05 10:26     ` Rasmus Villemoes
@ 2015-01-06  0:30       ` Zheng, Lv
  2015-01-06 19:36         ` [Devel] " David E. Box
  0 siblings, 1 reply; 7+ messages in thread
From: Zheng, Lv @ 2015-01-06  0:30 UTC (permalink / raw)
  To: Rasmus Villemoes
  Cc: linux-acpi@vger.kernel.org, devel@acpica.org,
	linux-kernel@vger.kernel.org

Hi,

> From: Rasmus Villemoes [mailto:linux@rasmusvillemoes.dk]
> Sent: Monday, January 05, 2015 6:27 PM
> 
> On Mon, Jan 05 2015, "Zheng, Lv" <lv.zheng@intel.com> wrote:
> 
> > Hi,
> >
> >> From: Rasmus Villemoes [mailto:linux@rasmusvillemoes.dk]
> >> Sent: Friday, December 12, 2014 6:51 PM
> >> To: Zheng, Lv
> >> Cc: Rasmus Villemoes; linux-acpi@vger.kernel.org; devel@acpica.org; linux-kernel@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] 7+ messages in thread

* 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
  2015-01-13  2:33           ` Zheng, Lv
  0 siblings, 1 reply; 7+ messages in thread
From: David E. Box @ 2015-01-06 19:36 UTC (permalink / raw)
  To: Zheng, Lv
  Cc: Rasmus Villemoes, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org, devel@acpica.org

On Tue, Jan 06, 2015 at 12:30:05AM +0000, Zheng, Lv wrote:
> Hi,
> 
> > From: Rasmus Villemoes [mailto:linux@rasmusvillemoes.dk]
> > Sent: Monday, January 05, 2015 6:27 PM
> > 
> > On Mon, Jan 05 2015, "Zheng, Lv" <lv.zheng@intel.com> wrote:
> > 
> > > Hi,
> > >
> > >> From: Rasmus Villemoes [mailto:linux@rasmusvillemoes.dk]
> > >> Sent: Friday, December 12, 2014 6:51 PM
> > >> To: Zheng, Lv
> > >> Cc: Rasmus Villemoes; linux-acpi@vger.kernel.org; devel@acpica.org; linux-kernel@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] 7+ messages in thread

* RE: [Devel] [PATCH 3/3] ACPICA: Remove use of __DATE__ macro
  2015-01-06 19:36         ` [Devel] " David E. Box
@ 2015-01-13  2:33           ` Zheng, Lv
  2015-01-13  5:42             ` Zheng, Lv
  0 siblings, 1 reply; 7+ messages in thread
From: Zheng, Lv @ 2015-01-13  2:33 UTC (permalink / raw)
  To: Rasmus Villemoes
  Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	devel@acpica.org, David E. Box

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@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@rasmusvillemoes.dk]
> > > Sent: Monday, January 05, 2015 6:27 PM
> > >
> > > On Mon, Jan 05 2015, "Zheng, Lv" <lv.zheng@intel.com> wrote:
> > >
> > > > Hi,
> > > >
> > > >> From: Rasmus Villemoes [mailto:linux@rasmusvillemoes.dk]
> > > >> Sent: Friday, December 12, 2014 6:51 PM
> > > >> To: Zheng, Lv
> > > >> Cc: Rasmus Villemoes; linux-acpi@vger.kernel.org; devel@acpica.org; linux-kernel@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] 7+ 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
  0 siblings, 0 replies; 7+ messages in thread
From: Zheng, Lv @ 2015-01-13  5:42 UTC (permalink / raw)
  To: Zheng, Lv, Rasmus Villemoes
  Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	devel@acpica.org

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@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@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@rasmusvillemoes.dk]
> > > > Sent: Monday, January 05, 2015 6:27 PM
> > > >
> > > > On Mon, Jan 05 2015, "Zheng, Lv" <lv.zheng@intel.com> wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > >> From: Rasmus Villemoes [mailto:linux@rasmusvillemoes.dk]
> > > > >> Sent: Friday, December 12, 2014 6:51 PM
> > > > >> To: Zheng, Lv
> > > > >> Cc: Rasmus Villemoes; linux-acpi@vger.kernel.org; devel@acpica.org; linux-kernel@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@acpica.org
> https://lists.acpica.org/mailman/listinfo/devel

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

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

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1418381488-25123-1-git-send-email-linux@rasmusvillemoes.dk>
2014-12-12 10:51 ` [PATCH 3/3] ACPICA: Remove use of __DATE__ macro Rasmus Villemoes
2015-01-05  8:47   ` Zheng, Lv
2015-01-05 10:26     ` Rasmus Villemoes
2015-01-06  0:30       ` Zheng, Lv
2015-01-06 19:36         ` [Devel] " David E. Box
2015-01-13  2:33           ` Zheng, Lv
2015-01-13  5:42             ` Zheng, Lv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox