Re: [kvm-unit-tests PATCH v3 10/10] x86: Remove size specifier from PAGE_SIZE constant

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 29, 2016 at 07:52:03PM +0200, Alexander Gordeev wrote:
> On Fri, Apr 29, 2016 at 04:53:43PM +0200, Andrew Jones wrote:
> > > -#define PAGE_SIZE   4096ul
> > > +#define PAGE_SIZE   4096
> > 
> > nack
> > 
> > If PAGE_SIZE is only an int (32bits) then PAGE_MASK, which is
> > (~(PAGE_SIZE-1)), would only be 0xfffff000, rather than
> > 0xfffffffffffff000, as it should be.
> 
> Oh, right. Thanks!

Well, sign-extension will apply to it. So, since we're almost always
going to use PAGE_MASK with a unsigned long variable, then most likely
it won't matter in practice. But, anyway, I'd keep the UL and drop
this patch :-)

drew

> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux