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 <willmcvicker@google.com>
This commit is contained in:
Will McVicker 2021-02-22 09:44:24 -08:00
parent 49121c77df
commit adc53e1fd0
2 changed files with 2 additions and 4 deletions

View File

@ -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 <willmcvicker@google.com>
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

View File

@ -101,10 +101,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),)