On 18/04/2024 10:00 am, Jan Beulich wrote: > On 15.04.2024 17:41, Andrew Cooper wrote: >> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> > While I don't mind the change as is, "sort" is ambiguous here in one regard. > Personally I'd prefer if those parts of the change were dropped, but I can > live with the sorting criteria being spelled out in the description: > >> @@ -40,13 +40,6 @@ >> >> ? cpu_offline_action arch-x86/xen-mca.h >> ? mc arch-x86/xen-mca.h >> -? mcinfo_bank arch-x86/xen-mca.h >> -? mcinfo_common arch-x86/xen-mca.h >> -? mcinfo_extended arch-x86/xen-mca.h >> -? mcinfo_global arch-x86/xen-mca.h >> -? mcinfo_logical_cpu arch-x86/xen-mca.h >> -? mcinfo_msr arch-x86/xen-mca.h >> -? mcinfo_recovery arch-x86/xen-mca.h >> ! mc_fetch arch-x86/xen-mca.h >> ? mc_info arch-x86/xen-mca.h >> ? mc_inject_v2 arch-x86/xen-mca.h >> @@ -54,6 +47,13 @@ >> ? mc_msrinject arch-x86/xen-mca.h >> ? mc_notifydomain arch-x86/xen-mca.h >> ! mc_physcpuinfo arch-x86/xen-mca.h >> +? mcinfo_bank arch-x86/xen-mca.h >> +? mcinfo_common arch-x86/xen-mca.h >> +? mcinfo_extended arch-x86/xen-mca.h >> +? mcinfo_global arch-x86/xen-mca.h >> +? mcinfo_logical_cpu arch-x86/xen-mca.h >> +? mcinfo_msr arch-x86/xen-mca.h >> +? mcinfo_recovery arch-x86/xen-mca.h >> ? page_offline_action arch-x86/xen-mca.h > Imo this sorting was fine (at least one further instance below): Whether > underscore sorts ahead of lower case letters depends on how sorting is done. > I take you assume sorting as per the C locale,
Indeed. > when the original sorting was > considering undercores to be separators, i.e. in a different character class > (together with e.g. dash or tilde). If _ is expected to be a separator, then the correct sorting would be: mc mc_fetch mc_info mcinfo_bank mcinfo_common mcinfo_extended mcinfo_global mcinfo_logical_cpu mcinfo_msr mcinfo_recovery mc_inject_v2 mc_mceinject which is definitely not what we want. This came specifically from `sort`, not something I did by hand. `LANG=C sort` gives the ordering presented in this patch. > > When using C local sorting, I think arch-x86/xen-@arch@.h also would need > moving past arch-x86/xen.h (whereas right now all separators are deemed > equal and hence @ comes ahead of h which in turn is ahead of m). `sort` agrees, so I'll do this too, and note it in the commit message. ~Andrew