Page MenuHomeFreeBSD

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

Authored by dumbbell on Sun, Mar 8, 1:26 PM.
Tags
None
Referenced Files
F147776767: D55739.diff
Fri, Mar 13, 2:11 PM
Unknown Object (File)
Fri, Mar 13, 12:58 AM
Unknown Object (File)
Wed, Mar 11, 1:01 AM
Unknown Object (File)
Sun, Mar 8, 6:06 PM
Subscribers

Details

Reviewers
emaste
bz
Group Reviewers
linuxkpi
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