Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5364531ybi; Wed, 12 Jun 2019 01:01:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqxy/pxt36uqdtqt48YbNN9gz6duoJTWBfHSc9/AUtWKGm8sGeG+Wy7enp4K5yAnBK5ZrMhg X-Received: by 2002:a17:90a:3310:: with SMTP id m16mr18539918pjb.7.1560326504970; Wed, 12 Jun 2019 01:01:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560326504; cv=none; d=google.com; s=arc-20160816; b=yKnnyd35J79rkKH/GmFpCdwpXcSLX7uHZmvdXxD4UYPhvYwExd0UVQ/e0T+1cXOQkU Or9Ky8i/RjbQ9bx/pJXZbtekHPpcUN86kk5zK+IxpdsbEJWyfrsz3ZblckVFjhvhNt3x BWBiLonr987mRIH9jN14zchsIL0g/lENNQ9bzv/upQ9tQ80LBJ+Y8YqT058jli43EZJJ uM2qklJ660qyualGNRfTwS8kqdB/QHQhomj1WcjMmEeZIe0m16RGxR8UQdFRtvERZ01w /rqUa+vn0zJ8loBBAPi4CFu7D0QatnlouEXZtHsMfOXKPRwReHP+YxZWzzqc+mdegRFj /Bzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :date:cc:to:from:subject:message-id; bh=Iu1ee7FOeyd9Gv0GlEkYP80cHD6mXth14V6mxvC4sOk=; b=jqFamJDU7AwCpsZJr36n+vO8Iw/kEF7mLk+ToEgGgeU4Y/66bDgxjBsL67UCrJOtc1 +lovdGvG652uBjb3AAcboEqzzqkRhf/JZi8WRCpWH0GJxceqArJpZQ7Oyzby577w9BpD nMzfw7f200ibHntNDl3HTpcsaCuDlAdjpA8ENOYMcqqGNRCdELXmrHPwJ2tuKxGU1stt nSVSvMFRsq0OImr3HdQbJFQnN5GmmCtE68khk1OlqCAclYZKxRrae32H900bU5bqQaEY vGpq+RpPPJeI3yTeC7/HII/2ElK2oE9svDXP+b7VWH+rWFpbBWA99V9qH9FzKgkDGzT/ oLEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s20si15619324pgj.63.2019.06.12.01.01.28; Wed, 12 Jun 2019 01:01:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730538AbfFLFQ0 (ORCPT + 99 others); Wed, 12 Jun 2019 01:16:26 -0400 Received: from gate.crashing.org ([63.228.1.57]:51103 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbfFLFQ0 (ORCPT ); Wed, 12 Jun 2019 01:16:26 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id x5C5G5tU001179; Wed, 12 Jun 2019 00:16:07 -0500 Message-ID: Subject: [PATCH+DISCUSSION] irqchip: armada-370-xp: Remove redundant ops assignment From: Benjamin Herrenschmidt To: Thomas Petazzoni Cc: Gregory CLEMENT , Marc Zyngier , linux-arm-kernel@lists.infradead.org, "linux-kernel@vger.kernel.org" Date: Wed, 12 Jun 2019 15:16:05 +1000 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org pci_msi_create_irq_domain -> pci_msi_domain_update_chip_ops will set those two already since the driver sets MSI_FLAG_USE_DEF_CHIP_OPS Signed-off-by: Benjamin Herrenschmidt --- [UNTESTED] Just something I noticed while browsing through those drivers in search of ways to factor some of the code. That leads to a question here: Some MSI drivers such as this one (or any using the defaults mask/unmask provided by drivers/pci/msi.c) only call the PCI MSI mask/unmask functions. Some other drivers call those PCI function but *also* call the parent mask/unmask (giv-v2m for example) which generally is the inner domain which just itself forwards to its own parent. Is there any preference for doing it one way or the other ? I can see that in cases where the device doesn't support MSI masking, calling the parent could be useful but we don't know that at the moment in the corresponding code. It feels like something we should consolidate (and remove code from drivers). For example, the defaults in drivers/pci/msi.c could always call the parent if it exists and has a mask/unmask callback. Opinions ? I'm happy to produce patches once we agree... diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c index c9bdc5221b82..911230f28e2d 100644 --- a/drivers/irqchip/irq-armada-370-xp.c +++ b/drivers/irqchip/irq-armada-370-xp.c @@ -197,8 +197,6 @@ static void armada_370_xp_irq_unmask(struct irq_data *d) static struct irq_chip armada_370_xp_msi_irq_chip = { .name = "MPIC MSI", - .irq_mask = pci_msi_mask_irq, - .irq_unmask = pci_msi_unmask_irq, }; static struct msi_domain_info armada_370_xp_msi_domain_info = {