From patchwork Mon Apr 22 23:11:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 2474871 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 5BACADF23A for ; Mon, 22 Apr 2013 23:11:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753812Ab3DVXL3 (ORCPT ); Mon, 22 Apr 2013 19:11:29 -0400 Received: from mail-ia0-f169.google.com ([209.85.210.169]:43766 "EHLO mail-ia0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753778Ab3DVXL3 (ORCPT ); Mon, 22 Apr 2013 19:11:29 -0400 Received: by mail-ia0-f169.google.com with SMTP id l29so12321iag.0 for ; Mon, 22 Apr 2013 16:11:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=BeKsPv8UL2ml6xzj2K09+hzXxr/C4vuVY5/mUhufB+A=; b=VM1CW5YtaKJyvxwZ6WsdhOiQUpNAi+ijUpeE5nu7RSauEuj8A722ZQwNMN6SVa7mrA GcCz2Kl1RDgHARLiDFF5GZ1XzzJ53QBdP0YNlfoBHAA5trD67e/PvyovbMPX4ttYw18j /w/Q+IcSxlAadACYDWIysVw3fJLIv0SfLWaIBnbaVJnLe97pDqNyio2IAUZMgXTcA1Wh 9bY7GNWlgQQ6mY0eqsOMEaRHxWNGH3h7odbUc0C2ADmT4RPA2wqPAzbyt9wJ4SQGrdvv iEdUcRix/L7GSFO3XMqBP3R1bYC/RrYn8Bk84+Dii/+TvHqlbgI47oYo4PQn//bYooIq +IIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding:x-gm-message-state; bh=BeKsPv8UL2ml6xzj2K09+hzXxr/C4vuVY5/mUhufB+A=; b=Y9npc9OL2IV+9czOYk3kQGId9FoomFRNM7HsIUw40cwcAjwKDphxz5jMN5QNwBM8pt NAVyqA7TzaCURQ2H9cndYNB4gxcJ4pmb1gYbzmvbyxQMKD9f1a0MfjYZZWE0/6ydiCUt QeE3uMCtkBRVdvC+rK1kQehzC9CpK+Om8//yBTdCn9SJTuvzt3lIUIJlpOU5eqjpKMWI Kqglqutj76f2P5HGQ6hBO7PZe79bIA/YkgEE3MmkrvfsT0bkoCshcbIcWhfLwdKmBJ6w 09n6TrIPhX66hUYBC95n5qdgBkNlJl3AF9BbWInB/Bap/omWga0rteDsgIzZrOEdpWvj 58iQ== X-Received: by 10.50.154.71 with SMTP id vm7mr22929116igb.9.1366672288958; Mon, 22 Apr 2013 16:11:28 -0700 (PDT) Received: from localhost ([172.29.120.215]) by mx.google.com with ESMTPS id dy5sm19733006igc.1.2013.04.22.16.11.28 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 22 Apr 2013 16:11:28 -0700 (PDT) Subject: [PATCH v4 11/22] PCI: Drop msi_data_reg() macro To: linux-pci@vger.kernel.org From: Bjorn Helgaas Cc: Gavin Shan Date: Mon, 22 Apr 2013 17:11:27 -0600 Message-ID: <20130422231127.32621.11313.stgit@bhelgaas-glaptop> In-Reply-To: <20130422230012.32621.15224.stgit@bhelgaas-glaptop> References: <20130422230012.32621.15224.stgit@bhelgaas-glaptop> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQkOjTTInt4yQZ66vqMcJsfRIaQz84hUU4RwT6W8FZagVAoFgvlS5VcCYd4BMEtuWAdn7ujRlX7b4BZmdMqgDTUUyZ2B8y2f2ZcTJPKbaxjxSbLdSTEM9ojOWVuRFqu1J5oVdzh6gFRL9XeLxU8xlXAOSnv0JSCZtXOuKiQoMhakHDLiofViH/jB8HpNjyQFIkHQ6vlllWbm7Ki4lLIQ4um6TRhxcAxQSBPmm9RyjmdnFZvzfYs= Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org msi_data_reg() doesn't provide any useful abstraction, so drop it. Signed-off-by: Bjorn Helgaas --- drivers/pci/msi.c | 12 ++++++------ drivers/pci/msi.h | 2 -- 2 files changed, 6 insertions(+), 8 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 7011c5d..1688c26 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -249,10 +249,10 @@ void __read_msi_msg(struct msi_desc *entry, struct msi_msg *msg) if (entry->msi_attrib.is_64) { pci_read_config_dword(dev, pos + PCI_MSI_ADDRESS_HI, &msg->address_hi); - pci_read_config_word(dev, msi_data_reg(pos, 1), &data); + pci_read_config_word(dev, pos + PCI_MSI_DATA_64, &data); } else { msg->address_hi = 0; - pci_read_config_word(dev, msi_data_reg(pos, 0), &data); + pci_read_config_word(dev, pos + PCI_MSI_DATA_32, &data); } msg->data = data; } @@ -309,11 +309,11 @@ void __write_msi_msg(struct msi_desc *entry, struct msi_msg *msg) if (entry->msi_attrib.is_64) { pci_write_config_dword(dev, pos + PCI_MSI_ADDRESS_HI, msg->address_hi); - pci_write_config_word(dev, msi_data_reg(pos, 1), - msg->data); + pci_write_config_word(dev, pos + PCI_MSI_DATA_64, + msg->data); } else { - pci_write_config_word(dev, msi_data_reg(pos, 0), - msg->data); + pci_write_config_word(dev, pos + PCI_MSI_DATA_32, + msg->data); } } entry->msg = *msg; diff --git a/drivers/pci/msi.h b/drivers/pci/msi.h index e5b87d6..d2c6cd9 100644 --- a/drivers/pci/msi.h +++ b/drivers/pci/msi.h @@ -6,8 +6,6 @@ #ifndef MSI_H #define MSI_H -#define msi_data_reg(base, is64bit) \ - (base + ((is64bit == 1) ? PCI_MSI_DATA_64 : PCI_MSI_DATA_32)) #define msi_mask_reg(base, is64bit) \ (base + ((is64bit == 1) ? PCI_MSI_MASK_64 : PCI_MSI_MASK_32)) #define is_64bit_address(control) (!!(control & PCI_MSI_FLAGS_64BIT))