On Thu, 27 Aug 2020 12:53:17 -0700 Shannon Nelson wrote: > On 8/27/20 12:46 PM, Jakub Kicinski wrote: > > On Thu, 27 Aug 2020 11:07:30 -0700 Shannon Nelson wrote: > >> + q_base = (void *)PTR_ALIGN((uintptr_t)new->q_base, PAGE_SIZE); > > The point of PTR_ALIGN is to make the casts unnecessary. Does it not > > work? > Here's what I see from two different compiler versions: > > drivers/net/ethernet/pensando/ionic/ionic_lif.c:514:9: warning: > assignment makes pointer from integer without a cast [-Wint-conversion] > q_base = PTR_ALIGN((uintptr_t)new->q_base, PAGE_SIZE); > > > drivers/net/ethernet/pensando/ionic/ionic_lif.c:514:9: warning: > assignment to 'void *' from 'long unsigned int' makes pointer from > integer without a cast [-Wint-conversion] > q_base = PTR_ALIGN((uintptr_t)new->q_base, PAGE_SIZE);
Just q_base = PTR_ALIGN(new->q_base, PAGE_SIZE);