From patchwork Tue Oct 27 13:47:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 312051 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=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT 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 749CCC63697 for ; Tue, 27 Oct 2020 17:25:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2939E21D24 for ; Tue, 27 Oct 2020 17:25:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603819559; bh=ll613dkm7n3gTgCydMFG353CjCIXvMrU10Ee+NzQupg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=nI4gfzJGoGDxwDceRlMdVjp+Kc8EbrD8ZURH92WOfuRbE4GufQZpA1gKKlNHdem5J Pm/4cl/2J/FB2qRxe4n28SnWLeuwCMrcknjQREP0DSnE2CEFch97oLTvGEnXyeFx1X 2GusgExHjGgQiIIeiE5+o12kw7kM+yVR3302gYMo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1818916AbgJ0RZ4 (ORCPT ); Tue, 27 Oct 2020 13:25:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:52412 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1775178AbgJ0Owg (ORCPT ); Tue, 27 Oct 2020 10:52:36 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DEEB92071A; Tue, 27 Oct 2020 14:52:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810355; bh=ll613dkm7n3gTgCydMFG353CjCIXvMrU10Ee+NzQupg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eDFH2FZfrkJ9WPwcFzYqQ2GCxdLBoWHY4093BA8SzMc9Xs1+X0XPg4wHNAU8u8Jff BybE3M7CYv54BjkSWL9Q6PDLPTG6Uz5ghFzr/WeuiPx1L/lLoCaIRUJNzTZCC7+7xO I3kCziBPJf2xHtzoMcl42e4tMpxYl6LjHLvAwMeE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Luca Stefani , Borislav Petkov , Sami Tolvanen , Sasha Levin Subject: [PATCH 5.8 079/633] RAS/CEC: Fix cec_init() prototype Date: Tue, 27 Oct 2020 14:47:02 +0100 Message-Id: <20201027135526.399724477@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Luca Stefani [ Upstream commit 85e6084e0b436cabe9c909e679937998ffbf9c9d ] late_initcall() expects a function that returns an integer. Update the function signature to match. [ bp: Massage commit message into proper sentences. ] Fixes: 9554bfe403bd ("x86/mce: Convert the CEC to use the MCE notifier") Signed-off-by: Luca Stefani Signed-off-by: Borislav Petkov Reviewed-by: Sami Tolvanen Tested-by: Sami Tolvanen Link: https://lkml.kernel.org/r/20200805095708.83939-1-luca.stefani.ge1@gmail.com Signed-off-by: Sasha Levin --- drivers/ras/cec.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/ras/cec.c b/drivers/ras/cec.c index 569d9ad2c5942..6939aa5b3dc7f 100644 --- a/drivers/ras/cec.c +++ b/drivers/ras/cec.c @@ -553,20 +553,20 @@ static struct notifier_block cec_nb = { .priority = MCE_PRIO_CEC, }; -static void __init cec_init(void) +static int __init cec_init(void) { if (ce_arr.disabled) - return; + return -ENODEV; ce_arr.array = (void *)get_zeroed_page(GFP_KERNEL); if (!ce_arr.array) { pr_err("Error allocating CE array page!\n"); - return; + return -ENOMEM; } if (create_debugfs_nodes()) { free_page((unsigned long)ce_arr.array); - return; + return -ENOMEM; } INIT_DELAYED_WORK(&cec_work, cec_work_fn); @@ -575,6 +575,7 @@ static void __init cec_init(void) mce_register_decode_chain(&cec_nb); pr_info("Correctable Errors collector initialized.\n"); + return 0; } late_initcall(cec_init);