From mboxrd@z Thu Jan 1 00:00:00 1970 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0B5CCC52D6F for ; Thu, 22 Aug 2024 03:00:02 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Wq7Gm52jCz2xHW; Thu, 22 Aug 2024 13:00:00 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=213.95.11.211 Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lst.de (client-ip=213.95.11.211; helo=verein.lst.de; envelope-from=hch@lst.de; receiver=lists.ozlabs.org) Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Wq7Gl5Rmqz2xGQ for ; Thu, 22 Aug 2024 12:59:59 +1000 (AEST) Received: by verein.lst.de (Postfix, from userid 2407) id 2C504227A8E; Thu, 22 Aug 2024 04:59:53 +0200 (CEST) Date: Thu, 22 Aug 2024 04:59:52 +0200 From: Christoph Hellwig To: Sergei Shtylyov Cc: Michael Ellerman , cassel@kernel.org, dlemoal@kernel.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, hch@lst.de, linux-ppc@kolla.no, vidra@ufal.mff.cuni.cz Subject: Re: [PATCH v2] ata: pata_macio: Use WARN instead of BUG Message-ID: <20240822025952.GA32067@lst.de> References: <20240820030407.627785-1-mpe@ellerman.id.au> <6b2208d1-c18f-14d5-e6d0-acd5c82b4db1@gmail.com> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Post: List-Subscribe: , , List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6b2208d1-c18f-14d5-e6d0-acd5c82b4db1@gmail.com> User-Agent: Mutt/1.5.17 (2007-11-01) On Thu, Aug 22, 2024 at 12:13:52AM +0300, Sergei Shtylyov wrote: > On 8/20/24 6:04 AM, Michael Ellerman wrote: > > > The overflow/underflow conditions in pata_macio_qc_prep() should never > > happen. But if they do there's no need to kill the system entirely, a > > WARN and failing the IO request should be sufficient and might allow the > > system to keep running. > > WARN*() can kill your system with panic_on_warn -- Android is particularly > fond of this kernel parameter but I guess it's not your case... :-) > Greg KH usually advices against using these macros. :-) And in this case he is simply totally wrong. The whole poing of WARN_ON is to have a standardized way to assert conditions.