Andi Kleen writes:
 > 
 > > +
 > > +  local_irq_save(flags);
 > > +  if (unlikely(buf->offset + length > chan->subbuf_size))
 > > +          length = relay_switch_subbuf(buf, length);
 > > +  memcpy(buf->data + buf->offset, data, length);
 > > +  buf->offset += length;
 > > +  local_irq_restore(flags);
 > > + 
 > > +  return length;
 > 
 > Is there any useful user case for returning length here? 
 > (e.g. are users likely to handle errors? I doubt it somehow) 
 > 
 > If not I would eliminate it.
 > 

The main reason would be that length would be 0 only if the buffers
were full, so the caller can suspend writing if it sees that, until
e.g. a daemon catches up.

Thanks for your other comments - I'll make those changes in the next
version.

Tom

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to