Page MenuHomeFreeBSD

linuxkpi: Define `MIN_T()` and `MAX_T()`
ClosedPublic

Authored by dumbbell on Sun, Mar 8, 1:26 PM.
Tags
None
Referenced Files
F151261053: D55739.id.diff
Tue, Apr 7, 4:31 AM
Unknown Object (File)
Sat, Apr 4, 9:16 PM
Unknown Object (File)
Sat, Apr 4, 6:06 PM
Unknown Object (File)
Mon, Mar 23, 12:44 AM
Unknown Object (File)
Mon, Mar 23, 12:44 AM
Unknown Object (File)
Sun, Mar 22, 12:24 AM
Unknown Object (File)
Fri, Mar 20, 6:00 AM
Unknown Object (File)
Thu, Mar 19, 10:35 PM
Subscribers

Details

Summary

There are the same as MIN() and MAX() except that they take a type to cast both arguments to compare.

The DRM generic code started to use it in Linux 6.11.

This is part of the update of DRM drivers to Linux 6.11.

Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

I think we want ()s
Considering uses like MIN_T(int, a - b, a + b)

sys/compat/linuxkpi/common/include/linux/minmax.h
63

Use parenthesis as suggested by @emaste.

This revision is now accepted and ready to land.Mon, Mar 9, 1:13 AM
This revision was automatically updated to reflect the committed changes.