From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 976ABC433E0 for ; Mon, 25 Jan 2021 10:42:19 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 036A221D79 for ; Mon, 25 Jan 2021 10:42:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 036A221D79 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Ok9ktXgfYTZ96tmKSvHBru8LF05rdtC31B7OKMmuClM=; b=buxuq2ODygxtRmwNUUyi3+136 na7GvAv7qoTngtV7Jz/Ev3kXxKutBPlYuU+JgxeYNMDXEzx/So3JUWOhIe7uX3sicj5Y/rzzy8OV8 BTEmZTlsSI3vH9/oT69eNA1pPaE2SKYx7NSQ5gydOrohkMdE8cwx8LLuwvZ/RESdxLglFBrkMOw1h cPJN3/gf7op6I08nndPr+syYvU0Y5IErGiTKVVcZYNHWp4D9YE0zmQaValhdMOA9aiA63L3mAFZMr NelLEXdZnKQ+G9Sw03qGq8qYZepV83Rc4Ncrng+CjMRICO39+JxxTtsZ6SeI44zqpMk208ORNv+Lo pAOJFY94A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l3zIX-00082L-8B; Mon, 25 Jan 2021 10:40:41 +0000 Received: from mail-wr1-f54.google.com ([209.85.221.54]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l3zIU-00081n-Im; Mon, 25 Jan 2021 10:40:39 +0000 Received: by mail-wr1-f54.google.com with SMTP id q7so11727074wre.13; Mon, 25 Jan 2021 02:40:37 -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=VDxr3qGmCYb/nE6I4VIOEvGiTWvojSUz2tUH61b2mwLqp6HAvHnBeCuVSSZ/weSVZ7 2eezvs4aiOBs8ofZwnGGJguEJPBmAZ8s6rBF2gYLef0RmAhaaTz3YwD2p+9z4yPh+o7b +BAN0qzQvfpmeKoU/W9o47qZxEm2SH6EI4RPc5il9hlWJs28GUG7Wa/1sUbMhkqMr61P LhQW9GWtgE6qr/PgEnnL4jrsvkTadL9/Ib8t/Utz2z7rUZcsCcJ0LCvkU3X8b7i+Z43A q9WaQnAGq9Xw46OHsyYMR1b+fVvWL2KQBIjDX1ijaYy9/i0UXmpyVp3sVZynRCP6IAXz KbEg== X-Gm-Message-State: AOAM532DmU4dcXz/EdfXuD+REN8ILl2elZdgPVIqh6LmcWKtG70KrVxR wnyKA9P/mWpZrXr2mAKpanqRUTEt884= X-Google-Smtp-Source: ABdhPJxFRyn+qu6XbZN8Kw3vcIaOk89MqJcinq7fckxNIcL/17AL7YibO7Tz3bhcgYseghNGX5zLzA== 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 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-Disposition: inline In-Reply-To: <1611566885.5302.4.camel@mhfsdcap03> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210125_054038_675900_A04D92B2 X-CRM114-Status: GOOD ( 29.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: youlin.pei@mediatek.com, anan.sun@mediatek.com, Nicolas Boichat , srv_heupstream@mediatek.com, Robin Murphy , Joerg Roedel , linux-kernel@vger.kernel.org, yi.kuo@mediatek.com, Tomasz Figa , iommu@lists.linux-foundation.org, linux-mediatek@lists.infradead.org, Matthias Brugger , Will Deacon , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel