From patchwork Thu Oct 14 02:41:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pingfan Liu X-Patchwork-Id: 12557675 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62AE5C433F5 for ; Thu, 14 Oct 2021 02:44:59 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2D23961152 for ; Thu, 14 Oct 2021 02:44:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2D23961152 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pncsLHdKbIjR+VXkdnHfHfQqVXVY+kMBLQ7KsoM7iBM=; b=F/MKg7phW7P0EQ ifVaMF5QE5EjnYQLNCmLIsr2CZHH3T0OxIhWug/s1jRz0bsvrp/A/xD0B1t5xb1Kz0Pov+CCVWbEO HEZvjrXz5GIoaiqv7qvxuATysoCGGb1E0SLx+Mn12rXbULHr/5adD9N0UYg+47AV2UQmTwX/+UBep Z+bIhIodTWYVfoZwjU4jh8lQqY8XRCXuv6v1AT9n5QRmNjpYlUsfjWsec68G7WGDgBfOS95Eu/13u V4Z7mkog8UZI22O1QfJgwJJ8TekufZws9hPF1UlZGrEjFeoUG/HTkSk4NIJO9QL9DX+Rbsjlqc6Tb EATKIDGQxvBGHUp32qYw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1maqhQ-001If5-Fn; Thu, 14 Oct 2021 02:42:28 +0000 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1maqhA-001Iam-Jt for linux-arm-kernel@lists.infradead.org; Thu, 14 Oct 2021 02:42:14 +0000 Received: by mail-pl1-x632.google.com with SMTP id x8so3127842plv.8 for ; Wed, 13 Oct 2021 19:42:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5WoQqGZDhSh6g9d8WgYHgl0GFeP5kf9LZakSmuU/NGk=; b=SKHdtp70QOF4LlSP3b6pLf5WNPpG8utQOZD/Q9asKW488DJ0wsRwnJUbeegeOVUxok 0t0qRvJ2vZrw+fRu77f7aQ/ciVwecAfzUpd97XgS0ovbNZbBv0y84dJdUyPeKw1YhJBf jClUNXwsX5aJADJ7z5LQgWAUkdZ2oRKMuCr/sFM/rY3kvs254Ye3248oCCjIxwjLxJDv PMcwmun1km3Blve459EIEWHfeaueSh909+UH47ncr0HYC0RQcu3SvyOCGTckmZ3H+BhD yoISZJjWw1AxGcqA7qienFuENbcxrBfNNghtH46XFASHeZsfh7EMZYcIaSUKNGIDIxqU YE5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5WoQqGZDhSh6g9d8WgYHgl0GFeP5kf9LZakSmuU/NGk=; b=ejdjUMVoJ/Sn46acK45+11RvFeF6eJn8hjoD2Bo0EKXSujIToT28ga8tblj6z2Heyp bxNWfsEuizNyEPIF208PW7U2pp+hyX4FM/DD8Ui+T9Cg7+mw33CQ2TBTnzol9RKBlsT1 4iZoMb8QBiuTk8+oi3AKKoiB78iSgG2+TvOjR817SRF45clVbUBP/qjI2gwAGNyfbWOJ z4YvHmwwRHH5kcdAMVS1d3sKaGozBlJ+J1kF72trjZode79E6GYvJDmNlsyLs4BfmljW iHL1kM5ejYv0uBzLlASJWcMIDNDWetNcjZ7wBzAGaI/04ZFEBEtjtXx75HSB2WQIMKZU iN2w== X-Gm-Message-State: AOAM533wg/38d3GsIL5LKwh6fFZ4PeNjYrFPQo6EiiO/qnhLBVIrudxp bM+oRfsv8m6iDh9kSFEb1w== X-Google-Smtp-Source: ABdhPJyMbp9R8aklrE3eebrtF9NPiD4c781OyXfi7Vxb4UiIV4YJvsUkfIVnQXxdjt8To6WlqmhocA== X-Received: by 2002:a17:902:6f02:b0:13e:5dce:eb9e with SMTP id w2-20020a1709026f0200b0013e5dceeb9emr2730228plk.64.1634179331951; Wed, 13 Oct 2021 19:42:11 -0700 (PDT) Received: from piliu.users.ipa.redhat.com ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id m28sm818403pgl.9.2021.10.13.19.42.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 19:42:11 -0700 (PDT) From: Pingfan Liu To: linux-kernel@vger.kernel.org Cc: Pingfan Liu , Petr Mladek , Andrew Morton , Wang Qing , "Peter Zijlstra (Intel)" , Santosh Sivaraj , linux-arm-kernel@lists.infradead.org Subject: [PATCHv3 1/4] kernel/watchdog: trival cleanups Date: Thu, 14 Oct 2021 10:41:52 +0800 Message-Id: <20211014024155.15253-2-kernelfans@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211014024155.15253-1-kernelfans@gmail.com> References: <20211014024155.15253-1-kernelfans@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211013_194212_679760_27DA875B X-CRM114-Status: GOOD ( 13.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org No reference to WATCHDOG_DEFAULT, remove it. And nobody cares about the return value of watchdog_nmi_enable(), changing its prototype to void. Signed-off-by: Pingfan Liu Cc: Petr Mladek Cc: Andrew Morton Cc: Wang Qing Cc: "Peter Zijlstra (Intel)" Cc: Santosh Sivaraj Cc: linux-arm-kernel@lists.infradead.org To: linux-kernel@vger.kernel.org --- arch/sparc/kernel/nmi.c | 8 ++++---- include/linux/nmi.h | 2 +- kernel/watchdog.c | 5 +---- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/arch/sparc/kernel/nmi.c b/arch/sparc/kernel/nmi.c index 060fff95a305..8dc0f4e820b0 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,11 @@ 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; + return; } /* * sparc specific NMI watchdog disable function. diff --git a/include/linux/nmi.h b/include/linux/nmi.h index 750c7f395ca9..b7bcd63c36b4 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); /** diff --git a/kernel/watchdog.c b/kernel/watchdog.c index ad912511a0c0..6e6dd5f0bc3e 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -30,10 +30,8 @@ static DEFINE_MUTEX(watchdog_mutex); #if defined(CONFIG_HARDLOCKUP_DETECTOR) || defined(CONFIG_HAVE_NMI_WATCHDOG) -# define WATCHDOG_DEFAULT (SOFT_WATCHDOG_ENABLED | NMI_WATCHDOG_ENABLED) # define NMI_WATCHDOG_DEFAULT 1 #else -# define WATCHDOG_DEFAULT (SOFT_WATCHDOG_ENABLED) # define NMI_WATCHDOG_DEFAULT 0 #endif @@ -95,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)