Page MenuHomeFreeBSD

xen/grant_table: cleanup max_nr_grant_frames()
ClosedPublic

Authored by ehem_freebsd_m5p.com on Apr 19 2021, 5:46 PM.
Tags
None
Referenced Files
F135593630: D29840.id.diff
Tue, Nov 11, 3:27 AM
Unknown Object (File)
Thu, Nov 6, 9:42 AM
Unknown Object (File)
Sat, Nov 1, 1:10 AM
Unknown Object (File)
Wed, Oct 29, 2:01 PM
Unknown Object (File)
Wed, Oct 29, 1:59 PM
Unknown Object (File)
Oct 8 2025, 9:35 PM
Unknown Object (File)
Sep 25 2025, 10:46 PM
Unknown Object (File)
Sep 20 2025, 10:40 PM
Subscribers

Details

Summary

This is no more or less than returning the smaller of two values. Since
this is what min() does, use that to shrink max_nr_grant_frames() down
to the single line.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Looks fine to me. I was wondering if __max_nr_grant_frames() would be evaluated twice, but it seems not as min() is a static inline function, unlike the macro MIN().

This revision is now accepted and ready to land.Apr 24 2021, 6:15 PM
This revision was automatically updated to reflect the committed changes.