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
F168920181: D29840.id92877.diff
Sun, Aug 30, 6:39 PM
F168912448: D29840.id87722.diff
Sun, Aug 30, 5:35 PM
F168894984: D29840.id.diff
Sun, Aug 30, 3:52 PM
F168888558: D29840.diff
Sun, Aug 30, 3:17 PM
Unknown Object (File)
Wed, Aug 26, 4:03 AM
Unknown Object (File)
Mon, Aug 10, 1:11 PM
Unknown Object (File)
Mon, Aug 10, 12:25 PM
Unknown Object (File)
Mon, Aug 10, 12:23 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.