Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp655860pxk; Wed, 16 Sep 2020 13:30:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcGJ4083GYSt8K//mShy6fvW1qy/s3j9iQus3usPCA+BALQCNgoo4AL9iarBiReqLR+2Zi X-Received: by 2002:a17:906:3e08:: with SMTP id k8mr26868004eji.480.1600288227301; Wed, 16 Sep 2020 13:30:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600288227; cv=none; d=google.com; s=arc-20160816; b=UIwJ3J1FE71oC4ulf4Hm9XggctAkvsI4j+vNcrTbVbLbws7IsVdAFkqGIse4kRWY/H ZCwPGuWzDzoRestrljgqcXTBQs4hlbkg69v3IqDdK/j9b5td2IOI10GZHPXsqTVsgBCH gNs/SiDGo1Sl3tw2xE1il9as4LfkpmpyYmEWyLNl99q07LRDKijWiNdNWanbwarmiSMb v4LjblwQGfqqEd5oBhijcYteswTJm69t/CCNvoKNuZ0Ohi89kSYgI7pOPE8pxAVQ13Pa GpEmO58PyZqtyDaQp6zyCNgdH1n8j6x2QvEhjriDo4LOw6M6ERKQZ3f1cVhE5jeaVFPR RqNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=CXiDzhd51Y1X9PUqSzctKBUMynV+tiDkIpdtvyBec+o=; b=BCogolha+5LPFDXlfYZMS1PDPsuXzmuK91bS/W2YTpV7MnUBzoXOYbG6057zWEktiC NoUXzjBWtYsb2ajw2O/BkImmW3EyQThDlFKg7em4djox4V3ZTVAxtwuBX7fgJ7GKS0FT z2kz9alV/L3ZnFcSER9S5DaGRsHVqodibi1oRoMesut4uOgAerZGDXY9Zjxf26aEJLTQ MPdIlZOtmihX+Kayukmuyd/Qqvdq/AELYTC9GUwXuuJtbdNLpnCNbEOWUYkr53fcloIe 24z62S2i6/+qsrOW5loOWyVEQf01+ukP4sQDlN3wizB1dLrAiK2vs7XDYKuRT6N9U+vf /nxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=FA22T5GO; 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=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p2si12621905ejf.310.2020.09.16.13.30.03; Wed, 16 Sep 2020 13:30:27 -0700 (PDT) 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; dkim=pass header.i=@alien8.de header.s=dkim header.b=FA22T5GO; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726958AbgIPU26 (ORCPT + 99 others); Wed, 16 Sep 2020 16:28:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726925AbgIPRYQ (ORCPT ); Wed, 16 Sep 2020 13:24:16 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9FDCC0611C0; Wed, 16 Sep 2020 10:22:41 -0700 (PDT) Received: from zn.tnic (p200300ec2f0c3e00db2f62bd592f04a0.dip0.t-ipconnect.de [IPv6:2003:ec:2f0c:3e00:db2f:62bd:592f:4a0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 1522C1EC026F; Wed, 16 Sep 2020 19:22:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1600276960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=CXiDzhd51Y1X9PUqSzctKBUMynV+tiDkIpdtvyBec+o=; b=FA22T5GORdlesUNedODvDvgYmaDdj8PkbyqTIBGIJGmwPSV7OwXITkTe+/heqhPzL51mx/ pz9TN+9/aavENJg5AcMKLXQbd8fQkM/a7YpcMLiW6VU6TuZrjI1W39VNhvn1DoPE0GxQtm LTCrTJdKJtIOJzBUC8dhq1g4Pd1Q8lE= Date: Wed, 16 Sep 2020 19:22:38 +0200 From: Borislav Petkov To: Liu Shixin Cc: Stefan Schaeckeler , Mauro Carvalho Chehab , Tony Luck , James Morse , Robert Richter , Joel Stanley , Andrew Jeffery , linux-edac@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next] EDAC/aspeed: use module_platform_driver to simplify the code Message-ID: <20200916172238.GQ2643@zn.tnic> References: <20200914065358.3726216-1-liushixin2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200914065358.3726216-1-liushixin2@huawei.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 14, 2020 at 02:53:58PM +0800, Liu Shixin wrote: > module_platform_driver() makes the code simpler by eliminating > boilerplate code. > > Signed-off-by: Liu Shixin > --- > drivers/edac/aspeed_edac.c | 18 +----------------- > 1 file changed, 1 insertion(+), 17 deletions(-) > > diff --git a/drivers/edac/aspeed_edac.c b/drivers/edac/aspeed_edac.c > index fbec28dc661d..fde809efc520 100644 > --- a/drivers/edac/aspeed_edac.c > +++ b/drivers/edac/aspeed_edac.c > @@ -388,23 +388,7 @@ static struct platform_driver aspeed_driver = { > .probe = aspeed_probe, > .remove = aspeed_remove > }; > - > - > -static int __init aspeed_init(void) > -{ > - return platform_driver_register(&aspeed_driver); > -} > - > - > -static void __exit aspeed_exit(void) > -{ > - platform_driver_unregister(&aspeed_driver); > -} > - > - > -module_init(aspeed_init); > -module_exit(aspeed_exit); > - > +module_platform_driver(aspeed_driver); > > MODULE_LICENSE("GPL"); > MODULE_AUTHOR("Stefan Schaeckeler "); > -- Applied, thanks. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette