From patchwork Tue Sep 17 00:52:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingoo Han X-Patchwork-Id: 2900261 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D6E8B9F1C0 for ; Tue, 17 Sep 2013 00:52:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 18CA7202F9 for ; Tue, 17 Sep 2013 00:52:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5CFE1201DD for ; Tue, 17 Sep 2013 00:52:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751806Ab3IQAwJ (ORCPT ); Mon, 16 Sep 2013 20:52:09 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:27850 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751841Ab3IQAwI (ORCPT ); Mon, 16 Sep 2013 20:52:08 -0400 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MT8009XQVQVLND0@mailout2.samsung.com> for linux-pci@vger.kernel.org; Tue, 17 Sep 2013 09:52:07 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.50]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id C2.48.30629.6B7A7325; Tue, 17 Sep 2013 09:52:06 +0900 (KST) X-AuditID: cbfee68d-b7fe86d0000077a5-f4-5237a7b610d2 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 73.1A.09055.6B7A7325; Tue, 17 Sep 2013 09:52:06 +0900 (KST) Received: from DOJG1HAN03 ([12.23.120.99]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MT800B65VQUJT40@mmp1.samsung.com>; Tue, 17 Sep 2013 09:52:06 +0900 (KST) From: Jingoo Han To: 'Thomas Petazzoni' Cc: 'Bjorn Helgaas' , linux-pci@vger.kernel.org, 'Jason Cooper' , 'Jingoo Han' References: <000201ceaf9b$098780b0$1c968210$%han@samsung.com> <000501ceaf9b$acaec690$060c53b0$%han@samsung.com> <20130916175706.3b43b3c4@skate> In-reply-to: <20130916175706.3b43b3c4@skate> Subject: Re: [PATCH 3/3] PCI: mvebu: add missing __iomem annotation Date: Tue, 17 Sep 2013 09:52:06 +0900 Message-id: <000201ceb340$21d48de0$657da9a0$%han@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac6y9rIY0HCO663iSQ6A2nTgeD5P9gASLKOQ Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrGIsWRmVeSWpSXmKPExsVy+t8zI91ty82DDD5PsLFY0pRh0bjkMovF 5YWXWC3OzjvOZvH0QROTA6vHk00XGT0WbCr1aDhwnsWjb8sqRo/Pm+QCWKO4bFJSczLLUov0 7RK4Mg63NjMWPOeuuHCDo4HxMGcXIyeHhICJxKT+9UwQtpjEhXvr2boYuTiEBJYxSuzZ+I4d pmjvrK1MEIlFjBJdm3exQDi/GCX6dzxiAaliE1CT+PLlMFiHiICNxKrmOYwgRcwCExklzlxb CdU+mVHiyoQLjCBVnAI6El9vfwJbLizgLPH4UAMbiM0ioCpxou8ImM0rYCsx//s0JghbUOLH 5Htg25gFtCTW7zzOBGHLS2xe85a5i5ED6FZ1iUd/dSGO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piRWVqUW5ccXleakFh9iTAZ6 dCKzlGhyPjBF5ZXEGxqbmBlZGplZGJmYm5MmrCTOe6DVOlBIID2xJDU7NbUgtQhmCxMHp1QD Y+5pddMOK7PGR6dVdx/+f57VbLWEg7JhRLDPpy+rNX4cOKP5wmnvzFtJ1Ue7OB+J/mlsthGe wJtmNK/u/rrO+ZPOLeC6ua22okmtK0rs4IJjLCYGIV7+/3a0GoeuXe1hcPBCdLrUr537zOSm Lsh+ddQx69HsaVdzJNaXvNcpZL2VUn+Zc3LkdyWW4oxEQy3mouJEAIR8F5NHAwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 On Tuesday, September 17, 2013 12:57 AM, Thomas Petazzoni wrote: > On Thu, 12 Sep 2013 18:37:18 +0900, Jingoo Han wrote: > > > ret = of_address_to_resource(np, 0, ®s); > > if (ret) > > - return ERR_PTR(ret); > > + return (void __iomem *)ERR_PTR(ret); > > This doesn't look very pretty to tell the truth, but I don't quite see > any other option. Just return NULL when of_address_to_resource() fails > instead of trying to propagate the error? Make this entire function > return an 'int' and have the iomem address returned through a pointer > passed by address as argument to the function? Any other suggestion? > Hi Thomas Petazzoni, I appreciated your feedback. :-) 'Just returning NULL when of_address_to_resource() fails instead of trying to propagate the error' looks better. Then, how about the following? Best regards, Jingoo Han Acked-by: Thomas Petazzoni --- 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 --- a/drivers/pci/host/pci-mvebu.c +++ b/drivers/pci/host/pci-mvebu.c @@ -728,7 +728,7 @@ mvebu_pcie_map_registers(struct platform_device *pdev, ret = of_address_to_resource(np, 0, ®s); if (ret) - return ERR_PTR(ret); + return NULL; return devm_ioremap_resource(&pdev->dev, ®s); } @@ -874,7 +874,7 @@ static int __init mvebu_pcie_probe(struct platform_device *pdev) } port->base = mvebu_pcie_map_registers(pdev, child, port); - if (IS_ERR(port->base)) { + if (!port->base) { dev_err(&pdev->dev, "PCIe%d.%d: cannot map registers\n", port->port, port->lane); port->base = NULL;