* [openeuler:OLK-5.10 2820/30000] drivers/tty/tty_buffer.c:175:2: error: implicit declaration of function 'printk_safe_enter'
@ 2024-09-14 2:35 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-09-14 2:35 UTC (permalink / raw)
To: kernel, Zheng Zengkai; +Cc: oe-kbuild-all
tree: https://gitee.com/openeuler/kernel.git OLK-5.10
head: 5a1d9701155c6908c76c68951170f10279685143
commit: 923efc4dc37c1a7cc91f0dd5dbdc87e0943ad1ae [2820/30000] tty: fix possible deadlock in console_unlock
config: x86_64-buildonly-randconfig-003-20240914 (https://download.01.org/0day-ci/archive/20240914/202409141036.Dno2bUGL-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240914/202409141036.Dno2bUGL-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409141036.Dno2bUGL-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/tty/tty_buffer.c:175:2: error: implicit declaration of function 'printk_safe_enter' [-Werror,-Wimplicit-function-declaration]
175 | printk_safe_enter();
| ^
drivers/tty/tty_buffer.c:175:2: note: did you mean 'printk_nmi_enter'?
include/linux/printk.h:158:20: note: 'printk_nmi_enter' declared here
158 | static inline void printk_nmi_enter(void) { }
| ^
>> drivers/tty/tty_buffer.c:177:2: error: implicit declaration of function 'printk_safe_exit' [-Werror,-Wimplicit-function-declaration]
177 | printk_safe_exit();
| ^
2 errors generated.
vim +/printk_safe_enter +175 drivers/tty/tty_buffer.c
142
143 /**
144 * tty_buffer_alloc - allocate a tty buffer
145 * @port: tty port
146 * @size: desired size (characters)
147 *
148 * Allocate a new tty buffer to hold the desired number of characters.
149 * We round our buffers off in 256 character chunks to get better
150 * allocation behaviour.
151 * Return NULL if out of memory or the allocation would exceed the
152 * per device queue
153 */
154
155 static struct tty_buffer *tty_buffer_alloc(struct tty_port *port, size_t size)
156 {
157 struct llist_node *free;
158 struct tty_buffer *p;
159
160 /* Round the buffer size out */
161 size = __ALIGN_MASK(size, TTYB_ALIGN_MASK);
162
163 if (size <= MIN_TTYB_SIZE) {
164 free = llist_del_first(&port->buf.free);
165 if (free) {
166 p = llist_entry(free, struct tty_buffer, free);
167 goto found;
168 }
169 }
170
171 /* Should possibly check if this fails for the largest buffer we
172 have queued and recycle that ? */
173 if (atomic_read(&port->buf.mem_used) > port->buf.mem_limit)
174 return NULL;
> 175 printk_safe_enter();
176 p = kmalloc(sizeof(struct tty_buffer) + 2 * size, GFP_ATOMIC);
> 177 printk_safe_exit();
178 if (p == NULL)
179 return NULL;
180
181 found:
182 tty_buffer_reset(p, size);
183 atomic_add(size, &port->buf.mem_used);
184 return p;
185 }
186
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-09-14 2:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-14 2:35 [openeuler:OLK-5.10 2820/30000] drivers/tty/tty_buffer.c:175:2: error: implicit declaration of function 'printk_safe_enter' kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.