From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752625AbcAWISO (ORCPT ); Sat, 23 Jan 2016 03:18:14 -0500 Received: from mail-pa0-f68.google.com ([209.85.220.68]:36366 "EHLO mail-pa0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752095AbcAWIRZ (ORCPT ); Sat, 23 Jan 2016 03:17:25 -0500 From: Sergey Senozhatsky To: Andrew Morton Cc: Petr Mladek , Jan Kara , Tejun Heo , Kyle McMartin , Dave Jones , Calvin Owens , linux-kernel@vger.kernel.org, Sergey Senozhatsky , Sergey Senozhatsky Subject: [RFC][PATCH v3 3/4] printk: remove console_trylock_for_printk Date: Sat, 23 Jan 2016 17:15:12 +0900 Message-Id: <1453536913-9545-4-git-send-email-sergey.senozhatsky@gmail.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1453536913-9545-1-git-send-email-sergey.senozhatsky@gmail.com> References: <1453536913-9545-1-git-send-email-sergey.senozhatsky@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove console_trylock_for_printk() function, it can be replaced with console_trylock() in vprintk_emit(). Signed-off-by: Sergey Senozhatsky --- kernel/printk/printk.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index dc722fc..99925ce 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -1484,17 +1484,6 @@ static void zap_locks(void) sema_init(&console_sem, 1); } -/* - * Try to get console ownership to actually show the kernel - * messages from a 'printk'. Return true (and with the - * console_lock held, and 'console_locked' set) if it - * is successful, false otherwise. - */ -static int console_trylock_for_printk(void) -{ - return console_trylock(); -} - int printk_delay_msec __read_mostly; static inline void printk_delay(void) @@ -1791,7 +1780,7 @@ asmlinkage int vprintk_emit(int facility, int level, * semaphore. The release will print out buffers and wake up * /dev/kmsg and syslog() users. */ - if (console_trylock_for_printk()) + if (console_trylock()) console_unlock(); preempt_enable(); lockdep_on(); -- 2.7.0