From patchwork Fri Jan 29 15:58:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 8164591 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 608FFBEEE5 for ; Fri, 29 Jan 2016 15:58:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5098520389 for ; Fri, 29 Jan 2016 15:58:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 34AFC20383 for ; Fri, 29 Jan 2016 15:58:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932208AbcA2P6W (ORCPT ); Fri, 29 Jan 2016 10:58:22 -0500 Received: from mail-ig0-f195.google.com ([209.85.213.195]:36409 "EHLO mail-ig0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932179AbcA2P6V convert rfc822-to-8bit (ORCPT ); Fri, 29 Jan 2016 10:58:21 -0500 Received: by mail-ig0-f195.google.com with SMTP id o2so4713112iga.3; Fri, 29 Jan 2016 07:58:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=D81XxsrQQGYF7waSY2n31bUDCCvVMsoCgmEnjCM6RTU=; b=HbuPhzewJC7t9IAfdOIr15ri/KY8ELUtioHU/prbNL+B6yfFV0CrmxHUC+GhDop+rf E48heRpI6aWaUpZ2Mmvz3T2Yg2fxee7R6fTSjUHfxm7La6cGQfheUMIz9nJO24SVXlL6 w4Ds9pVCzBcdHiPxZ0zMRLhPZNSK3otrYzBZBSB1Og8XHeS04Sz9vhWPfE2WhKNcBaPV 24Vk+JkYcNkE+QcWBYGT5J5Hcx7yHC8bVuu982I36ifW2sTtSl1diiJbsdHvdBkM9D6a g6wORcL/rej6hSknQsHFZ+0Mz12CsbJkVQ3Kgr5389r+D0Bj5s4sHY8MZ3A0bkie0diH vn/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=D81XxsrQQGYF7waSY2n31bUDCCvVMsoCgmEnjCM6RTU=; b=Iy3a+poli/0xBCW4WgGzit1FFOXmgpVuha4+8J1N2a39QXp17kxRbTv048wbel6ofM Qe/CkbevrkQGXgbXVWRrYSnZXz2yL20qNiubcdOOynAW6hqgOnUruEf409ZbFfmGD9Qn JP19/hrXHlP66/95aulit21jEHvP+4Nkoi47/lGa/k/SfwEswUw1NUzshVYS5vBzuWv5 vb7WQS7LcNuukBedP5xDSNxVZEW8TaCz2HTmJlv5k3984TJb9oiCV3ANzmdhvpCUn7E6 R/mRe/UuAkKLfzFZ9gQCtJbpsgVT5UyCfs3UATM6ADmsnGKIK+5ySxrghP7ROGL9yWZ4 HjXA== X-Gm-Message-State: AG10YOTAPGzodZjqDszClt6qV8XdzNjePCY55/BK9GKbiZgeFStwSgIQ5JBiN1tGV4+yTwZMncfYBzVJlGBUEQ== MIME-Version: 1.0 X-Received: by 10.50.156.35 with SMTP id wb3mr10574734igb.55.1454083101049; Fri, 29 Jan 2016 07:58:21 -0800 (PST) Received: by 10.107.15.19 with HTTP; Fri, 29 Jan 2016 07:58:20 -0800 (PST) In-Reply-To: <87h9hxrkvs.fsf@rustcorp.com.au> References: <56A91B6A.2060205@oracle.com> <56AA98D6.7020305@oracle.com> <87h9hxrkvs.fsf@rustcorp.com.au> Date: Fri, 29 Jan 2016 15:58:20 +0000 X-Google-Sender-Auth: ERZUQ-xijiy_Lmqp3gasXKu84W0 Message-ID: Subject: Re: Duplicated module names From: Sudeep Holla To: Rusty Russell Cc: Lucas De Marchi , Samson Yeung , linux-modules , lkml , linux-crypto@vger.kernel.org, David Airlie , Tomi Valkeinen , Kyungmin Park , Greg Kroah-Hartman , Liam Girdwood , Mark Brown , Sudeep Holla Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, Jan 29, 2016 at 5:54 AM, Rusty Russell wrote: > Lucas De Marchi writes: >> Hi! >> >> CC'ing Rusty and mailing lists > > Thanks. > >> Rusty and ohers: it looks like both CONFIG_CRC32 and >> CONFIG_CRYPTO_CRC32 can be compiled as module, and they generate >> modules with the same name, crc32. Could that be fixed? > > Gah. Looks like it's been that way since at least 2014, too. > > I think we could rename it to crypto_crc32, but I don't think it's the > only one. Marco, I think depmod should probably FAIL if two modules > have the same name, which would at least find such problems. > > (BTW is there a nice way to figure out if a config var is a tristate? These > are only problematic if both CONFIG_ are tristate.) > > Here's a hacky attempt to look for problems: > > rusty@rusty-Lemur:~/devel/kernel/linux (master)$ KCONFIGS=`find * -name 'Kconfig*'`; for m in `find [b-z]* -name 'Makefile*'`; do sed -n 's,obj-\$(CONFIG.*+= \([a-z0-9_-]\+\.o\)$,'$m' \1,p' <$m | sort -u; done | sort -k 2 | uniq -D -f 1 | while read m obj; do fgrep -w $obj $m /dev/null; done | while read LINE; do conf=`echo $LINE | sed 's/.*\$(CONFIG_\([A-Z0-9_]*\).*/\1/'`; if grep -C2 "^config $conf\$" $KCONFIGS | fgrep -q tristate; then echo $LINE; fi; done > > Here are the results (mildly filtered by me): > [...] > > drivers/hwmon/Makefile:obj-$(CONFIG_SENSORS_VEXPRESS) += vexpress.o > drivers/regulator/Makefile:obj-$(CONFIG_REGULATOR_VEXPRESS) += vexpress.o > Indeed causes issues if both are built as modules, only once succeeds. I will post these 2 patches separately soon. -->8 From 1eb0d653d90e3f5fe05c6f63a17976226309e1ec Mon Sep 17 00:00:00 2001 From: Sudeep Holla Date: Fri, 29 Jan 2016 15:40:24 +0000 Subject: [PATCH 1/2] hwmon: (vexpress) rename vexpress hwmon implementation The vexpress hwmon implementation is currently just called vexpress. This is a problem because it clashes with another module with the same name in regulators. This patch renames the vexpress hwmon implementation to vexpress-hwmon so that there will be no clash in the module namespace. Reported-by: Rusty Russell Signed-off-by: Sudeep Holla --- drivers/hwmon/Makefile | 2 +- drivers/hwmon/{vexpress.c => vexpress-hwmon.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename drivers/hwmon/{vexpress.c => vexpress-hwmon.c} (100%) diff --git a/drivers/regulator/vexpress.c b/drivers/regulator/vexpress-regulator.c similarity index 100% rename from drivers/regulator/vexpress.c rename to drivers/regulator/vexpress-regulator.c diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile index 30c94df31465..cfc09711810c 100644 --- a/drivers/hwmon/Makefile +++ b/drivers/hwmon/Makefile @@ -149,7 +149,7 @@ obj-$(CONFIG_SENSORS_TMP103) += tmp103.o obj-$(CONFIG_SENSORS_TMP401) += tmp401.o obj-$(CONFIG_SENSORS_TMP421) += tmp421.o obj-$(CONFIG_SENSORS_TWL4030_MADC)+= twl4030-madc-hwmon.o -obj-$(CONFIG_SENSORS_VEXPRESS) += vexpress.o +obj-$(CONFIG_SENSORS_VEXPRESS) += vexpress-hwmon.o obj-$(CONFIG_SENSORS_VIA_CPUTEMP)+= via-cputemp.o obj-$(CONFIG_SENSORS_VIA686A) += via686a.o obj-$(CONFIG_SENSORS_VT1211) += vt1211.o diff --git a/drivers/hwmon/vexpress.c b/drivers/hwmon/vexpress-hwmon.c similarity index 100% rename from drivers/hwmon/vexpress.c rename to drivers/hwmon/vexpress-hwmon.c -- 1.9.1 From 1520bd20d3863df87ca5d9461bf5a20d3f58e385 Mon Sep 17 00:00:00 2001 From: Sudeep Holla Date: Fri, 29 Jan 2016 15:44:50 +0000 Subject: [PATCH 2/2] regulator: vexpress: rename vexpress regulator implementation The vexpress regulator implementation is currently just called vexpress. This is a problem because it clashes with another module with the same name in hardware monitors. This patch renames the vexpress regulator implementation to vexpress-regulator so that there will be no clash in the module namespace. Reported-by: Rusty Russell Signed-off-by: Sudeep Holla --- drivers/regulator/Makefile | 2 +- drivers/regulator/{vexpress.c => vexpress-regulator.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename drivers/regulator/{vexpress.c => vexpress-regulator.c} (100%) diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile index 980b1943fa81..755077a89a25 100644 --- a/drivers/regulator/Makefile +++ b/drivers/regulator/Makefile @@ -98,7 +98,7 @@ obj-$(CONFIG_REGULATOR_TPS65910) += tps65910-regulator.o obj-$(CONFIG_REGULATOR_TPS65912) += tps65912-regulator.o obj-$(CONFIG_REGULATOR_TPS80031) += tps80031-regulator.o obj-$(CONFIG_REGULATOR_TWL4030) += twl-regulator.o -obj-$(CONFIG_REGULATOR_VEXPRESS) += vexpress.o +obj-$(CONFIG_REGULATOR_VEXPRESS) += vexpress-regulator.o obj-$(CONFIG_REGULATOR_WM831X) += wm831x-dcdc.o obj-$(CONFIG_REGULATOR_WM831X) += wm831x-isink.o obj-$(CONFIG_REGULATOR_WM831X) += wm831x-ldo.o