Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp817469rwb; Sat, 3 Sep 2022 03:28:52 -0700 (PDT) X-Google-Smtp-Source: AA6agR6rCZ9kH3oZvNAv4RtHp5M57Pu3qF85K7kcf6k7AD1ue0+EgzeXcfy4Bg0WpskL6PSb/LWf X-Received: by 2002:a17:906:dac8:b0:741:545b:796a with SMTP id xi8-20020a170906dac800b00741545b796amr21852542ejb.240.1662200931746; Sat, 03 Sep 2022 03:28:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662200931; cv=none; d=google.com; s=arc-20160816; b=LS9P1/pVh5PPkTaZHcS+tkH/tcpH1jV7ZIRjma/zZ6wsPGvwFhoLAHmA5P+Ivhibsu EWB0jg+EpnuRFMPZLBICCZnZqqlosYb2Ax7SRM8bK2zqm+ynRi2gu+Wg05eqI88vX9fv jlQVmpsA9RkX3CJ5Sx4MWgZA+rri4eidjBD5KkGBRqIn/F1WNgJj0GqbIkkInrQcx5Wb PsahTH50tgxfqgL2nl8uDcCxgHxSL9Wq+mryI4GY2IlUL5FgtJQrUqxYUWSbUL0fm0ZK fkdeRBk3ZulP/bmepkYZytO4p37Kk5+Z6d6SWU5XtKIxlGy9Q7CjWFZ7rlQxe2qz/mkE qefw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Fk6YQJx40kje2/K3Geo0aBF/K64gPIAL1oQ6u/E9DXA=; b=tdOoVMITLg1PUcr54nOetwNKRLP69NlX7MhnC47ygeG1Me8SL0rec2t0DjHpaYWQLI SIekH1XAkOBStehow7/UB0HsNqQD+E6lq37D7MqCd4ORXNlicfyumcR015JZApzitOuK VsUYHq6PAKaleraM/70h/mrTAHwhwnkra6xM1p9RXsFYkV+9pE7H1qG604tL6hzV8SOM zZxidhJ8ML9aoKQA/exVrUYrK1sRmJmj5mybJwjoUuIVUo4klWF1MxYNsoJfbayz8K4/ fh/B6hNTLQ+Vg4XeCPLU9IF9+iVYb2C6B5J9MMX58eEq8hqDKavcsy8NylsgGwXVfOfs w7cQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=KPEwW4I9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs13-20020a1709072d0d00b0073d6d872f29si3898378ejc.279.2022.09.03.03.28.25; Sat, 03 Sep 2022 03:28:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=KPEwW4I9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233103AbiICJes (ORCPT + 99 others); Sat, 3 Sep 2022 05:34:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232903AbiICJei (ORCPT ); Sat, 3 Sep 2022 05:34:38 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA281205C9; Sat, 3 Sep 2022 02:34:35 -0700 (PDT) X-UUID: 3c6e36f3270842309824ba0ea68c950b-20220903 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=Fk6YQJx40kje2/K3Geo0aBF/K64gPIAL1oQ6u/E9DXA=; b=KPEwW4I9+7qBsRvJs3Va+2T49HO5mQmWAhQM8Qw1oAjhKX11qvBZFpJCHeOckxkuz4pNppVAm93+O7spny7UukznhUCP7/gN/E/bWCYOXTtzZXTwN+QtALTjsiz/sPbRpUemYmi2qMtWBIEPXp4/U97o2GsyphEfJRm/u4VMYg8=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.10,REQID:2c84e72e-317e-4595-b7ed-e9e50611b8bc,OB:0,L OB:0,IP:0,URL:0,TC:0,Content:-25,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Releas e_Ham,ACTION:release,TS:-25 X-CID-META: VersionHash:84eae18,CLOUDID:b2677c56-e800-47dc-8adf-0c936acf4f1b,C OID:IGNORED,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,IP:nil,URL:0,File:nil ,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: 3c6e36f3270842309824ba0ea68c950b-20220903 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 48071102; Sat, 03 Sep 2022 17:34:18 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.3; Sat, 3 Sep 2022 17:34:17 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Sat, 3 Sep 2022 17:34:17 +0800 From: Lecopzer Chen To: , , , , CC: , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v7 2/6] kernel/watchdog: change watchdog_nmi_enable() to void Date: Sat, 3 Sep 2022 17:34:11 +0800 Message-ID: <20220903093415.15850-3-lecopzer.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220903093415.15850-1-lecopzer.chen@mediatek.com> References: <20220903093415.15850-1-lecopzer.chen@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,RDNS_NONE, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY, URIBL_CSS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Nobody cares about the return value of watchdog_nmi_enable(), changing its prototype to void. Signed-off-by: Pingfan Liu Signed-off-by: Lecopzer Chen Reviewed-by: Petr Mladek --- arch/sparc/kernel/nmi.c | 8 +++----- include/linux/nmi.h | 2 +- kernel/watchdog.c | 3 +-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/arch/sparc/kernel/nmi.c b/arch/sparc/kernel/nmi.c index 060fff95a305..5dcf31f7e81f 100644 --- a/arch/sparc/kernel/nmi.c +++ b/arch/sparc/kernel/nmi.c @@ -282,11 +282,11 @@ __setup("nmi_watchdog=", setup_nmi_watchdog); * sparc specific NMI watchdog enable function. * Enables watchdog if it is not enabled already. */ -int watchdog_nmi_enable(unsigned int cpu) +void watchdog_nmi_enable(unsigned int cpu) { if (atomic_read(&nmi_active) == -1) { pr_warn("NMI watchdog cannot be enabled or disabled\n"); - return -1; + return; } /* @@ -295,11 +295,9 @@ int watchdog_nmi_enable(unsigned int cpu) * process first. */ if (!nmi_init_done) - return 0; + return; smp_call_function_single(cpu, start_nmi_watchdog, NULL, 1); - - return 0; } /* * sparc specific NMI watchdog disable function. diff --git a/include/linux/nmi.h b/include/linux/nmi.h index f700ff2df074..81217ebbc4bd 100644 --- a/include/linux/nmi.h +++ b/include/linux/nmi.h @@ -119,7 +119,7 @@ static inline int hardlockup_detector_perf_init(void) { return 0; } void watchdog_nmi_stop(void); void watchdog_nmi_start(void); int watchdog_nmi_probe(void); -int watchdog_nmi_enable(unsigned int cpu); +void watchdog_nmi_enable(unsigned int cpu); void watchdog_nmi_disable(unsigned int cpu); void lockup_detector_reconfigure(void); diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 582d572e1379..c705a18b26bf 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -93,10 +93,9 @@ __setup("nmi_watchdog=", hardlockup_panic_setup); * softlockup watchdog start and stop. The arch must select the * SOFTLOCKUP_DETECTOR Kconfig. */ -int __weak watchdog_nmi_enable(unsigned int cpu) +void __weak watchdog_nmi_enable(unsigned int cpu) { hardlockup_detector_perf_enable(); - return 0; } void __weak watchdog_nmi_disable(unsigned int cpu) -- 2.34.1