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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46C98C433F5 for ; Thu, 23 Dec 2021 09:31:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347441AbhLWJbY (ORCPT ); Thu, 23 Dec 2021 04:31:24 -0500 Received: from mxout02.lancloud.ru ([45.84.86.82]:47054 "EHLO mxout02.lancloud.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234179AbhLWJbX (ORCPT ); Thu, 23 Dec 2021 04:31:23 -0500 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout02.lancloud.ru 3E44722F2B43 Received: from LanCloud Received: from LanCloud Received: from LanCloud Message-ID: Date: Thu, 23 Dec 2021 12:31:06 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH] ata: libahci_platform: Remove abundant check Content-Language: en-US To: Jiasheng Jiang , , , CC: , References: <20211222072446.1096168-1-jiasheng@iscas.ac.cn> From: Sergey Shtylyov Organization: Open Mobile Platform In-Reply-To: <20211222072446.1096168-1-jiasheng@iscas.ac.cn> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT01.lancloud.ru (fd00:f066::141) To LFEX1907.lancloud.ru (fd00:f066::207) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello! On 22.12.2021 10:24, Jiasheng Jiang wrote: > It can be found that platform_get_irq() returns nagative code but not > null when fails. s/null/zero/? > The comment of the platform_get_irq clearly shows that. This comment still doesn't correspond to reality -- 0 can be returned (although this would cause a WARN() call)... > Therefore it should be better to remove the useless check. This patch is correct but premature. I have a (not yet merged) patch: https://marc.info/?l=linux-kernel&m=163623041902285 It actually disables reporting IRQ0. Until it's merged we have to filter out IRQ0 in the libata drivers as libata treats 0 as an indication of the polling mode... > Fixes: fd990556f0fa ("ata: move library code from ahci_platform.c to libahci_platform.c") > Signed-off-by: Jiasheng Jiang [...] MBR, Sergey