From: Peter Hurley Date: Sat, 15 Jun 2013 14:04:22 +0000 (-0400) Subject: n_tty: Use separate head and tail indices for echo_buf X-Git-Tag: v3.12-rc1~182^2~180 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=addaebccf63a8c9f7c7a62ce1ceb9da4307c5a1c;p=pandora-kernel.git n_tty: Use separate head and tail indices for echo_buf Instead of using a single index to track the current echo_buf position, use a head index when adding to the buffer and a tail index when consuming from the buffer. Allow these head and tail indices to wrap at max representable value; perform modulo reduction via helper functions when accessing the buffer. Signed-off-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed