Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3564683pxb; Mon, 25 Jan 2021 21:37:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJyjTVk26e0LRKnSbw6FmVA03ByZ+whFvGTjNhOHyCpJhQaB0QB1KcoQI+ysN9xVP3vwvh+X X-Received: by 2002:aa7:c981:: with SMTP id c1mr3392514edt.90.1611639439603; Mon, 25 Jan 2021 21:37:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611639439; cv=none; d=google.com; s=arc-20160816; b=o+R88n0JOv8ZCtJV800RDcUxknLBWmNomoWtuRNTv6bStGYgD5cB+ZHu4ewGoxC2F+ UFTP4icUT6EsOxyH7qZJ0s3ll2Bxkw2C6cygHJaWSb9kBOBE26Kh/fY1v+9FpwgouAts BA8PFZqbuqOpH8eZ1EHsFiwT87eOmWUBZp4Vky+ZSj5gTY3HWOLqDw1T+aOTWZfkCmaQ F64gDbdqjH3fgey9pnlG7rVB8NMgZxNEjiH9KuFFAsqT2khyKaLWXdBJGEX+f/Rtj5dv ZPDIUI2d9VDf6iSp7EPczapGYeLhSu5eb9TW7YXfYbOgHnzjY4Qgy+VCw7g3t7S3BdPH Vw2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=DsJE2zPkprb7gh+GS+eIFG0M1vuNomWHZqhGRuLhtzQ=; b=KuobvEOlZb4Sk/JbtjCjBjl9ovG7cu0pAbdbXUvfhqV4MX7ZQAtCY2ZzIDAI936BQO J1SsQK6NoKKe6B58p3yj00sWOsBjO02IZJFY+l28ufF11aCUA+qo5PyYknJm5wvsBou2 1Mvuhuw/DYjKglebNndjRJ8hlJ3DDQXl2WFfVIVIpbBjPX8y4FAeHTn+qRqCfcwXuuiG QehErP2rm3Qz2dEWjJKA8W2v7x68IEoj8rp++AMxQiokl7ndENpudu1xi0Eak9GFz8IQ 6VVyrHm0p150fApUgvlWMp/5grAirObL473lzA7TXbxJd920uMEH2acMU7zN14n16QYK h5kA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v4si8874820edi.191.2021.01.25.21.36.55; Mon, 25 Jan 2021 21:37:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387993AbhAZFfO (ORCPT + 99 others); Tue, 26 Jan 2021 00:35:14 -0500 Received: from mail-wr1-f47.google.com ([209.85.221.47]:40223 "EHLO mail-wr1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727486AbhAYKlS (ORCPT ); Mon, 25 Jan 2021 05:41:18 -0500 Received: by mail-wr1-f47.google.com with SMTP id c12so11744994wrc.7 for ; Mon, 25 Jan 2021 02:41:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=DsJE2zPkprb7gh+GS+eIFG0M1vuNomWHZqhGRuLhtzQ=; b=iFgmho6ywcoHVoNGYfUC9bOKinRGbOeUWH+PcDT7dm5O5YMx8XnqWk6xYI9U6LmxEc OgrT6OjLro2Yx2o0u28tTmOrCQirJ0IoN5RRd9LZY9+oy6PKDKiwZhBRJINgjy4tZYs2 A4yGI7CBzk/ogmuGsLmWelEb5VupENnrjgy6GTpExBHU4eAmLoh14tmG13P8IwWmBBs0 MbSbadK3UYRAPwn/nCTKXFHtxTssB9GdQLXg8gCRyXpWPbhoYnzlUVZLjysj2XOvl3tU m0jKwf1i1fSt1yZpKmEzZvN5HgzJdzABkNKvR/xebQwWMTk8DuSiytKKyWSkkqzRMykh kIew== X-Gm-Message-State: AOAM5306pRTBzjvEdVKgr/FUlLI5eXb79H4BtWOGrIaApzfchYZLy547 O019CXCkMNjhi7ePodZ4TUY= X-Received: by 2002:a5d:4d86:: with SMTP id b6mr200432wru.152.1611571236869; Mon, 25 Jan 2021 02:40:36 -0800 (PST) Received: from kozik-lap (adsl-84-226-167-205.adslplus.ch. [84.226.167.205]) by smtp.googlemail.com with ESMTPSA id g1sm21982339wrq.30.2021.01.25.02.40.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jan 2021 02:40:35 -0800 (PST) Date: Mon, 25 Jan 2021 11:40:33 +0100 From: Krzysztof Kozlowski To: Yong Wu Cc: Matthias Brugger , Joerg Roedel , Robin Murphy , Will Deacon , Tomasz Figa , linux-mediatek@lists.infradead.org, srv_heupstream@mediatek.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, youlin.pei@mediatek.com, Nicolas Boichat , anan.sun@mediatek.com, yi.kuo@mediatek.com Subject: Re: [PATCH 2/3] memory: mtk-smi: Add module_exit and module_license Message-ID: <20210125104033.2ewzumhmagmouvo5@kozik-lap> References: <20210121062429.26504-1-yong.wu@mediatek.com> <20210121062429.26504-3-yong.wu@mediatek.com> <20210122213427.mwjyjn2wsgnko7mk@kozik-lap> <1611557381.3184.21.camel@mhfsdcap03> <20210125084051.ipgeu2ksucdag2u4@kozik-lap> <1611566885.5302.4.camel@mhfsdcap03> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1611566885.5302.4.camel@mhfsdcap03> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 25, 2021 at 05:28:05PM +0800, Yong Wu wrote: > On Mon, 2021-01-25 at 09:40 +0100, Krzysztof Kozlowski wrote: > > On Mon, Jan 25, 2021 at 02:49:41PM +0800, Yong Wu wrote: > > > On Fri, 2021-01-22 at 22:34 +0100, Krzysztof Kozlowski wrote: > > > > On Thu, Jan 21, 2021 at 02:24:28PM +0800, Yong Wu wrote: > > > > > The config MTK_SMI always depends on MTK_IOMMU which is built-in > > > > > currently. Thus we don't have module_exit before. This patch adds > > > > > module_exit and module_license. It is a preparing patch for supporting > > > > > MTK_SMI could been built as a module. > > > > > > > > > > Signed-off-by: Yong Wu > > > > > --- > > > > > drivers/memory/mtk-smi.c | 10 ++++++++++ > > > > > 1 file changed, 10 insertions(+) > > > > > > > > > > diff --git a/drivers/memory/mtk-smi.c b/drivers/memory/mtk-smi.c > > > > > index e2aebd2bfa8e..aa2a25abf04f 100644 > > > > > --- a/drivers/memory/mtk-smi.c > > > > > +++ b/drivers/memory/mtk-smi.c > > > > > @@ -597,3 +597,13 @@ static int __init mtk_smi_init(void) > > > > > return platform_register_drivers(smidrivers, ARRAY_SIZE(smidrivers)); > > > > > } > > > > > module_init(mtk_smi_init); > > > > > + > > > > > +static void __exit mtk_smi_exit(void) > > > > > +{ > > > > > + platform_unregister_drivers(smidrivers, ARRAY_SIZE(smidrivers)); > > > > > +} > > > > > +module_exit(mtk_smi_exit); > > > > > + > > > > > +MODULE_DESCRIPTION("MediaTek SMI driver"); > > > > > +MODULE_ALIAS("platform:MediaTek-SMI"); > > > > > > > > Drivers do not use capital letters, so I have doubts whether this alias > > > > is correct. > > > > > > I didn't care the upper/lower-case. I will change to lower case in next > > > time. > > > > Then why do you need the alias? The name does not match driver name, so > > what's the purpose of this alias/ > > I think it is not so necessary for us. I will delete this line in next > version. > > Only curious what's alias is fit in our case? normally it should be the > file name: mtk-smi? If autoloading of your module works, then remove it. The alias is necessary for some cases when a device table is missing (e.g. platform driver is matched via devicetree but not having the platform_device_id table) or matching is done via different method (e.g. driver is matched from MFD via devicetree compatible even though there is a platform_device_id table). Best regards, Krzysztof