[PATCH 00/15 v6.6.y] Backport minmax.h updates from v6.17-rc7