From patchwork Fri Jun 27 14:59:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 4435771 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 82889BEEAA for ; Fri, 27 Jun 2014 14:59:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B1DD520263 for ; Fri, 27 Jun 2014 14:59:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D2E1F20377 for ; Fri, 27 Jun 2014 14:59:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753649AbaF0O7E (ORCPT ); Fri, 27 Jun 2014 10:59:04 -0400 Received: from mail-la0-f41.google.com ([209.85.215.41]:48042 "EHLO mail-la0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753651AbaF0O7D (ORCPT ); Fri, 27 Jun 2014 10:59:03 -0400 Received: by mail-la0-f41.google.com with SMTP id hz20so3070882lab.14 for ; Fri, 27 Jun 2014 07:59:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:organization:to:subject:date:user-agent:cc :mime-version:content-type:content-transfer-encoding:message-id; bh=K9dgbvDeBM2ltml4trhuI3g7N6Z61fb/wz5DsX0AgUc=; b=hkFeBAGKhlJn179kg9fF6zqYazB/LgY0mx0LhdWUiUhsP1GvdSuVZe+ATwFbJHL121 uUSq9el9YViVrQ9gognuldszX89oz6sH7xd9mp/nD6b5bfWFEBepD2G80QyKPicbbq70 lL/wkVwYvIQOelfbGONy6XKd9Sm312hLIDENaUWUb6r7vCBSA4fb0z2gDDI5jjNKQCSx DxatkThPlM/KehwpA82FMInv4DR9k+JoDsmVZlY3H3Ga1q5Tuno4Ptxwl/A5VyU/8cGm pDQ8Qer212dguqxzv6sR5oP+GuPjMJvr0vJ6wZ8kCBt3nPIJm+jadX4MfEbZRNGlF3G8 zPEA== X-Gm-Message-State: ALoCoQlrSv33hVckpn5cfZa78au8RibrbtHJfn89bErAXZXAaxOjjNNGqSvYXsK8bfwg/dP+yZAF X-Received: by 10.153.4.42 with SMTP id cb10mr1679644lad.83.1403881140777; Fri, 27 Jun 2014 07:59:00 -0700 (PDT) Received: from wasted.cogentembedded.com (ppp83-237-253-65.pppoe.mtu-net.ru. [83.237.253.65]) by mx.google.com with ESMTPSA id s15sm11813501lbp.42.2014.06.27.07.58.59 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 27 Jun 2014 07:59:00 -0700 (PDT) From: Sergei Shtylyov Organization: Cogent Embedded To: horms@verge.net.au, bhelgaas@google.com, linux-pci@vger.kernel.org, linux-sh@vger.kernel.org Subject: [PATCH] pcie-rcar: kill duplicate checks Date: Fri, 27 Jun 2014 18:59:13 +0400 User-Agent: KMail/1.13.5 (Linux/2.6.32.26-175.fc12.i686.PAE; KDE/4.4.5; i686; ; ) Cc: phil.edworthy@renesas.com MIME-Version: 1.0 Message-Id: <201406271859.13626.sergei.shtylyov@cogentembedded.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The PCI core will have already checked the configuration register address before calling the {read|write}() methods, no need to check it again in these methods. Signed-off-by: Sergei Shtylyov Acked-by: Phil Edworthy Acked-by: Simon Horman --- The patch is against the 'next' branch of Bjorn Helgaas' 'pci.git' repo. drivers/pci/host/pcie-rcar.c | 10 ---------- 1 file changed, 10 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: pci/drivers/pci/host/pcie-rcar.c =================================================================== --- pci.orig/drivers/pci/host/pcie-rcar.c +++ pci/drivers/pci/host/pcie-rcar.c @@ -260,11 +260,6 @@ static int rcar_pcie_read_conf(struct pc struct rcar_pcie *pcie = sys_to_pcie(bus->sysdata); int ret; - if ((size == 2) && (where & 1)) - return PCIBIOS_BAD_REGISTER_NUMBER; - else if ((size == 4) && (where & 3)) - return PCIBIOS_BAD_REGISTER_NUMBER; - ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ, bus, devfn, where, val); if (ret != PCIBIOS_SUCCESSFUL) { @@ -291,11 +286,6 @@ static int rcar_pcie_write_conf(struct p int shift, ret; u32 data; - if ((size == 2) && (where & 1)) - return PCIBIOS_BAD_REGISTER_NUMBER; - else if ((size == 4) && (where & 3)) - return PCIBIOS_BAD_REGISTER_NUMBER; - ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ, bus, devfn, where, &data); if (ret != PCIBIOS_SUCCESSFUL)