On Thu, 3 Sep 2026 18:37:36 +0100
Vincent Donnefort <[email protected]> wrote:

> > >  static bool rb_cpu_meta_valid(struct ring_buffer_cpu_meta *meta, int cpu,
> > > -                       struct trace_buffer *buffer, int nr_pages,
> > > +                       struct trace_buffer *buffer, unsigned long 
> > > nr_pages,
> > >                         unsigned long *subbuf_mask)
> > >  {
> > > - int subbuf_size = PAGE_SIZE;
> > > + unsigned long subbuf_size = PAGE_SIZE;  
> > 
> > Why the long? Shouldn't it be unsigned int?  
> 
> That is to cheat to not have to add a cast in
> 
>   buffers_end = meta->first_buffer + (subbuf_size * meta->nr_subbufs);

Hmm, it's only reference once in that function. We could just replace it
with using PAGE_SIZE directly.

        buffers_end = meta->first_buffer + (meta->nr_subbufs * PAGE_SIZE);

-- Steve

Reply via email to