From patchwork Mon Oct 31 18:15:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 13400 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2472730wru; Mon, 31 Oct 2022 11:29:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4oyqrH8YWcAKdT9O45Dzz2SQAJo8F/zz2b0LwPLU4xvjocpShB07PPX36DU0Fb6F1X8Ipf X-Received: by 2002:a63:c06:0:b0:439:9b18:8574 with SMTP id b6-20020a630c06000000b004399b188574mr13608550pgl.608.1667240952899; Mon, 31 Oct 2022 11:29:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667240952; cv=none; d=google.com; s=arc-20160816; b=JfMkQAhdzljYjGYcxogagaheZAIZ+DuS3pLB4553stKH5SrbQLlRQK/biT+LcgHQcJ lHq+7rRjRMsTEo/9cvUdN+DvpRYNdwExPyof+aNhRVKDXwAFxEvRz61G90aP+LSAdyVz 1vWMAZk/XWhpxvvDSC64sGr5Fw+MAt2AJKgi4nyjm+nDlIhjgrsIxSTdE03pkPrjLLD1 HdfSxHg9trI5S+W8EqIBqLKokb6wrQb9W6tqds9FrUixS6lsgu/pq63gCufTnIFxLfZy R2BAE3MXt+plTblefCJ/qCeWwDXh9EHMKkU+1WjwIE97UaSq8qzd6+xxfkP0EXIz/K80 lLfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=lwgO5XEJCp0Zffmg4gdserNs+oDiJwvtqN0WugL8MiM=; b=IwJyl9xfOd2CXQU2P53OULcyjzy2yanYNCTmFlbuZ1mIOATBVzCYdgUWCA5Yem5gHr qTGmrVrvBuBH3zLHhbN4bWVif6nJus2SZ3iA7EkQaktYwyfrCqfN/s4tO3A+u6g4WAVu 7sLHHP5e/ggnYGn7VKg7hd0eryfbmOiuiDhwHk7DrRtvw2L5hRuAQkxZUutM0IkrgZzk iwJsbLby5YdURf+iKdeB1adlO8xIa/9ue8DG01TbgFOdysH+p5TFl91UDQMKwxocmMfm Qfk60XivSijQkKkQO3AqV5DOu8HwXlnBg0O6jJSE0MSA8argNB2Vnzu6kk/l3rzioWBW cviA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=m8Lf4rvC; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=1AXIBTck; 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=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h14-20020a170902f54e00b00176bccea71esi11645319plf.57.2022.10.31.11.29.00; Mon, 31 Oct 2022 11:29:12 -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=@linutronix.de header.s=2020 header.b=m8Lf4rvC; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=1AXIBTck; 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=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229866AbiJaSPO (ORCPT + 99 others); Mon, 31 Oct 2022 14:15:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229645AbiJaSPM (ORCPT ); Mon, 31 Oct 2022 14:15:12 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 813EB65C6; Mon, 31 Oct 2022 11:15:11 -0700 (PDT) Date: Mon, 31 Oct 2022 18:15:07 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1667240109; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lwgO5XEJCp0Zffmg4gdserNs+oDiJwvtqN0WugL8MiM=; b=m8Lf4rvCdtKN7G7frjl9AmkOws+ZjWwUeRtw5JAcUw7bapDcKan/rLGsSlJ3URyfanbg8+ +VijeDyiphBCtNXdsrkwHkPlH0uxd/KB1bP4yEqukdL1VV9iW/wGdwwYQCU6MRaIa5W0uK fYPMarEB3FYknitjhcrnejRMwdJ+IulBTMAKCuizZrl5/M/3BdehadSqCF0eq4E8B5+3iV SnHrSlBv5zGBq2HaqilWYQHeaWuT9QBqrTQIRdRg4DeSrbezzQZw6qaugKZ3WQw5wEwTDI CXoVOFUvwC7i9wykL7Lrn20qslBT1SV4ZgCNM7a/iLK2Yzb0SdThnNGXdk+Ycg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1667240109; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lwgO5XEJCp0Zffmg4gdserNs+oDiJwvtqN0WugL8MiM=; b=1AXIBTck4nhnv6YivWHCyMwKkiU7guMhDHlQPzdMeIJ8YcP/MzLw5D63udjV3G3y0QbwOj BhHOn+7USsCPU/AQ== From: "tip-bot2 for Tony Luck" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: ras/core] RAS: Fix return value from show_trace() Cc: Tony Luck , Borislav Petkov , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221018165900.109029-1-tony.luck@intel.com> References: <20221018165900.109029-1-tony.luck@intel.com> MIME-Version: 1.0 Message-ID: <166724010782.7716.13211418678900484853.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747045563069632479?= X-GMAIL-MSGID: =?utf-8?q?1748228849402327779?= The following commit has been merged into the ras/core branch of tip: Commit-ID: 50865c14f34edbd03f8113147fac069b39f4e390 Gitweb: https://git.kernel.org/tip/50865c14f34edbd03f8113147fac069b39f4e390 Author: Tony Luck AuthorDate: Tue, 18 Oct 2022 09:59:00 -07:00 Committer: Borislav Petkov CommitterDate: Mon, 31 Oct 2022 18:55:18 +01:00 RAS: Fix return value from show_trace() Documentation/filesystems/seq_file.rst describes the possible return values from a "show()" function used by single_open(). show_trace() returns the value of "trace_count". This could be interpreted as "SEQ_SKIP", or just confuse the calling function. Change to just return "0" to avoid confusing anyone reading this code and possibly using as a template. Reading "daemon_active" was never an intended use case. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Link: https://lore.kernel.org/r/20221018165900.109029-1-tony.luck@intel.com --- drivers/ras/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ras/debugfs.c b/drivers/ras/debugfs.c index 0d4f985..f0a6391 100644 --- a/drivers/ras/debugfs.c +++ b/drivers/ras/debugfs.c @@ -15,7 +15,7 @@ EXPORT_SYMBOL_GPL(ras_userspace_consumers); static int trace_show(struct seq_file *m, void *v) { - return atomic_read(&trace_count); + return 0; } static int trace_open(struct inode *inode, struct file *file)