# Re: \[PATCH v3 07/11\] tty: improve tty\_insert\_flip\_char() fast path

- From: kbuild test robot \<hidden\>
- Date: 2017-06-25 02:34:39 
- List: netdev
- Page: https://ratatoskr.run/netdev/2017/06/5029032
- Thread: https://ratatoskr.run/netdev/2017/06/5027763/t.md

```text
Hi Arnd,

[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on v4.12-rc6 next-20170623]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Arnd-Bergmann/bring-back-stack-frame-warning-with-KASAN/20170625-071646
base:   git://linuxtv.org/media_tree.git master
config: x86_64-randconfig-b0-06250903 (attached as .config)
compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   drivers/tty/tty_buffer.c: In function '__tty_insert_flip_char':
>> drivers/tty/tty_buffer.c:376: warning: unused variable 'flags'

vim +/flags +376 drivers/tty/tty_buffer.c

   360		return copied;
   361	}
   362	EXPORT_SYMBOL(tty_insert_flip_string_flags);
   363	
   364	/**
   365	 *	__tty_insert_flip_char   -	Add one character to the tty buffer
   366	 *	@port: tty port
   367	 *	@ch: character
   368	 *	@flag: flag byte
   369	 *
   370	 *	Queue a single byte to the tty buffering, with an optional flag.
   371	 *	This is the slow path of tty_insert_flip_char.
   372	 */
   373	int __tty_insert_flip_char(struct tty_port *port, unsigned char ch, char flag)
   374	{
   375		struct tty_buffer *tb = port->buf.tail;
 > 376		int flags = (flag == TTY_NORMAL) ? TTYB_NORMAL : 0;
   377	
   378		if (!tty_buffer_request_room(port, 1))
   379			return 0;
   380	
   381		*flag_buf_ptr(tb, tb->used) = flag;
   382		*char_buf_ptr(tb, tb->used++) = ch;
   383	
   384		return 1;

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
```

## Attachments

- [.config.gz](https://ratatoskr.run/netdev/2017/06/5029032/attachment/0) (application/gzip, 29450 bytes)
