Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1111290imu; Thu, 22 Nov 2018 10:15:37 -0800 (PST) X-Google-Smtp-Source: AFSGD/WN+Gh4X7IHSL12EklHnvgh5JStZ5c0mKkktRTe6X++JjclVIwI1GBTiGDlFOs4ZqWLor1j X-Received: by 2002:a17:902:6b01:: with SMTP id o1-v6mr12483778plk.333.1542910537504; Thu, 22 Nov 2018 10:15:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542910537; cv=none; d=google.com; s=arc-20160816; b=JGzFENXsZcRidaN97hdHp3gPegVN++uGq9XfNTwUXodRfwvd7joiva1ybOdDesulPn hpdpNyFihw+a5fHjOLFcLEHqBduE249xCBsnr2mexdp/fJoN985wB7ns+wCZk6n/A7Br 2zOXTffXsjbf7LqLDBzfNjr1GyccyWBF9Spl8lvryyXBq/OR9uvik6jy+LJ/Z4ABZUCa 0O0W32zKtq6g6kS4/IchLRIMdpRqLT0GkvTLeKKoqsfnCU0PVDNVxpRZLOr7M44vN7BX MMzR02ahdROUKmutqlHy0bbjkp9OJkY3vWUDf4TlEXVq9BDDj7jKB8H6Njm8Q0jeEv+g sdOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=Mp5fPy/o2hRVl9H+yzivMDZL8PhAgo+GDkc1hB3mGrk=; b=WXqTSPuTVARUd7TLprvPMfw0Pg/US2g1yGtZTEWm82PxOA002E6oHNUIbq+LZPkisC SnTrKpqU5eee5VF1CXAe6aLl8degNkz2pjokCCCT8MvDpbJGRa4Vf1HyayIfRu4foe/r 6Pk2oy5EIx6P6+UKz8MvisfLGxDcDhptLuY06o8j9SArNB1MuXcE+yw058N6SvqR+Qz4 RBNqLkGWytqeV+588r4gPsx3mIdF3d2ifHW6tuG/8orh+7aXxDdtYaKHbpvvttnOZTfN rsqNNsfDiOseDNP9TACNWn5f1GVDWREp1h0Y2io7g5bEbEeQu/QnTb88O0frNyQpntIN ujhw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c10si2576980pla.173.2018.11.22.10.15.19; Thu, 22 Nov 2018 10:15:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392055AbeKVPP4 (ORCPT + 99 others); Thu, 22 Nov 2018 10:15:56 -0500 Received: from mail5.windriver.com ([192.103.53.11]:53136 "EHLO mail5.wrs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388948AbeKVPPz (ORCPT ); Thu, 22 Nov 2018 10:15:55 -0500 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail5.wrs.com (8.15.2/8.15.2) with ESMTPS id wAM4XWFb012233 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Wed, 21 Nov 2018 20:33:43 -0800 Received: from yow-cube1.wrs.com (128.224.56.98) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.3.408.0; Wed, 21 Nov 2018 20:33:22 -0800 From: Paul Gortmaker To: Lee Jones CC: , Paul Gortmaker , Arnd Bergmann , Cory Maccarrone , Dong Aisheng , Graeme Gregory , Guennadi Liakhovetski , Haojian Zhuang , Jorge Eduardo Candelaria , Laxman Dewangan , Linus Walleij , Mattias Nilsson , Tony Lindgren , , , Support Opensource Subject: [PATCH 00/11] mfd: simple demodularization of non-modular drivers Date: Wed, 21 Nov 2018 23:32:48 -0500 Message-ID: <1542861179-8941-1-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This group of MFD drivers are all controlled by "bool" Kconfig settings, but contain traces of module infrastructure like unused/orphaned __exit functions, use of and/or MODULE_ macros that are no-ops in the non-modular case. We can remove/replace all of the above. We are trying to make driver code consistent with the Makefiles/Kconfigs that control them. This means not using modular functions/macros for drivers that can never be built as a module. Some of the downfalls this leads to are: (1) it is easy to accidentally write 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, thus adding to CPP overhead. (4) it gets copied/replicated into other drivers and spreads quickly. The changes here should represent zero runtime changes. Only the ones with removed __exit functions will have a slightly smaller object size. The source gets a net reduction of 100+ lines of unused code. Build testing was done on drivers/mfd for allyesconfig on x86_64, ARM and ARM-64. Paul. --- Cc: Arnd Bergmann Cc: Cory Maccarrone Cc: Dong Aisheng Cc: Graeme Gregory Cc: Guennadi Liakhovetski Cc: Haojian Zhuang Cc: Jorge Eduardo Candelaria Cc: Laxman Dewangan Cc: Lee Jones Cc: Linus Walleij Cc: Mattias Nilsson Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Cc: patches@opensource.cirrus.com Cc: Support Opensource Paul Gortmaker (11): mfd: as3711: Make it explicitly non-modular mfd: da9055-core: make it explicitly non-modular mfd: db8500-prcmu: drop unused MODULE_ tags from non-modular code mfd: htc-i2cpld: Make it explicitly non-modular mfd: max8925-core: drop unused MODULE_ tags from non-modular code mfd: rc5t583: Make it explicitly non-modular mfd: sta2x11: drop unused MODULE_ tags from non-modular code mfd: syscon: Make it explicitly non-modular mfd: tps65910: Make it explicitly non-modular mfd: wm831x-core: drop unused MODULE_ tags from non-modular code mfd: wm8400-core: Make it explicitly non-modular drivers/mfd/as3711.c | 14 -------------- drivers/mfd/da9055-core.c | 13 ++----------- drivers/mfd/db8500-prcmu.c | 10 ++++------ drivers/mfd/htc-i2cpld.c | 18 +----------------- drivers/mfd/max8925-core.c | 7 +------ drivers/mfd/rc5t583.c | 14 -------------- drivers/mfd/sta2x11-mfd.c | 10 ++++------ drivers/mfd/syscon.c | 12 +----------- drivers/mfd/tps65910.c | 18 +----------------- drivers/mfd/wm831x-core.c | 7 ++----- drivers/mfd/wm8400-core.c | 18 +++--------------- 11 files changed, 19 insertions(+), 122 deletions(-) -- 2.7.4