Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751224AbdLSRwA (ORCPT ); Tue, 19 Dec 2017 12:52:00 -0500 Received: from mail-it0-f65.google.com ([209.85.214.65]:41247 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750798AbdLSRv6 (ORCPT ); Tue, 19 Dec 2017 12:51:58 -0500 X-Google-Smtp-Source: ACJfBosRqcWCALs/x4wfP9f7oBI6090+SEOQT5ZD1EZApAZs8z2rA9TvEIlgNOEBVwLz4FoJZ3MY+w+VEbYSPHjf5X0= MIME-Version: 1.0 In-Reply-To: <20171217155540.rscp7boal3wx6x5g@linux-n805> References: <1513506139-7941-1-git-send-email-pravin.shedge4linux@gmail.com> <20171217155540.rscp7boal3wx6x5g@linux-n805> From: Pravin Shedge Date: Tue, 19 Dec 2017 23:21:58 +0530 Message-ID: Subject: Re: [PATCH 2/2] lib: cleanup dead code from rbtree_test.c To: Davidlohr Bueso Cc: Andrew Morton , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1541 Lines: 54 On Sun, Dec 17, 2017 at 9:25 PM, Davidlohr Bueso wrote: > On Sun, 17 Dec 2017, Pravin Shedge wrote: > >> 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 > > > Being completely harmless I'd rather leave this as is. If removed, the > module breaks generic layout. > Right this code is not harmless but at the same time I am not sure How other modules [from lib/test_sort.c] added in kernel ? Little curious, Just for my knowledge how it breaks generic layout ? and what will be the impact ? > Thanks, > Davidlohr > > >> >> 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 >> >