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
Unknown Object (File)
Sat, Mar 28, 4:03 AM
Unknown Object (File)
Fri, Mar 27, 10:31 AM
Unknown Object (File)
Sun, Mar 22, 12:28 AM
Unknown Object (File)
Sat, Mar 21, 7:53 PM
Unknown Object (File)
Sun, Mar 15, 12:21 PM
Unknown Object (File)
Sun, Mar 15, 1:47 AM
Unknown Object (File)
Sat, Mar 14, 10:23 PM
Unknown Object (File)
Sun, Mar 8, 7:08 AM
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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 38691
Build 35580: arc lint + arc unit

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.