Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp464139pxb; Thu, 26 Aug 2021 07:11:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1pBfD/S+Dj1/JCNpVU6g+DdJqxiZaUSANdtdwtuE0s5X+LAHuCUVcOYVSpGpnGTu+I6qX X-Received: by 2002:a92:d20d:: with SMTP id y13mr2846215ily.294.1629987062385; Thu, 26 Aug 2021 07:11:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629987062; cv=none; d=google.com; s=arc-20160816; b=J4LTTMc/WmeDJzQBxp88ralmsWfRjZXPVYoL7U6aLvIwI0doZN8blZFH92W1Wc8G9o egmC25l+Cl4z3nWocjDil2S4gYvFXJEH6+KMlRy8V/8ancL1jGlqXIeHQm8L2nSKQ0rY lZ0QYsETaarp3DlgHAtqw6Blq76aipt4VlHWAhKRr5bMvyeNqXohGYP7ln55lZ34irbg ta1UOH0TPWLwG4vNmKUy477M4oE87iel7NsDkq/J1/JAPOhB9q0HlyOMDNsr66hAliS6 RucAKiY+AiV/ak2W1MchLcLadyr/QGVZpFXKxsh/1LQRil47bvlac+GnuVQJ7O3R4+fz ODGg== 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=IHu9tR/6Cya7biP79tZOJnTzvsP2TvD1XGVXSlWQptc=; b=PltaiUvGpdMrtPsjHDYXbwhGuQs1oqcj/+LDYpZMeE94z05aRSV58N7bpenaybXaEI DyZdL/aP1Sv5mUBjmm8yxlrm9U5UXjV5ty2kT79lNv01EyA+xfk1+nf+s4BUZzTDSTHd aIqSruJYYTTNM7gUNfyxcbQdKb2dAvPXI+YEUZiILOzVdFcwyJxBCz/3DAx94AGC2ZLM qpgNf83GRwU/b3bb0cjMXsllzKXBFEVMkPynPoWZzSzCTafnvdV1sPbXMdQf4RsUyDQr PWZMnqZ3QTnZccZxHMvo1/subGNjaiCyOu4kRjdB8e5NndZcbJ8/XiSY0mv+OrR/f49o J/9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nOxTMSOt; 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 m12si3395515ioj.96.2021.08.26.07.10.46; Thu, 26 Aug 2021 07:11:02 -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=nOxTMSOt; 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 S230135AbhHZOKD (ORCPT + 99 others); Thu, 26 Aug 2021 10:10:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229832AbhHZOKC (ORCPT ); Thu, 26 Aug 2021 10:10:02 -0400 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F0AAC061757; Thu, 26 Aug 2021 07:09:15 -0700 (PDT) Received: by mail-pg1-x52d.google.com with SMTP id x4so3206769pgh.1; Thu, 26 Aug 2021 07:09:15 -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=IHu9tR/6Cya7biP79tZOJnTzvsP2TvD1XGVXSlWQptc=; b=nOxTMSOthtkjbNfMJmiDbRBqwR99W6NY3um9pitOe/YvF8Pesoqc3KYuvI4jKAq9lW Mhc/Danh+eSy4aK6FNWZMrAJ/azsGr8x1yUHM4YB/R0HbBAgD/LmJbyxopQxKsUSp9la 8HoXUT/gI8ZK3UiSnY4xt47YDXyTiN+Q7xEmgLZXlso26skqrAHmpJBcX7r6Iu4aukXh pcVbQ5R1RONsrj3/5VOVsG+FlVEgK532l/tHTgGUuap8A9h7IAWHY+1skfFGILmMFM+a 4bWN+iJo0wPiZHsrM5IYdlBhF9EJyZFlxfqlEaL4Ofq9Q+chfhWpi4DozZHl/+jJ+/UZ IVLw== 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=IHu9tR/6Cya7biP79tZOJnTzvsP2TvD1XGVXSlWQptc=; b=CRqY9FGpyuGW0szhxkIWNPS43R1ecfqAT2QVE7V5ztzUdO+dFyt9aPLU1431oGtChe 7iApdRMweZdSUM0kVpaGY3S8L5EcssgIuhwlVHrBmccJYuXn84EHxU7yALnxdxS+FEv3 i3LeaouRuOPnGyj5dWF6J1W21HvPEuPDzhudygSt7tBAeYV4mXpDVSINHGJShTLVWIi2 /u+fJ08LRAk/JcqCLaDTtblDXGnICdy0bdKD+6zjgoyOoLROpxN78a4DgUL+9OfpPhK3 RCZ/r0xVYsewMxVrAt6C9ZQX889iL+74wmKjPqP4RE2i3DNuPNHq4GlgY2aPIwZJ1TLt 01YQ== X-Gm-Message-State: AOAM5323iwAqWRcMFXW35a7kcn7aykae9PTjMhhZiMwy90e5The0fnLY r89hl2s0MNt0iL8F+HvZgJJhI/xU1Iuh8J68lMaiHhjm5pd3eg== X-Received: by 2002:aa7:800b:0:b029:330:455f:57a8 with SMTP id j11-20020aa7800b0000b0290330455f57a8mr3861506pfi.7.1629986955001; Thu, 26 Aug 2021 07:09:15 -0700 (PDT) MIME-Version: 1.0 References: <20210817081401.3440-1-utkarshverma294@gmail.com> In-Reply-To: From: Andy Shevchenko Date: Thu, 26 Aug 2021 17:08:35 +0300 Message-ID: Subject: Re: [PATCH] serial: 8250_mid: Use pci_irq_vector() to get IRQ To: Greg Kroah-Hartman Cc: Utkarsh Verma , Jiri Slaby , "open list:SERIAL DRIVERS" , Linux Kernel Mailing List , linux-kernel-mentees@lists.linuxfoundation.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 17, 2021 at 3:59 PM Greg Kroah-Hartman wrote: > On Tue, Aug 17, 2021 at 01:44:01PM +0530, Utkarsh Verma wrote: > > Instead of a direct assignment, use pci_irq_vector() to get the > > Linux IRQ number. > > Why is this needed? It's not. > > + uart.port.irq = pci_irq_vector(pdev, 0); > > What problem does this solve? > > Do not describe what you are doing, but rather, _why_ you are doing it. I think I know what was the motivation here, but actually there is no problem with current code. Indeed, when we enable MSI we have to update the vIRQ line, but this is done in the platform related ->setup() callbacks (for example, dnv_setup() does it). So we have two scenarios: 1) there is no MSI enabled and in this case pdev->irq is correct; 2) we have MSI enabled and we need to update previously saved pdev->irq. What you, Utkarsh, are doing in the patch has no effect, because at that point MSI will never be enabled and pci_irq_vector(pdev, 0) will return the very same value as kept in pdev->irq. -- With Best Regards, Andy Shevchenko