diff mbox

[3/3] ACPICA: Remove use of __DATE__ macro

Message ID 1418381488-25123-3-git-send-email-linux@rasmusvillemoes.dk (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Rasmus Villemoes Dec. 12, 2014, 10:51 a.m. UTC
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(-)

Comments

Lv Zheng Jan. 5, 2015, 8:47 a.m. UTC | #1
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

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rasmus Villemoes Jan. 5, 2015, 10:26 a.m. UTC | #2
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
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Lv Zheng Jan. 6, 2015, 12:30 a.m. UTC | #3
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
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David E. Box Jan. 6, 2015, 7:36 p.m. UTC | #4
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
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Lv Zheng Jan. 13, 2015, 2:33 a.m. UTC | #5
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
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Lv Zheng Jan. 13, 2015, 5:42 a.m. UTC | #6
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
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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