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=-16.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham 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 39D58C433ED for ; Thu, 13 May 2021 09:46:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E82D761439 for ; Thu, 13 May 2021 09:46:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231193AbhEMJre (ORCPT ); Thu, 13 May 2021 05:47:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:49336 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230338AbhEMJr2 (ORCPT ); Thu, 13 May 2021 05:47:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6ACFC61439; Thu, 13 May 2021 09:46:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620899178; bh=2YDPX0ZygP42OUgip4Dx4XOsWdN5W0wiW342gHSvIfQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=0bKc5x8KTUNZj8xk+2qm0hSx4ORSNFaMpnuyS+FE1DScC2cuH5bQjmEfqoJeZ7wOR 9O7vaiQ8l1QvMfqzwNlwGEN/mRYlGiKbfLf7m0FgrEdwW8Gbht1AngzYxGMXuNUhnu 6U4360c2l8oXK7OFWETybk5pIVIHwUIFNG6mirOE= Date: Thu, 13 May 2021 11:46:16 +0200 From: Greg KH To: Zou Wei Cc: vaibhav.sr@gmail.com, mgreer@animalcreek.com, johan@kernel.org, elder@kernel.org, greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next] staging: greybus: audio: Add missing MODULE_DEVICE_TABLE Message-ID: References: <1620895772-52538-1-git-send-email-zou_wei@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1620895772-52538-1-git-send-email-zou_wei@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 13, 2021 at 04:49:32PM +0800, Zou Wei wrote: > This patch adds missing MODULE_DEVICE_TABLE definition which generates > correct modalias for automatic loading of this driver when it is built > as an external module. > > Reported-by: Hulk Robot > Signed-off-by: Zou Wei > --- > drivers/staging/greybus/audio_codec.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c > index b589cf6..6fa9781 100644 > --- a/drivers/staging/greybus/audio_codec.c > +++ b/drivers/staging/greybus/audio_codec.c > @@ -1086,6 +1086,7 @@ static const struct of_device_id greybus_asoc_machine_of_match[] = { > { .compatible = "toshiba,apb-dummy-codec", }, > {}, > }; > +MODULE_DEVICE_TABLE(of, greybus_asoc_machine_of_match); > > static struct platform_driver gbaudio_codec_driver = { > .driver = { > -- > 2.6.2 > > I think I will just start rejecting all of thes "missing MODULE_DEVICE_TABLE()" patches as they make no sense at all. If the driver authors had wanted these MODULE_DEVICE_TABLES added, they would have done so. That means they were not using dynamically loaded modules because usually, the module is built in, OR it doesn't matter. So please, only add this if you have a system that needs them, do not add them just based on a rule you have generated by a tool, as that is pointless. thanks, greg k-h