From patchwork Mon Apr 22 23:11:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 2474881 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 410D3DF23A for ; Mon, 22 Apr 2013 23:11:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753247Ab3DVXLg (ORCPT ); Mon, 22 Apr 2013 19:11:36 -0400 Received: from mail-ie0-f179.google.com ([209.85.223.179]:46240 "EHLO mail-ie0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752616Ab3DVXLg (ORCPT ); Mon, 22 Apr 2013 19:11:36 -0400 Received: by mail-ie0-f179.google.com with SMTP id 16so11864iea.38 for ; Mon, 22 Apr 2013 16:11:35 -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=RhL2KFHwcfEGTZeUnf2QVAwIdJxdkrpVHjbS+pfnvQQ=; b=jIbDMAE1EhMVTGspvfM7pX7NEu87HnaZrEKs1jnTKtfgUKCMDwP/SlRbX01EC+fCwr FdVJcDBHriJqdurOAT06eoCbxay6JycHclkzG15do6sDZmKvpVXymUT66+wP2VUAoPoo c3V+WGkJpszpm0nMRatpMt4u+I4pZe7RWuUx/mSW20Jz1o3bFoX5+Y3iW0YFFwUN7Lt8 dnQupXmTyzNACO+yLcKztKodRN6pS8RBugFGKyf4O6AxlEuUsyTgCWykrgGSva06AO8r RkdxHUPo1zLfqskt6e03a0laxuH+feGJr0aq/D3c6FVfvr8DG4eVRYDwTrtwn4ZUcdnO ci0Q== 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=RhL2KFHwcfEGTZeUnf2QVAwIdJxdkrpVHjbS+pfnvQQ=; b=UT47h7OKU6GOdNjiMEDADy0m2hDYJCWdkh1luKXET+t5JGoIUT4AmdmVdkzm1wXxZJ /qoipUcYeSivsC9hTnXHYoKjWYnm1sG8Ax0ioAQa51jPObeSFKFJxpukU0OD2muuWBgA L2DgjLIdCp8U7znGnS09vNZQ/jfAePAp7qBwS/GknRsqXMeph5kXXYQviLz/YRoq+KPH wDdVQWEF+FOdxEx/GLlrMn+3soqu0X/ue3+dpceSAohH3q/RoCJxSUwhu+Ml69CbgcSA +yX2gnR/FnOLoO+P+IrW64jCt7NxQ9h7mKKbizoIZ0JC4SXy3AQ+Y+TsDF0vbz4Eeesx e2dg== X-Received: by 10.50.131.225 with SMTP id op1mr1123164igb.85.1366672295802; Mon, 22 Apr 2013 16:11:35 -0700 (PDT) Received: from localhost ([172.29.120.215]) by mx.google.com with ESMTPS id q3sm7789680igw.0.2013.04.22.16.11.34 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 22 Apr 2013 16:11:35 -0700 (PDT) Subject: [PATCH v4 12/22] PCI: Drop is_64bit_address() and is_mask_bit_support() macros To: linux-pci@vger.kernel.org From: Bjorn Helgaas Cc: Gavin Shan Date: Mon, 22 Apr 2013 17:11:34 -0600 Message-ID: <20130422231134.32621.91788.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: ALoCoQnqaKvR73TMaTVz8S5q25DWixr+jCLab7o/HKvQupZ1TpZB0RCsPKmoifoqZR63gcaJYDTNg5C4dqPz9qFBOauKX+4wwMxIW8WovZkdUofBnLc6SoizXqDLmmRaat97CeuFIab3+NAUBZnvuWgDmzW/WNCH15vrPq0g/G13PGD1cos2w+JSUSWPCCFfH9VZHpdMUrbavumCepuTOhNDLKexY+A66BWLXX10YOl/ojMQRj410U8= Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org is_64bit_address() and is_mask_bit_support() don't provide any useful abstraction, so drop them. Signed-off-by: Bjorn Helgaas --- drivers/pci/msi.c | 4 ++-- drivers/pci/msi.h | 2 -- 2 files changed, 2 insertions(+), 4 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 1688c26..aaaf954 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -555,9 +555,9 @@ static int msi_capability_init(struct pci_dev *dev, int nvec) return -ENOMEM; entry->msi_attrib.is_msix = 0; - entry->msi_attrib.is_64 = is_64bit_address(control); + entry->msi_attrib.is_64 = !!(control & PCI_MSI_FLAGS_64BIT); entry->msi_attrib.entry_nr = 0; - entry->msi_attrib.maskbit = is_mask_bit_support(control); + entry->msi_attrib.maskbit = !!(control & PCI_MSI_FLAGS_MASKBIT); entry->msi_attrib.default_irq = dev->irq; /* Save IOAPIC IRQ */ entry->msi_attrib.pos = dev->msi_cap; diff --git a/drivers/pci/msi.h b/drivers/pci/msi.h index d2c6cd9..bc5cd99 100644 --- a/drivers/pci/msi.h +++ b/drivers/pci/msi.h @@ -8,8 +8,6 @@ #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)) -#define is_mask_bit_support(control) (!!(control & PCI_MSI_FLAGS_MASKBIT)) #define msix_table_offset_reg(base) (base + PCI_MSIX_TABLE) #define msix_pba_offset_reg(base) (base + PCI_MSIX_PBA)