From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752261AbbLMUFd (ORCPT ); Sun, 13 Dec 2015 15:05:33 -0500 Received: from mail1.windriver.com ([147.11.146.13]:39020 "EHLO mail1.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751924AbbLMUEp (ORCPT ); Sun, 13 Dec 2015 15:04:45 -0500 From: Paul Gortmaker To: CC: Paul Gortmaker , Jens Axboe , Vivek Goyal Subject: [PATCH 0/3] block: avoid module usage in non-modular code Date: Sun, 13 Dec 2015 15:04:01 -0500 Message-ID: <1450037044-27628-1-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.6.1 MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series of commits is a part of a larger project to ensure people don't reference modular support functions in non-modular code. Overall there was roughly 5k lines of dead code in the kernel due to this. So far we've fixed several areas, like tty, x86, net, ... and we continue to work on other areas. There are several reasons to not use module support for code that can never be built as a module, but the big ones are: (1) it is easy to accidentally code up unused module_exit and remove code (2) it can be misleading when reading the source, thinking it can be modular when the Makefile and/or Kconfig prohibit it (3) it requires the include of the module.h header file which in turn includes nearly everything else. The block layer is an easy one as far as this cleanup goes. Only three files touched, and two of the three don't even change the compiled objects -- only the noop-iosched had an unused exit function removed. Cc: Jens Axboe Cc: Vivek Goyal Paul Gortmaker (3): block: make genhd.c slightly more explicitly non-modular block: make blk-throttle.c explicitly non-modular block: make noop-iosched.c explicitly non-modular block/blk-throttle.c | 5 ++--- block/genhd.c | 2 +- block/noop-iosched.c | 19 ++++--------------- 3 files changed, 7 insertions(+), 19 deletions(-) -- 2.6.1