Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1944113pxk; Sun, 13 Sep 2020 23:41:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwk7uJQFzY36x0fgohD2GC7O69LJKgkOhFrl6a+EEH+CiHFlJQJBWgMEmdpjZHPQ3f91KGJ X-Received: by 2002:a17:906:c8ca:: with SMTP id gc10mr5397360ejb.461.1600065670077; Sun, 13 Sep 2020 23:41:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600065670; cv=none; d=google.com; s=arc-20160816; b=C80N/mjS6E42RoBSUDCJuLzq6eY/AlGWiRemViGbRI0lJtqe8oUI1naRNz0GpWxMOr tJcNMFnapDVsmjVWgvmWKXIzrAEn8j3i3omuTRMDth3+S2d1JrgM4e8tfz4nI8uVVQEI dgVZuQOlsEM/rV4VNzlRTvHdtA5wHb632q0ARH9hIpU9oNhWp6ENihRmPWL57Fl2MZws jMVF/HmORMIGwGSyCEP2DC7m4ni3FyeKJjBWEYAY2O6q2VFNmpWX5VuM8RkRPmSWSN/2 PWsS+7F2balPJOuiMvX6hs8MCkO8LhdyRLyA1vbb2enQdltAkZFCK54cEDqIxf8+bwm2 fD4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=tM1rt0vCMPBG29FozlgK4tPcKJfgi5TlJoa0v0rD7zo=; b=dduv2HLUjuUH1h0R1/CvYG1c50FK1mdKKGo4iSH2Lf63vyrzY/35EsydjMuK+YQkwM nrNBxj3+didpZfnpBHzxpcxJnnpPVexmic87N4cpySdUADBdcI1uWik9G3Sc2Ax/LjOb II9bbfYGyEkqbM1IB9PlvI3PeWMD+wxoSPSm0O6g7B5uagWkzfqYcLri8ZOrxVYgxbnR cTJkdw1O8c50GLizFHH9r+bYi7CfS9Pa4FYhbG1j4QbKQEvRcxxxroe/QpapSz5YNenE 5rpUFjMe5RoiSIwEgg3noqMxGuDWMvD46rPowvz0NMaYJoElJ4UZR9kDSQXuXyFycVaK z8/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@jms.id.au header.s=google header.b=KM43qRmI; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r4si6513403ejy.388.2020.09.13.23.40.46; Sun, 13 Sep 2020 23:41:10 -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=@jms.id.au header.s=google header.b=KM43qRmI; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726094AbgINGjN (ORCPT + 99 others); Mon, 14 Sep 2020 02:39:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726042AbgINGjE (ORCPT ); Mon, 14 Sep 2020 02:39:04 -0400 Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73A7CC06174A; Sun, 13 Sep 2020 23:39:04 -0700 (PDT) Received: by mail-ej1-x643.google.com with SMTP id p9so21544220ejf.6; Sun, 13 Sep 2020 23:39:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jms.id.au; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tM1rt0vCMPBG29FozlgK4tPcKJfgi5TlJoa0v0rD7zo=; b=KM43qRmICDk1SaQ1VXMUHX+8tngtm6ts9le/JiSXTFcxsA4Rn545KbrS6sbua4lvB6 55oFrksVPZKrTSkYogsSedq0HvH+7BnTvkNsKjTX8YbbnNv9LWYp3KAOZuNYjrzekkso g15xcuUW7Pp9ctrMAJdkZx7E67oOI6E/iPPjc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tM1rt0vCMPBG29FozlgK4tPcKJfgi5TlJoa0v0rD7zo=; b=KNVSjCN7ZvwMEMSnACwEtj2+0FaCFzkqlEFoabrb6IOhJ2dGWGpGqJByenjSiIrKSn UslM1N9dYm+xRarFg9hxqQQZ3CRs4x53Tu/g8LFPA6eOv4kXTvVrsfDYSz2LnqYbyMg4 Uv5Ua9SAvODNa1ejxax34yM04SAvVxMlYRDjw3Mz+GcU/NxPrSnNkDdzSXmzdy2cM51Y xLgzj5/T+UGogReeasrtwT7AvHDTnkzpcfj2cK4kwQ08sQ4ujqJmEiurQcS4j7oD+9fU nXyZr/rO5WM1W3hCZOGfFrmnvNx6Nc2hAE4TU70Zqe3Hpsiv/Kvs8l4SNjyPEUvIQPVp Fzrw== X-Gm-Message-State: AOAM532eUTiK8h6pIJ3WcpMl1WXwSv+oDGWKNzB1rmRP4d9nuiOOolnj aEvOI3N259ToREnIqB3DbmgdJjADh56lvDE1oGE= X-Received: by 2002:a17:906:4c58:: with SMTP id d24mr13673692ejw.108.1600065543130; Sun, 13 Sep 2020 23:39:03 -0700 (PDT) MIME-Version: 1.0 References: <20200914065358.3726216-1-liushixin2@huawei.com> In-Reply-To: <20200914065358.3726216-1-liushixin2@huawei.com> From: Joel Stanley Date: Mon, 14 Sep 2020 06:38:50 +0000 Message-ID: Subject: Re: [PATCH -next] EDAC/aspeed: use module_platform_driver to simplify the code To: Liu Shixin Cc: Stefan Schaeckeler , Borislav Petkov , Mauro Carvalho Chehab , Tony Luck , James Morse , Robert Richter , Andrew Jeffery , linux-edac@vger.kernel.org, Linux ARM , linux-aspeed , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 14 Sep 2020 at 06:31, Liu Shixin wrote: > > module_platform_driver() makes the code simpler by eliminating > boilerplate code. > > Signed-off-by: Liu Shixin Reviewed-by: Joel Stanley > --- > 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 "); > -- > 2.25.1 >