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 X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FC49C2D0E3 for ; Wed, 16 Sep 2020 00:57:24 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E6D3C20715 for ; Wed, 16 Sep 2020 00:57:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Z9TG+4r+"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SQwY50UR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E6D3C20715 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=J1H2d7BHnTxvB+A97PohmxY/NgEd3DknxUOkhaOTNPI=; b=Z9TG+4r+aDL5uqfLwWMHf7w3W cInFP1yzkL7biZ3YYRx4q0pQZKo7Zg3PtJ8Ws+a7iMTQzPMcwQfjCHY0Unuik9MScdM+4Et2iZ+a4 run64I8pZumJHAs69B4vHzNvQXMbByRnM4hx8eeyS6SbBuaOySAv/xs+8fHvZlFF716kiUCJDOwIL CIE6Ap81v1yYoOz+2usu3XXBwLScs1K3XNHIyqKVWTdSo60NITzjsr85gubzAgTvXx78R94sdaeJ/ aDEMgN7EJ2QiiicckuIONn+XoH/JWOzWIvV+j/0R1hOzpxsnQMiVMkCc1bxL+SccNG20U2dwrLTz/ 9qynMQHkQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kILjs-0001Nt-SW; Wed, 16 Sep 2020 00:56:00 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kILjq-0001NJ-BN for linux-arm-kernel@lists.infradead.org; Wed, 16 Sep 2020 00:55:59 +0000 Received: by mail-pf1-x443.google.com with SMTP id v196so2981966pfc.1 for ; Tue, 15 Sep 2020 17:55:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=5WnqQo2Lowlin22i7BC8k3J/mqtslpC+HNSb2Y/I9XU=; b=SQwY50URAennX8rIMsKjR9YH31Mnwtxf0Q/MtJkEQ72ewQOMgnuIBdzQClg4BXkWFF hG+T7sQr64XjQqH15Vir1QMZK8AOI8vn5UZY6mlrDDAp6gv7e4d5cYDiKPIw4cftBP3Y GfQWxB7+utjQRiFghglEvWOeAUijJziWqdZTugcZG6jUSp3txORT8dN4EAhvBy5ZK/e5 ogSv0BFp0r8z9g3vn4qRoHBxzQz85cRrE3F6z8AIm12BQLt0ZbxrFtdvAjyoPEfGRXKg PukLphBlbNOb9+v27+hlkYD0xxqwZEUSVoAX/iVC/lNVYNGEoGPJZijsr7XI0Z6KC2hl xyAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=5WnqQo2Lowlin22i7BC8k3J/mqtslpC+HNSb2Y/I9XU=; b=gmqrb9cfYazoSXVzRv68U8zPMjmBJY3E0pF7NeoIGjm9PCR+SiyYL4EJ/kF9NnUihi d2ZZrqmnPJvFHyno2I7Z3JA+7QnZgj1wOtXFQpUJczVVzv2AnzUuHYUk6QMIbhQukJud LW19zp6nBkL78KESdQ5fNJHeshqIuJhJiy7IYf78tSnR77orlGYrQrvwuqnFOVd2nUed cTyaBSEK9k2FcfkQ9rUJDLsHesEp5870fW1EKgYbC94b+k/JQxEEKYMVMKik+jwrNnou WOmsYn7vLRzyQmJWh8IPXhu34ZW73oclr1LLR2w5qBV8BJuOoRmoUnB3N3gKsltATihR XRhg== X-Gm-Message-State: AOAM531GeTyPV59Gmr9bK1xlGxH/BdsL10b7w4xqjN3vVbLIsK8YKj5z yA0uTTAZ1aT0XF1WqBrFiwFD2TTHz5c= X-Google-Smtp-Source: ABdhPJyHEaAUDNJSlMmVV9YoOH8CP9KBBg/2ow58SZYT/sQdhGP48np5EqZMtsyEDJ0m+Pj7mjuA8Q== X-Received: by 2002:a62:3812:0:b029:13e:d13d:a062 with SMTP id f18-20020a6238120000b029013ed13da062mr19058181pfa.40.1600217755803; Tue, 15 Sep 2020 17:55:55 -0700 (PDT) Received: from dtor-ws ([2620:15c:202:201:a6ae:11ff:fe11:fcc3]) by smtp.gmail.com with ESMTPSA id e14sm12296105pgu.47.2020.09.15.17.55.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 17:55:55 -0700 (PDT) Date: Tue, 15 Sep 2020 17:55:53 -0700 From: Dmitry Torokhov To: Krzysztof Kozlowski Subject: Re: [PATCH v2 1/4] Input: ep93xx_keypad - Fix handling of platform_get_irq() error Message-ID: <20200916005553.GF1681290@dtor-ws> References: <20200828145744.3636-1-krzk@kernel.org> <20200914065120.GR1665100@dtor-ws> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200915_205558_401140_8BF71E23 X-CRM114-Status: GOOD ( 22.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, Chen-Yu Tsai , "linux-kernel@vger.kernel.org" , Maxime Ripard , linux-input@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Sep 15, 2020 at 06:05:22PM +0200, Krzysztof Kozlowski wrote: > On Mon, 14 Sep 2020 at 08:51, Dmitry Torokhov wrote: > > > > Hi Krzysztof, > > > > On Fri, Aug 28, 2020 at 04:57:41PM +0200, Krzysztof Kozlowski wrote: > > > platform_get_irq() returns -ERRNO on error. In such case comparison > > > to 0 would pass the check. > > > > platform_get_irq() is a bit of a mess. Historically we allowed defining > > interrupt resource with r->start == 0 and for such cases non-OF non-ACPI > > code will return 0 from platform_get_irq() to indicate that IRQ is not > > assigned. > > > > We either need to stop doing this in platform_get_irq(), or the > > conditions in this patch and followups should be "irq <= 0" and we need > > to make sure we do not accidentally return 0 from probe ... > > Hi, > > It's then contradictory to platform_get_irq documentation which > explicitly says - zero will not be returned on error. This was also > clarified in commit e330b9a6bb35 ("platform: don't return 0 from > platform_get_irq[_byname]() on error"). It was for OF/ACPI, but not for resources described via DEFINE_RES_IRQ or other means. However I see we added a big fat WARN_ON() in case if we end up returning 0 still, so I will be applying your patches. Thanks. -- Dmitry _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel