Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp122630rwr; Tue, 25 Apr 2023 18:51:51 -0700 (PDT) X-Google-Smtp-Source: AKy350ZdTHDd1P+gyfJg3fPuTe8WT4lpPOvhgUVF332iaPb4a0LYTSA72Tryf2TRM/4xwyIK1ryo X-Received: by 2002:a17:902:f80e:b0:1a1:d366:b085 with SMTP id ix14-20020a170902f80e00b001a1d366b085mr19505932plb.21.1682473911118; Tue, 25 Apr 2023 18:51:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682473911; cv=none; d=google.com; s=arc-20160816; b=VdyiUq0YjIvVNBNpo2rhGlhJtIqT6dnyjEar4LupO7rB5cCFbW4KxcF0cnteAoOu/h NPKP57eA7DrEk/WDo7l9B0pabaZptEqJlTC2ubhASP0AmJKRE0UvDsHSrTp0bVsdAK55 OCmxu5W8kc5FGWu0s2e8e8v0uG2hweK/meDH16IDFY5fX7QB0rRUC3O58LBa9bGlkWTO fmzRRZpp9kpCh2QUrPiNeZ9jmsguKul3gTZmgtMThJOljOSMTExBPGsC6ct9JVC/7OAb HxymTYzNNwXhx2Gn5pjlhVWpspGPFgNHFPgBwRhOsxVzieX7PjpxC00l1mvkfJqk1vRC 02xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=7PscwKm2yQRHxP0YT4UFrJVFoWTRG9h5ki6EJ3KYsuA=; b=ws/iFT08w7GK6x6kDlAoC5AXMzxwsoES3EdRjjBT52a03dlv0Bg8QK10eXZgd61rYF /pFgYfuG1vg/nxm3IPuilPYvxpxfSImEFpM5WgvwUp2afE/P9xV4//hs3fq8OdZlHfuP KiMdMu8r0y0LiI2ZE72/JC9PgAR7mh+mYqGB/2weferZ5zeONAcq1TnZu0DiXAKNNGqA ie3HNJbmUqy9pzYVdpDdtouU8KLmSRKdWopUmhEgpr9P/hyVqOw/q3inAa3VVFk3K69h U76VGpr9w7vZRT5Z3WG0FvmXYkbkieLNN67X0w5xmJxuarTbLFNjYG/UrFUXt841gyQ5 GI/g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h8-20020a170902680800b001a6fafb3661si14727060plk.459.2023.04.25.18.51.37; Tue, 25 Apr 2023 18:51:51 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239254AbjDZBvb (ORCPT + 99 others); Tue, 25 Apr 2023 21:51:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239205AbjDZBvW (ORCPT ); Tue, 25 Apr 2023 21:51:22 -0400 Received: from hust.edu.cn (mail.hust.edu.cn [202.114.0.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 227D5193D5; Tue, 25 Apr 2023 18:51:16 -0700 (PDT) Received: from [IPV6:2001:250:4000:5113:cc18:37eb:8a69:2648] ([172.16.0.254]) (user=dzm91@hust.edu.cn mech=PLAIN bits=0) by mx1.hust.edu.cn with ESMTP id 33Q1oQ02003919-33Q1oQ03003919 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 26 Apr 2023 09:50:26 +0800 Message-ID: <1488abfa-9a0e-970b-e074-11842a6c6413@hust.edu.cn> Date: Wed, 26 Apr 2023 09:50:26 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH] spi: davinci: Remove dead code in `davinci_spi_probe()` To: Mark Brown Cc: Li Ningke , hust-os-kernel-patches@googlegroups.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Dan Carpenter References: <20230423032446.34347-1-lnk_01@hust.edu.cn> <46299274-d827-279f-cadf-020e93296c13@hust.edu.cn> From: Dongliang Mu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-FEAS-AUTH-USER: dzm91@hust.edu.cn X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On 2023/4/24 23:52, Mark Brown wrote: > On Mon, Apr 24, 2023 at 08:03:42PM +0800, Dongliang Mu wrote: >> On 2023/4/24 19:48, Mark Brown wrote: >>> Is that check valid? 0 was a valid interrupt for some architectures... >> We just follow the comments of platform_get_irq(). >>  * Gets an IRQ for a platform device and prints an error message if finding >> the >>  * IRQ fails. Device drivers should check the return value for errors so as >> to >>  * not pass a negative integer value to the request_irq() APIs. > I'm not sure that's universally true yet, though there were some moves > to try to get us there. arm, where this driver is used, was one of the > platforms with 0 as a valid interrupt. Hi Brown, First, we're sorry about the fact that our internal robot(beta) made a mistake and sent our testing message to LKML. We have fixed the incorrect logic. Second, from code review of platform_get_irq / platform_get_irq_optional, it would warn IRQ 0 as an invalid IRQ number. out: if (WARN(!ret, "0 is an invalid IRQ number\n")) return -EINVAL; return ret; Dongliang Mu