[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1 of 5] xentrace: fix t_info_pages calculation for the default case
On 23/03/2011 10:12, "Jan Beulich" <JBeulich@xxxxxxxxxx> wrote: >> t_info_pages /= PAGE_SIZE; >> - if ( t_info_pages % PAGE_SIZE ) >> + if ( t_info_pages % PAGE_SIZE || t_info_pages == 0 ) > > While certainly not having a significant effect, to the unsuspecting > reader this looks like a bug - is it really meant to be a remainder > operation on the *result* of a division (rather than on the original > dividend)? Couldn't you just (ab)use PFN_UP() here? By which you mean to replace the division and subsequent if statement with t_info_pages = PFN_UP(t_info_pages). That would make sense to me. The suggested change in the patch series looks nonsensical. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |