Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp365735pxf; Wed, 31 Mar 2021 05:31:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxptm8O07t7/o+dNMR53aE/dnCtueF6kjpqPwpbb/jNrRHcLESJQuMVOOaRW/5JxL+1LEe X-Received: by 2002:a17:906:3409:: with SMTP id c9mr3252368ejb.314.1617193877201; Wed, 31 Mar 2021 05:31:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617193877; cv=none; d=google.com; s=arc-20160816; b=mKc9qWzeT4CxYgQGieFOy+2T6aBVGRoxiBEAtaLnmOjxUgJ7WTrNYju6PutD13WGw3 JzB83UApt0wq/ZJlEKwdTE6NsdRGaDXw9bv/00g0iIpz0cjqNpYJqJjMgAfozdlt46FK jsaPVtoSCCrSDjzW80q48fwLMeG1TgRvFgyt9YTYPDaUGilqUdk3GwoDyZia3mngfelZ kDzN6kH7G6nY+aLSgBYyTgXj1uPY/8hojuzMmil5UnxQdKc8qvKFJb4gyVT6I4hO+IEv 6aolYFC7kJkAjhl2W17WRNrxk6xZs1XN83vgBBVNQXi6r5HphszVIzWHx0FqLxsGU0a7 +2Cw== 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=HACgQ7+uQvos15VetYD4qmdIFhQdRVG33GPC4mVBVS0=; b=FvD/gyXj6k0sAOADABk4/6s9iHklEITdVn0+Z1XZN+eHfpt4wiMfCtBRotNfVj8v9m fmavvMneerhcoOn0oZLhSmmZHl/NMFTW9r1KTa0uuT1kgxeloCh9D4nShS8Cb/0/2aPT I2r5ur5DjRengSx2bUmGYxXdYhV+RsCmUvj111tFbqQENJ2ROpvCw53nwjbL16FTTzVo 2E+v1FnGGR/A4zh0A1yEFn+bz5QHpGDvHiJzadctCmRjamfkPzxmffZQspClPoGvUJp3 +ZQ6AKSAdu3psIxh7OIleIp9UuReE2HrNu9IwmbG/XNzRgx1V9HP8v7E/HfcY49rCCi8 NVtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IfqlyvP5; 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 i20si1567367edq.582.2021.03.31.05.30.54; Wed, 31 Mar 2021 05:31:17 -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=IfqlyvP5; 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 S235451AbhCaM3u (ORCPT + 99 others); Wed, 31 Mar 2021 08:29:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235548AbhCaM3S (ORCPT ); Wed, 31 Mar 2021 08:29:18 -0400 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94802C061574; Wed, 31 Mar 2021 05:29:18 -0700 (PDT) Received: by mail-pl1-x633.google.com with SMTP id y2so7816701plg.5; Wed, 31 Mar 2021 05:29:18 -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=HACgQ7+uQvos15VetYD4qmdIFhQdRVG33GPC4mVBVS0=; b=IfqlyvP54yTw2OlVFRylgxEpFgL+L8LrIw5rlZXKRU83aGH5FGJlorjQLzQ5xIZyWP j3KXc/9Tc/jJ2sUAzonq23qxH0+4iaRoZpgFe/qsxTKR79f5Y2PxVShmMNJu/22dwR4l wJWOp469MSPshA+HMWhH3+fP03gL+inqglXgmUebdB0abja252P0SXXjBqF5TXkIxmQE VWCTam7yiPjxxWUdLOj8BUq9zM64yiWO0V9p38tMqiXaErHNGMYxluvEr4hyaP3g0tf+ 4FQI70PVSFNN3gAyY+3Ezg46/Twb2ArBmtjLf9VfKgoiA0nvhyqKmgfBHPrz/VOI/917 6sSQ== 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=HACgQ7+uQvos15VetYD4qmdIFhQdRVG33GPC4mVBVS0=; b=V7TgmGZn9z2nfsU2j2SsDSwrBrShUmmqQ41SlRkFckMsQbiRtMsdk/d7ewnJLuWykN b4sHMWcrZLA7vLzTdLWvxOXF0saTP7UP6+HGkCxFkiVMFRrcxTZ4qWggrr0kx15ZFbnv qCO0ocMSgu92UgEy3gz0yQSW1CnB15uPhOoeZm3Iw73pl+XuXlZ2dmqa1bXnjgc4SSI4 Lclh8vJcWZp/Kc/0p2dWHh/aXZtk+mgiiWTawEwNrx5HzFCBBucBA4JH59VDLk6Z5GsL vbcu8JBq7XT1iX60n1WxKm7K4xZunADQsDN7a2Bgp1RC84zE6hv0pHSZ6vBU8B7X8sbH TLSg== X-Gm-Message-State: AOAM533MkrhAbUxUn2H7CD9ItCEuPV8Tvco3GKcGUimpkmkRnJWizdKF DusML7l3dbgIEU2tVdak7nY5tVv7Pw7vwE5nWYA= X-Received: by 2002:a17:90a:e454:: with SMTP id jp20mr3381496pjb.129.1617193758181; Wed, 31 Mar 2021 05:29:18 -0700 (PDT) MIME-Version: 1.0 References: <11a8323c249ae6ea7584402ab0fb74551b6a4b7d.1617189926.git.matthias.schiffer@ew.tq-group.com> In-Reply-To: <11a8323c249ae6ea7584402ab0fb74551b6a4b7d.1617189926.git.matthias.schiffer@ew.tq-group.com> From: Andy Shevchenko Date: Wed, 31 Mar 2021 15:29:02 +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 2:37 PM Matthias Schiffer wrote: > > The tqmx86 MFD driver was passing IRQ 0 for "no IRQ" in the past. This > causes warnings with newer kernels. > > Prepare the gpio-tqmx86 driver for the fixed MFD driver by handling a > missing IRQ properly. ... > - irq = platform_get_irq(pdev, 0); > - if (irq < 0) > + irq = platform_get_irq_optional(pdev, 0); > + if (irq < 0 && irq != -ENXIO) > return irq; This is a dead code now. I suggest you to do the opposite, i.e. if (irq < 0) irq = 0; In such a case below change is not required. ... > - if (irq) { > + if (irq > 0) { > struct irq_chip *irq_chip = &gpio->irq_chip; > u8 irq_status; -- With Best Regards, Andy Shevchenko