Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp433178pxf; Wed, 31 Mar 2021 07:07:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1PEhCjOUUCvMFKdzPxCosMLqgjl5Ob+xa6DmMjzC2KLk+iswF4zN8d5YUqfXbUD2HylwS X-Received: by 2002:aa7:de11:: with SMTP id h17mr3832774edv.83.1617199635037; Wed, 31 Mar 2021 07:07:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617199635; cv=none; d=google.com; s=arc-20160816; b=P+CMEYVln0Plqq2+XLclMEA1IrKD/BcmRGunfHstPBTT+h0jKDTa1sLx3ag9AwDtGx GGmrs5ah2q4XaDBFX47a/WgbT7L/dDhAeJ74v29ar3YbdIXVvRYQPDXJ8ltZthttBvGD Kn3kW8GdHqeAT4NEHway3S8iD0XTi6wpn7LnAvpfxGSGXou3ObifL/FY+ekoXJgKeDaZ B0l1sWQo99/lKXxHhNRPkj3BIvcAvAkO0zGXdvx3Wc7iDIRmSUn2Czp5V6z/PLRrIBDz bxGRBjayZR5R+Q1gFdGuqUfouv+j7OVka1Ys+dzSihMKR9FT8U55VNRDLqkjGJCpZc06 0Y4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=fy/Lii1C+il9pHjSHwGwr2IkdGTboeNxx/tAmnUV3w4=; b=KeHi+MlIYetGqJYD3aqWqpEyR6r4fBh5rTIIP9hecg9hwL5TGn6skKCsawugXnySHa FcT5U1D9LPi0ED1n4Gikfmd3D9gkaZkPHiaZLYHnfdcsZFw14hDbDcd0zu25v5249kNv EEKjLEoLI2X0wPkzYU7DwCFGFpyrxjeosEn7EH+AC7suosabcNQyLQh7PiXT0/IS4Y4B 6vg1lGsc30SHJymaSpFTa2FsNQylMgQsywhadKjCdeim/3EgQM1hT8c0CVPJx6tApxt7 HUA9QQaZyMfj/vaXSEwe7t5hDAtgxr43OXE/lk+yw88MvIfFRPPGbjel6gvoAG1QlQw1 jSkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dJ4hO9DM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g23si1586589ejd.676.2021.03.31.07.06.51; Wed, 31 Mar 2021 07:07:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dJ4hO9DM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235929AbhCaODp (ORCPT + 99 others); Wed, 31 Mar 2021 10:03:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235630AbhCaOD1 (ORCPT ); Wed, 31 Mar 2021 10:03:27 -0400 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71ED3C061574; Wed, 31 Mar 2021 07:03:27 -0700 (PDT) Received: by mail-pl1-x636.google.com with SMTP id v23so7956659ple.9; Wed, 31 Mar 2021 07:03:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fy/Lii1C+il9pHjSHwGwr2IkdGTboeNxx/tAmnUV3w4=; b=dJ4hO9DMjknNiGKQBJYsPKZ5Rj3wQQYJXyW2qnzApF9Np2x+PkrB0nFEhfxqda5Hrr 3OAV5EYbOY6Txjq/TVw7nt7B1bLrwF6CufuNU/w7VR2zAPvaWOs0KN83GeEGt1lnZMo0 64L/pzTeTMPWNw+nHqriRuUZ/vmRKXYc+utkjqSkR6r2kxrpT3DVYMNIHZSE2EJ2Li94 u2azs9ClAKZI0TZSKP0gs6YdvXzRi6kZfG5iEZDSkLjzzPcZFnmiN0Sf7+GCM79qIJod GYzQATU6firD28YQKGM8GXNm9/dNo1QJOyBK5MZvlI0K1md39X1ZePdCcUheYZ8sCJwx ZKSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fy/Lii1C+il9pHjSHwGwr2IkdGTboeNxx/tAmnUV3w4=; b=n/HgTABQwhJ7Lhqi7qhZibXDiL4nC+YVw6msHL7ikkZ+TreATyXKiQlsjqN+840V9y sK1lS7IdKRaoy/EbhahECTHOioWHiiFueNnkhBFgLKJLInjN9flfj+j4w5Ayvj2Ur/te VFle/2eP5ZLyUbrJYf1lAH5eqQkLUWKmi3DaBfrUy7rax0FdMzlK28+1nfEcSDV+nLH6 3B6RZ+DswMHYYQ29iUyuGZoa0JVsueV2w+1fIVhfq2gTabnS5eiNQvHk3Rq2venoW5iY +vChAa+GNyQIojdphNWjAfavozGHlKjNPbZD63XzYCDUdAX3L9ESuyBlS9KnYvN/uYWz fvbg== X-Gm-Message-State: AOAM530vQTcRbjZa8jafFUr09DEBw9pLu1dH/HWzvkthVHTR5zS1ekfw +8A0jwLz2772UEaYTCOeP1DWUao8J21whM2HW54= X-Received: by 2002:a17:90a:b311:: with SMTP id d17mr3729837pjr.228.1617199406889; Wed, 31 Mar 2021 07:03:26 -0700 (PDT) MIME-Version: 1.0 References: <11a8323c249ae6ea7584402ab0fb74551b6a4b7d.1617189926.git.matthias.schiffer@ew.tq-group.com> <4c143c8ee65fe52840ccbb4e1b422b6e473563d9.camel@ew.tq-group.com> <38b1191ce594d9fefe9e0e98b3fa8ca0a23ee3ea.camel@ew.tq-group.com> In-Reply-To: <38b1191ce594d9fefe9e0e98b3fa8ca0a23ee3ea.camel@ew.tq-group.com> From: Andy Shevchenko Date: Wed, 31 Mar 2021 17:03:10 +0300 Message-ID: Subject: Re: [PATCH 1/3] gpio: tqmx86: really make IRQ optional To: Matthias Schiffer Cc: Linus Walleij , Bartosz Golaszewski , Lee Jones , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 31, 2021 at 4:36 PM Matthias Schiffer wrote: > > On Wed, 2021-03-31 at 15:39 +0300, Andy Shevchenko wrote: > > On Wed, Mar 31, 2021 at 3:37 PM Matthias Schiffer > > wrote: > > > On Wed, 2021-03-31 at 15:29 +0300, Andy Shevchenko wrote: ... > > > I don't understand which part of the code is dead now. I assume the > > > `return irq` case is still useful for unexpected errors, or things like > > > EPROBE_DEFER? I'm not sure if EPROBE_DEFER is relevant for this driver, > > > but just ignoring the error code completely doesn't seem right to me. > > > > platform_get_irq() AFAIK won't ever return such a code. > > So, basically your conditional is always false. > > > > I would like to see the code path which makes my comment wrong. > > > > EPROBE_DEFER appears a few times in platform_get_irq_optional() > (drivers/base/platform.c), but it's possible that this is only relevant > for OF-based platforms and not x86. Ah, okay, that's something I haven't paid attention to. So the root cause of the your case is platform_get_irq_optional|() return code. I'm wondering why it can't return 0 instead of absent IRQ? Perhaps you need to fix it instead of lurking into each caller. -- With Best Regards, Andy Shevchenko