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)
Feb 2 2024, 10:33 PM
Unknown Object (File)
Jan 27 2024, 5:41 AM
Unknown Object (File)
Dec 22 2023, 11:31 PM
Unknown Object (File)
Dec 20 2023, 3:26 AM
Unknown Object (File)
Dec 12 2023, 1:02 AM
Unknown Object (File)
Dec 5 2023, 3:06 PM
Unknown Object (File)
Nov 27 2023, 10:55 AM
Unknown Object (File)
Nov 25 2023, 8:04 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.