lkml.org 
[lkml]   [2018]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 3/7] mhi_bus: core: add support for data transfer
On Mon, Jul 09, 2018 at 01:08:10PM -0700, Sujeev Dias wrote:
> +static void mhi_add_ring_element(struct mhi_controller *mhi_cntrl,
> + struct mhi_ring *ring)
> +{
> + ring->wp += ring->el_size;
> + if (ring->wp >= (ring->base + ring->len))
> + ring->wp = ring->base;
> + /* smp update */
> + smp_wmb();

Why do this? You need to comment the heck out of odd stuff like this.

Also, why are you using your own ring buffer code? What's wrong with
the code that is in the kernel already for this type of thing?

thanks,

greg k-h

\
 
 \ /
  Last update: 2018-07-10 08:30    [W:0.127 / U:10.648 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site