Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1685278rdb; Thu, 7 Dec 2023 06:18:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IFGqjghdVjK4NEUysNWVPVPQis1ztb/f971j6qZkwjjHDwM/DXlZSOMqKYx47/Aingp3tXh X-Received: by 2002:a17:90b:4d0f:b0:288:7113:bf with SMTP id mw15-20020a17090b4d0f00b00288711300bfmr1909513pjb.30.1701958711707; Thu, 07 Dec 2023 06:18:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701958711; cv=none; d=google.com; s=arc-20160816; b=SfKDLGEuO1KqxSnHbcDr78nWEN8RGTcRdl3HTvGNcvOmQlpr07Gslg4M1Cxd9KkCQi IviCP+gTFAkuag+xAQbRISiwM3QzARF+1dYnn/uAjivZT/WKqCJ1yRzkMz4zwU6sTGkI DlOlMqyzzbvCsG17NsApGt+bLf1PxsPcQ25Ghwxw7iuVvQ3P3IMeS7XN0JtVGxiUqvyh 5HNpERFPri5JJCTMF9IxbVZJ3kXUQ5BUIMyeLnAxlH3zCaAB992Gvk5SmKQ0uKECws1A +LBvo+sM22adA/1K60CDZN/l1hFzmnOHPbMT1BWl9/0fzkUCgbQ6+J0zdZPG8Nk7459e bAZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MAefPazajP3NkyG9JFZ1Fc1RX/jv3vW5FVXUfw3ztWo=; fh=2EyuYZuFv7pvbWODgXyYvSVo1Jt/nOD9U4n59BuOM5Q=; b=ZRLFcijWOld+wo3LZJxDRGFC11keTus2Pjl1IqZGIFEFRvxJJrzzAs9/mF9kzdjKuF vMvrd2BikI9/dy7flVyyf5sL23KDzXonLkcje2EMqB8uHhiUxPZRFWqfQKi+qOjLJJXt xb0m5Dy+UwuS08VF0izjNsAAKHzceqvYstr3Et1ExAZfDOIL6qa6gX0qZ08+g/4ntbxE pJyNrPm/2UOPCgMwqiZRYrllvPR5bLw9IxdFhpiiOFmOKeqBTdM1vMk2yzYo5cHPMHSN lkfUJ0iVmIsevBx59K01OcTteRBic0SeLOnF3OSmuPVjZV3hYbD7RBsIarBUhTSfdtuM PkPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FNfL2SdL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id x10-20020a170902ec8a00b001d0b6d1d463si1247187plg.351.2023.12.07.06.18.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:18:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FNfL2SdL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 97BEB80B5A00; Thu, 7 Dec 2023 06:18:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443271AbjLGOSA (ORCPT + 99 others); Thu, 7 Dec 2023 09:18:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443249AbjLGOR0 (ORCPT ); Thu, 7 Dec 2023 09:17:26 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55B4A1730; Thu, 7 Dec 2023 06:17:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701958639; x=1733494639; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5FwmIHAPnFsy0X0MCr7ws7HTjCheqTg8YUTrG4teLIA=; b=FNfL2SdLpaZt2WedNvf3tYzKBHXcrknAhO8ek85dLmwW+Wlik1fq3h/P n4nm65RuObKV1+CHLyeDhSwM2FTMoAdKIGxqKQ33YZnW5xNg2nXNACSi6 7IJnSK/4B9Mx5LEuw5R6jvBLN+pxE2b7lJgCghF0IKZFdIL2Teb2j2IsC NBlBxYlMp0D95LKw68iUOZbfXVFCc3FLZTOQ797yhi4Fn9PIRH0JNb75P ZB4ZrwHrPG4pTNfiHcfPrIkypxfc6LVD958Rn81m2ZfQSQE6MpEitnOOz tSxhbGsKtZ+GIEa0z6GCZgVqeyqg+iy5ofaS7QRio1nPwOUF6dvf8vmxJ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10917"; a="460726181" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="460726181" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2023 06:17:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10917"; a="889756098" X-IronPort-AV: E=Sophos;i="6.04,256,1695711600"; d="scan'208";a="889756098" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 07 Dec 2023 06:17:11 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 352F1BB2; Thu, 7 Dec 2023 16:17:03 +0200 (EET) From: Andy Shevchenko To: Mario Limonciello , Jarkko Nikula , Herbert Xu , Andy Shevchenko , Wolfram Sang , Andi Shyti , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mika Westerberg , Jan Dabros , Philipp Zabel , Serge Semin Subject: [PATCH v5 16/24] i2c: designware: Move exports to I2C_DW namespaces Date: Thu, 7 Dec 2023 16:13:56 +0200 Message-ID: <20231207141653.2785124-17-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20231207141653.2785124-1-andriy.shevchenko@linux.intel.com> References: <20231207141653.2785124-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 07 Dec 2023 06:18:29 -0800 (PST) Reduce scope of the I²C DesignWare driver exports to I2C_DW namespaces. This will prevent abuse of the symbols and clean up global namespace. Reviewed-by: Andi Shyti Tested-by: Serge Semin Acked-by: Jarkko Nikula Link: https://lore.kernel.org/r/20231120144641.1660574-17-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko --- drivers/i2c/busses/i2c-designware-common.c | 2 ++ drivers/i2c/busses/i2c-designware-master.c | 3 +++ drivers/i2c/busses/i2c-designware-pcidrv.c | 2 ++ drivers/i2c/busses/i2c-designware-platdrv.c | 2 ++ drivers/i2c/busses/i2c-designware-slave.c | 3 +++ 5 files changed, 12 insertions(+) diff --git a/drivers/i2c/busses/i2c-designware-common.c b/drivers/i2c/busses/i2c-designware-common.c index fb75e9b3d4fc..89b8fa492e26 100644 --- a/drivers/i2c/busses/i2c-designware-common.c +++ b/drivers/i2c/busses/i2c-designware-common.c @@ -28,6 +28,8 @@ #include #include +#define DEFAULT_SYMBOL_NAMESPACE I2C_DW_COMMON + #include "i2c-designware-core.h" static char *abort_sources[] = { diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c index 85dbd0eb5392..0b6576d7f811 100644 --- a/drivers/i2c/busses/i2c-designware-master.c +++ b/drivers/i2c/busses/i2c-designware-master.c @@ -22,6 +22,8 @@ #include #include +#define DEFAULT_SYMBOL_NAMESPACE I2C_DW + #include "i2c-designware-core.h" #define AMD_TIMEOUT_MIN_US 25 @@ -1079,3 +1081,4 @@ EXPORT_SYMBOL_GPL(i2c_dw_probe_master); MODULE_DESCRIPTION("Synopsys DesignWare I2C bus master adapter"); MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS(I2C_DW_COMMON); diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c index 7556e9cbf8d2..a40acc3d9288 100644 --- a/drivers/i2c/busses/i2c-designware-pcidrv.c +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c @@ -410,3 +410,5 @@ module_pci_driver(dw_i2c_driver); MODULE_AUTHOR("Baruch Siach "); MODULE_DESCRIPTION("Synopsys DesignWare PCI I2C bus adapter"); MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS(I2C_DW); +MODULE_IMPORT_NS(I2C_DW_COMMON); diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index b275a1b19eec..6b1a26afc278 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -471,3 +471,5 @@ module_exit(dw_i2c_exit_driver); MODULE_AUTHOR("Baruch Siach "); MODULE_DESCRIPTION("Synopsys DesignWare I2C bus adapter"); MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS(I2C_DW); +MODULE_IMPORT_NS(I2C_DW_COMMON); diff --git a/drivers/i2c/busses/i2c-designware-slave.c b/drivers/i2c/busses/i2c-designware-slave.c index 2e079cf20bb5..70d183fa3bff 100644 --- a/drivers/i2c/busses/i2c-designware-slave.c +++ b/drivers/i2c/busses/i2c-designware-slave.c @@ -16,6 +16,8 @@ #include #include +#define DEFAULT_SYMBOL_NAMESPACE I2C_DW + #include "i2c-designware-core.h" static void i2c_dw_configure_fifo_slave(struct dw_i2c_dev *dev) @@ -279,3 +281,4 @@ EXPORT_SYMBOL_GPL(i2c_dw_probe_slave); MODULE_AUTHOR("Luis Oliveira "); MODULE_DESCRIPTION("Synopsys DesignWare I2C bus slave adapter"); MODULE_LICENSE("GPL v2"); +MODULE_IMPORT_NS(I2C_DW_COMMON); -- 2.43.0.rc1.1.gbec44491f096