b += c; nr -= c; 
static ssize_t write_chan(struct tty_struct * tty, struct file * file,			  const unsigned char * buf, size_t nr){	const unsigned char *b = buf;	DECLARE_WAITQUEUE(wait, current);	int c;	ssize_t retval = 0;	/* Job control check -- must be done at start (POSIX.1 7.1.1.4). */	if (L_TOSTOP(tty) && file->f_op->write != redirected_tty_write) {		retval = tty_check_change(tty);		if (retval)			return retval;	}	add_wait_queue(&tty->write_wait, &wait);	while (1) {		set_current_state(TASK_INTERRUPTIBLE);		if (signal_pending(current)) {			retval = -ERESTARTSYS;			break;		}		if (tty_hung_up_p(file) || (tty->link && !tty->link->count)) {			retval = -EIO;			break;		}		if (O_OPOST(tty) && !(test_bit(TTY_HW_COOK_OUT, &tty->flags))) {			while (nr > 0) {				ssize_t num = opost_block(tty, b, nr);				if (num < 0) {					if (num == -EAGAIN)						break;					retval = num;					goto break_out;				}				b += num;				nr -= num;				if (nr == 0)					break;				c = *b;				if (opost(c, tty) < 0)					break;				b++; nr--;			}			if (tty->driver->flush_chars)				tty->driver->flush_chars(tty);		} else {			c = tty->driver->write(tty, b, nr);			if (c < 0) {				retval = c;				goto break_out;			}			b += c;			nr -= c;		}		if (!nr)			break;		if (file->f_flags & O_NONBLOCK) {			retval = -EAGAIN;			break;		}		schedule();	}break_out:	__set_current_state(TASK_RUNNING);	remove_wait_queue(&tty->write_wait, &wait);	return (b - buf) ? b - buf : retval;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/d6afe27bfff30fbec2cca6ad5626c22f4094d770/n_tty.c/clean/drivers/char/n_tty.c