Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp3937181ybe; Mon, 9 Sep 2019 01:19:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzUVv1sJ1Hq/NiRURKXe6OBmGm4jgEZSYR+edE5aecpAzs+pIujTfyCtac8a2qTmdS2tbka X-Received: by 2002:aa7:dacc:: with SMTP id x12mr16538318eds.116.1568017160481; Mon, 09 Sep 2019 01:19:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568017160; cv=none; d=google.com; s=arc-20160816; b=aHSeY591y8c2pRVulK1164cWDb8reMQmP2UXEPQ2jj8fPwsHiGHUEkz+CaPhPBE6Xz i0Bx3/OpnEXry0YFlX5qtk7OyQjVOrtENceuR7XvFxNHn9rOr+qAcCmbXQgLc0g053mI eiSECTEBrm9WrgxeJkJ06TfyBnLBp54dAEoOPJTjg2AhiBEeS4mdTbc0AmBv01RJ95p8 UTkyklsprWjI8YGd0TyMgLCECZiqwHvqWWn/j6GQhFLwhIeJmxU/MImcCosJg01mxvdT qaLlwL2qx0yOzAl/UzZmPzTdu1Q0n+aMydSkD7PCOkZiLwijSsA1c4fr5f+vaVxslSDu OcRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=yvmRB8H6gwsHsqto2GF3uYiKQD0C/YijAeUWR3GUYjg=; b=TFGjKFQ7BrQuRVq9wRcc9iyW592ffMmtXrRenoK75R6TtiwxQiy/u3n4WjYz5svZ73 wjllOU13ezcXZNER1N3bFBzf4S2BNU3P+ACHR7xaxAgN19aI6+lLDXgzCJN0rdVGLwph Fc03LDudWk0c379AII7X8D2uBZwDgipUwSIpgpbxdW6MABSMn8VgN1qgjF/49wYWEh2k 7OjkMOX/MY7JBcy3NPDXttv3QvLKFdYnoXdcrRLc5kbuSXcgE8wQUz+xhuieaPh4wkkP Jx+sSwBelAj6VMnDs8jiaVfV5BRk9nuR57yq4aBwtCV4b30bOT31yH55uNGACnwf3z6T 1X9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=lLjpu8MY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j14si8179983eda.181.2019.09.09.01.18.56; Mon, 09 Sep 2019 01:19:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=lLjpu8MY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726999AbfIHIQK (ORCPT + 99 others); Sun, 8 Sep 2019 04:16:10 -0400 Received: from mail.skyhub.de ([5.9.137.197]:55870 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726282AbfIHIQJ (ORCPT ); Sun, 8 Sep 2019 04:16:09 -0400 Received: from zn.tnic (p200300EC2F2BAF0051BF1FB1AFF5BFE4.dip0.t-ipconnect.de [IPv6:2003:ec:2f2b:af00:51bf:1fb1:aff5:bfe4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 6C6B61EC0BF6; Sun, 8 Sep 2019 10:16:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1567930564; h=from:from: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:in-reply-to:in-reply-to: references:references; bh=yvmRB8H6gwsHsqto2GF3uYiKQD0C/YijAeUWR3GUYjg=; b=lLjpu8MYJNxrsW2LI6uDdK7tvOcCxbYBlSRw0xkmK232uGPI+RlQN/fpccvLQJI6fnF98k 3rJDvVwYs9m/cEdxOPGWmZH7T2+U/SEs8kFRKOWNs2bpe9NssS8Iz5O8wPu4E/v51jeKI9 kJYqoFllGDc+SxG4sRoZif9o/CMvulA= Date: Sun, 8 Sep 2019 10:16:02 +0200 From: Borislav Petkov To: "Hawa, Hanna" Cc: Robert Richter , "mchehab@kernel.org" , "james.morse@arm.com" , "linux-edac@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "dwmw@amazon.co.uk" , "benh@amazon.com" , "ronenk@amazon.com" , "talel@amazon.com" , "jonnyc@amazon.com" , "hanochu@amazon.com" Subject: Re: [PATCH 1/1] edac: Add an API for edac device to report for multiple errors Message-ID: <20190908081602.GC16220@zn.tnic> References: <20190905083745.6899-1-hhhawa@amazon.com> <20190905095642.ohqkcllm7wufx6sc@rric.localdomain> <50f5bc27-98da-ee3e-59dd-7252c3ed7a0a@amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <50f5bc27-98da-ee3e-59dd-7252c3ed7a0a@amazon.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Sep 08, 2019 at 10:58:31AM +0300, Hawa, Hanna wrote: > > Better use WARN_ON_ONCE() to avoid flooding. > > In case of two drivers using this function with wrong error count, only the > first WARN_ON_ONCE will catch in this case, and other will miss other wrong > usage of other edac device drivers. The idea is to catch any driver using a 0 error count and fix it, not to flood dmesg. You want _ONCE. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette