From 600066b974ad6f54cd76d185c0b65a893145a5fc Mon Sep 17 00:00:00 2001 From: Will McVicker Date: Mon, 22 Feb 2021 09:44:24 -0800 Subject: [PATCH] ANDROID: modpost: update nits from late review Updates the documentation and comments for the MODULE_SCMVERSION feature. Bug: 180027765 Fixes: 4b9c11a37374a ("ANDROID: modules: introduce the MODULE_SCMVERSION config") Change-Id: I648b31c4810c777ec3d2cb141b61f5924559c76f Signed-off-by: Will McVicker --- Documentation/ABI/stable/sysfs-module | 2 +- scripts/Makefile.modpost | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Documentation/ABI/stable/sysfs-module b/Documentation/ABI/stable/sysfs-module index a75d137e79f4..46bcd2d00c96 100644 --- a/Documentation/ABI/stable/sysfs-module +++ b/Documentation/ABI/stable/sysfs-module @@ -35,7 +35,7 @@ Description: What: /sys/module/MODULENAME/scmversion Date: November 2020 -KernelVersion: 5.12 +KernelVersion: Android Common Kernel -- android12-5.10+ Contact: Will McVicker Description: This read-only file will appear if modpost was supplied with an SCM version for the module. It can be enabled with the config diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index 69d74661d3d5..0fde9ef49e46 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost @@ -98,10 +98,8 @@ endif endif ifeq ($(CONFIG_MODULE_SCMVERSION),y) -# Get the SCM version of the module. Sed verifies setlocalversion returns +# Get the SCM version of the module. `sed` verifies setlocalversion returns # a proper revision based on the SCM type, e.g. git, mercurial, or svn. -# Note: relative M= paths are not supported when building the kernel out of the -# srctree since setlocalversion won't be able to find the module srctree. module_scmversion := $(shell $(srctree)/scripts/setlocalversion $(module_srcpath) | \ sed -n 's/.*-\(\(g\|hg\)[a-fA-F0-9]\+\(-dirty\)\?\|svn[0-9]\+\).*/\1/p') ifneq ($(module_scmversion),)