~emersion/drmdb

d6a840131b8621f27b56e23188e1ad1c60735992 — Simon Ser 4 months ago 6678e6f
Ignore zero version date when comparing

With [1], drivers will stop reporting the date: newer kernels will
always report "0". Don't assume that the driver is older in that case.

[1]: https://lore.kernel.org/all/20240510090951.3398882-1-jani.nikula@intel.com/
1 files changed, 2 insertions(+), 1 deletions(-)

M drmtree/drmtree.go
M drmtree/drmtree.go => drmtree/drmtree.go +2 -1
@@ 36,7 36,8 @@ func (ver *DriverVersion) Less(other *DriverVersion) bool {
		} else if ver.Minor == other.Minor {
			if ver.Patch < other.Patch {
				return true
			} else if ver.Patch == other.Patch {
			} else if ver.Patch == other.Patch && ver.Date != "0" && other.Date != "0" {
				// "0" means unset
				return ver.Date < other.Date
			}
		}