Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757114AbdLQKWi (ORCPT ); Sun, 17 Dec 2017 05:22:38 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:41410 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752063AbdLQKWg (ORCPT ); Sun, 17 Dec 2017 05:22:36 -0500 X-Google-Smtp-Source: ACJfBov06GMDEhEWECi40IHCdK93Kc31vHocQoT4usXTDMtuNHXTMFh2GQ6OXqwvClFE4YYi8EDhIw== From: Pravin Shedge To: dave@stgolabs.net, akpm@linux-foundation.org, linux-kernel@vger.kernel.org Cc: pravin.shedge4linux@gmail.com Subject: [PATCH 2/2] lib: cleanup dead code from rbtree_test.c Date: Sun, 17 Dec 2017 15:52:19 +0530 Message-Id: <1513506139-7941-1-git-send-email-pravin.shedge4linux@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 950 Lines: 34 lib/rbtree_test.c code allows to compile either as a loadable modules or builtin into the kernel. Current code returns -EAGAIN on successful termination from module_init. Such a fail will directly unload the module and hence there is no scope to execute rbtree_test_exit on module_exit. This patch will cleanup dead code from rbtree_test.c Signed-off-by: Pravin Shedge --- lib/rbtree_test.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/rbtree_test.c b/lib/rbtree_test.c index 7d36c1e..5cd2f26 100644 --- a/lib/rbtree_test.c +++ b/lib/rbtree_test.c @@ -397,13 +397,7 @@ static int __init rbtree_test_init(void) return -EAGAIN; /* Fail will directly unload the module */ } -static void __exit rbtree_test_exit(void) -{ - printk(KERN_ALERT "test exit\n"); -} - module_init(rbtree_test_init) -module_exit(rbtree_test_exit) MODULE_LICENSE("GPL"); MODULE_AUTHOR("Michel Lespinasse"); -- 2.7.4