[PATCH v3] hyperv: simplify and rename generate_guest_id

Michael Kelley (LINUX) mikelley at microsoft.com
Mon Sep 26 21:54:30 PDT 2022


From: Olaf Hering <olaf at aepfle.de> Sent: Monday, September 26, 2022 12:57 AM
> 
> Sat, 24 Sep 2022 05:31:34 +0000 "Michael Kelley (LINUX)" <mikelley at microsoft.com>:
> 
> > From: Olaf Hering <olaf at aepfle.de> Sent: Friday, September 23, 2022 2:09 PM
> 
> > > A very long time ago I removed most usage of version.h AFAIR,
> > Could you elaborate?
> 
> It is the cost of 'make LOCALVERSION=x' vs. 'make LOCALVERSION=y'.
> 
> Too many drivers will be recompiled for no good reason as of today.
> I claim no consumer below drivers/ and sound/ has a valid usecase for version.h.
> But, someone else has to take the energy and argue them out of the tree.
> 
> With the proposed change every consumer of asm-generic/mshyperv.h will be dirty,
> see 'touch include/asm-generic/mshyperv.h' for the impact. Therefore I think
> only the two existing c files should include this header, in case the provided
> information has a true value for the consumer.
> 

Thanks, Olaf.  That makes sense and I agree.

Li Kunyu -- that means you should "undo" part of your patch.  Keep the use
of LINUX_VERSION_CODE and the #include of <linux/version.h> in the two
.c files, and pass LINUX_VERSION_CODE as an argument to hv_generate_guest_id().
Remove the #include of <linux/version.h> from include/asm-generic/mshyperv.h.

Michael



More information about the linux-arm-kernel mailing list