From patchwork Wed Oct 15 03:06:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wangyijing X-Patchwork-Id: 38740 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D411420973 for ; Wed, 15 Oct 2014 02:28:42 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id d1sf264338wiv.6 for ; Tue, 14 Oct 2014 19:28:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=2rT7KD193Gpw+8upE4Fy7SnsdNCM5dJ3+D3cVY/h3FQ=; b=f49MmbaMWAYaQ/D/44+ggTDB4TGoAi/8uUhhacEZxxzsQ9gPgIle6PSpk/p6B20RAz 5fiA6ChyPulCvIErH4/wP3/+a/ievx1+AU5irte3kYEkoI6KIo/jZXc1sLTLN/1Yfbrv ASJ42FGp32tSVVqQ8UiOxIk1JYHO9Qu1ybRKKeh0osm/Y4nEAiG69zftcqc+vvHGL92c jmNRs1aRjwLrM2bihIOdHgyXxqf7YXfQJHcW3eX6J+OvmL4+KyTwoEKpl1iZnlp4jdXM ilgL8WOUjzVbFNo6JJH58Bum96eAs82Ux3WkBD+pBcAKrTSVhth7DgDStW10Gmp52hIY m7lw== X-Gm-Message-State: ALoCoQmR5UqGTEDcpSyVWmfrODmGh+TDFlIcFkG59S9S5GbJU4aBeahST4EdwTJsfxV3LHyL1MEs X-Received: by 10.194.161.195 with SMTP id xu3mr12808wjb.7.1413340122094; Tue, 14 Oct 2014 19:28:42 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.7.169 with SMTP id k9ls8340laa.91.gmail; Tue, 14 Oct 2014 19:28:41 -0700 (PDT) X-Received: by 10.152.228.140 with SMTP id si12mr9156928lac.66.1413340121708; Tue, 14 Oct 2014 19:28:41 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com [209.85.215.50]) by mx.google.com with ESMTPS id gl1si1211171lbc.11.2014.10.14.19.28.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 14 Oct 2014 19:28:41 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by mail-la0-f50.google.com with SMTP id s18so237498lam.37 for ; Tue, 14 Oct 2014 19:28:41 -0700 (PDT) X-Received: by 10.112.38.67 with SMTP id e3mr9397512lbk.6.1413340121625; Tue, 14 Oct 2014 19:28:41 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp517468lbz; Tue, 14 Oct 2014 19:28:40 -0700 (PDT) X-Received: by 10.70.11.2 with SMTP id m2mr9352681pdb.31.1413340119654; Tue, 14 Oct 2014 19:28:39 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id aw6si14355808pbd.206.2014.10.14.19.28.39 for ; Tue, 14 Oct 2014 19:28:39 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755963AbaJOC0M (ORCPT + 27 others); Tue, 14 Oct 2014 22:26:12 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:39154 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932671AbaJOCZr (ORCPT ); Tue, 14 Oct 2014 22:25:47 -0400 Received: from 172.24.2.119 (EHLO szxeml412-hub.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CAT35321; Wed, 15 Oct 2014 10:25:24 +0800 (CST) Received: from localhost.localdomain (10.175.100.166) by szxeml412-hub.china.huawei.com (10.82.67.91) with Microsoft SMTP Server id 14.3.158.1; Wed, 15 Oct 2014 10:25:08 +0800 From: Yijing Wang To: Bjorn Helgaas CC: , , Xinwei Hu , Wuyun , , Russell King , , , , , Arnd Bergmann , Thomas Gleixner , "Konrad Rzeszutek Wilk" , , Joerg Roedel , , , Benjamin Herrenschmidt , , , Sebastian Ott , "Tony Luck" , , "David S. Miller" , , Chris Metcalf , Ralf Baechle , Lucas Stach , David Vrabel , "Sergei Shtylyov" , Michael Ellerman , Thierry Reding , "Thomas Petazzoni" , Liviu Dudau , Yijing Wang Subject: [PATCH v3 01/27] MSI: Remove the redundant irq_set_chip_data() Date: Wed, 15 Oct 2014 11:06:49 +0800 Message-ID: <1413342435-7876-2-git-send-email-wangyijing@huawei.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1413342435-7876-1-git-send-email-wangyijing@huawei.com> References: <1413342435-7876-1-git-send-email-wangyijing@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.100.166] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: wangyijing@huawei.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Currently, pcie-designware, pcie-rcar and pci-tegra drivers use irq chip_data to save the msi_chip pointer. They already call irq_set_chip_data() in their own MSI irq map functions. And chip_data is an opaque pointer, how to use it is arch dependent. It should not be placed in MSI core. Signed-off-by: Yijing Wang Reviewed-by: Thierry Reding --- drivers/pci/msi.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 2f7c92c..ecb92a5 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -41,14 +41,13 @@ int __weak arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc) if (err < 0) return err; - irq_set_chip_data(desc->irq, chip); - return 0; } void __weak arch_teardown_msi_irq(unsigned int irq) { - struct msi_chip *chip = irq_get_chip_data(irq); + struct msi_desc *entry = irq_get_msi_desc(irq); + struct msi_chip *chip = entry->dev->bus->msi; if (!chip || !chip->teardown_irq) return;