From patchwork Thu Sep 23 14:09:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pingfan Liu X-Patchwork-Id: 12513053 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,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 A97CBC433F5 for ; Thu, 23 Sep 2021 14:11: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 6899D60FDC for ; Thu, 23 Sep 2021 14:11:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6899D60FDC 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=i8j4YoQTKkui4IKiGnf+ilZxJxReq//q52FgZsJxLxA=; b=TNMWPJTBEMhq9D nWPRB8GyGDauBNyM1r3bYaoL9oij7Td3kdlnxWXRp8uoEHflZtLMXjIitySv/igiQwCoj8G13tnow TQgS6YHuHNoybdZBpFVFb7g3cr56S0Z7TadqYeYMtRoqVHfvE4TagqXD9GCivDw9FYMVaBTrNUFD3 lJuIEJHQFLZx37cyfxtzUvRqIMdugc6voAYA0FCpnY0K31IBe7AWjqKXxHNAsgrGPHXyTyOTJ+V3y SQ8l4ds4jx2V/CLxJazXweKR7QqQBXBd00iOXJvevw26usQEJ9nkyBfAHgDHJxCCxsIaTjNbyyo0q O+zQTAzPpem1KBpxliDw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mTPQp-00BmDX-Fy; Thu, 23 Sep 2021 14:10:35 +0000 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mTPQe-00BmAy-Os for linux-arm-kernel@lists.infradead.org; Thu, 23 Sep 2021 14:10:26 +0000 Received: by mail-pf1-x42f.google.com with SMTP id w19so5807509pfn.12 for ; Thu, 23 Sep 2021 07:10:24 -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=FS357D1JN+J32aJwqQjXs575AlGsgPXFPWkIjeHrV54=; b=CvZOIj/j0pFPrOj71e5xR8+3k4YaYDGBJetOHCEfBAhyqDELNxM4aIXSe7vsiPLtGS +5zBvFYxtIYZO2i74iyzj1Ec1LCK1RKmuNctpt/hKiGbN48T5b+HipGAaspMsM1NO9V9 SLQAfPoor4T5Y4thUv0U2W8w19Aqw6U7sw3o8PqdEm1yNti5qNVVcpL0DbH4JGew3Qzk 7HkmmshRsMFFZSqVxY1y33L7pyNAUceGVa2Xdb3BiQcDDQySeT+MfwqseyDB+tGK3sJB RsNFjsjxZakXZtgVEFSLiXEizUB/auKG2iVpUfm2Zt/uz3/4hs2hlsIlSRQBA2tCRuid k3zA== 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=FS357D1JN+J32aJwqQjXs575AlGsgPXFPWkIjeHrV54=; b=tw5NDMN6hDrLPYdK61BpVpaM1jyYOpw60nvxulBlAZj7yE7UvVaUiGOIHELIqGBKWb FGg4WUqgeET6oScN5SHBizblS2AW1LAXZQAE4EcxP37Wb4LOCQlMwl4D3OKmKLzcVsEv UuZVXzmx4tCJFiG4lSil2lZaxxvDXcTNAJE0yGneQpNHQXX4sTN+3h9jO/rK0Uxm93nZ rKh6EruD7JdrgiTwd/+UeF4c0ha2751hGihbyLkryfA41RqRP1nto0WzktYJqD+1pA3/ gHyalQANGU6v7PH4NO/7j8a/BPL8NYShJf2b0b9MiF0RY6usRNiq1G192MUh44r9j6oa Srvg== X-Gm-Message-State: AOAM533HcF8QXmzp6+6nRU3HsjmyNVPXN4HDYLUQSIgMtNKuqL6wpcQs kfr5IEH8+6Hphb8b5VgmrQ== X-Google-Smtp-Source: ABdhPJypXnfLVjr+Sgh6uT0qpa3411a/9d02yi2MrJaKQAsCyE8gR+ZgXjmu1ZhNk4ktfT41wtUykw== X-Received: by 2002:a65:47cd:: with SMTP id f13mr4378454pgs.439.1632406223667; Thu, 23 Sep 2021 07:10:23 -0700 (PDT) Received: from piliu.users.ipa.redhat.com ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id j6sm5800766pfn.107.2021.09.23.07.10.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Sep 2021 07:10:22 -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: [PATCHv2 1/4] kernel/watchdog: trival cleanups Date: Thu, 23 Sep 2021 22:09:48 +0800 Message-Id: <20210923140951.35902-2-kernelfans@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210923140951.35902-1-kernelfans@gmail.com> References: <20210923140951.35902-1-kernelfans@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210923_071024_838273_28771499 X-CRM114-Status: GOOD ( 12.13 ) 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 --- include/linux/nmi.h | 2 +- kernel/watchdog.c | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) 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)