Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753456AbdLQLMH (ORCPT ); Sun, 17 Dec 2017 06:12:07 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:46166 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751398AbdLQLME (ORCPT ); Sun, 17 Dec 2017 06:12:04 -0500 X-Google-Smtp-Source: ACJfBosKsySXk5G+lxi3V7B8bdQlmeJ+GdbF1jkpcYaPCnb55V3qG42UshJhT/erZ3ppLFvXbSEc6w== From: Pravin Shedge To: linux-kernel@vger.kernel.org Cc: pravin.shedge4linux@gmail.com Subject: [PATCH 3/3] lib: cleanup dead code from lib/percpu_test.c Date: Sun, 17 Dec 2017 16:41:37 +0530 Message-Id: <1513509097-6697-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: 854 Lines: 31 lib/percpu_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 percpu_test_exit on module_exit. Signed-off-by: Pravin Shedge --- lib/percpu_test.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/percpu_test.c b/lib/percpu_test.c index 0b5d14d..ea31adb 100644 --- a/lib/percpu_test.c +++ b/lib/percpu_test.c @@ -126,12 +126,7 @@ static int __init percpu_test_init(void) return -EAGAIN; /* Fail will directly unload the module */ } -static void __exit percpu_test_exit(void) -{ -} - module_init(percpu_test_init) -module_exit(percpu_test_exit) MODULE_LICENSE("GPL"); MODULE_AUTHOR("Greg Thelen"); -- 2.7.4