From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CD36C433B4 for ; Wed, 7 Apr 2021 13:30:16 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C2CEC61055 for ; Wed, 7 Apr 2021 13:30:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C2CEC61055 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=rpkKmm/Yha988uNGOMkuFeJRubYn2FC19dRBPqqZQ5w=; b=NF7pzShi0Y8ZDmEGJ4F4CNFol DoGTVQDPhgNgPRSPApXKpYMorJeICjLTOkKraXW+FaeOF2W7mgYx0AR6SL0XVGvgawdUI/GG3f77E WChz55OoRC/oav/epPA6D60dTF6oUoXngOuH2hWjJKJ9IViE6G5tlbJjb4CucVf3+m2CsuwSA75gb 0wALBFMmASkaEQlMR0XMZEs+7hQkWZV4RvJAWImHnFs+JToXQuq0/IsQCVrYC+BWbICHev8CA5PrD MSTvQ7LUtWsdFpCEyDlhnnhI0Yp60QbCGoJbT5A4qzekxfS+tEPLUB7hiw/pqINPsRcpSDEYOyAwh w7GQzEjHQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lU8E3-0052lb-JC; Wed, 07 Apr 2021 13:28:08 +0000 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lU8Dx-0052ka-La for linux-arm-kernel@lists.infradead.org; Wed, 07 Apr 2021 13:28:05 +0000 Received: by mail-pl1-x630.google.com with SMTP id y2so9341504plg.5 for ; Wed, 07 Apr 2021 06:27:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gPk0txwiQH41tkl6+Ko80XOzDT7sy08dTJ8kEynQ9CU=; b=nYAHgMcQiiw77htOI1QpiWyBzhidrkQ6G/F/MbfbkXN0dZFZb6ZYWfuCB6iIcTiWs9 0uSxShhivoJZAh/okUk5qPjVNXwLoDH45RCT8tIfW1A9H0Bw6mV/AjcMSuLTjUe5KTs5 2FcILVsdH7wuD2/e7xivF2L1ril9u3T07mqi6iCGlZR7dOV7uKt8mEMReWpjFAt/IxBD zx17dyOY9Pyttf13SAnQ8z3gOJy5NmiAUoad8owKvkWaVxq2oYmQMf5vUHdyJzcBoIhV 6nC56N3ajJkJZQ7hDNIlI2YRfcVHgmPnuv/anFMd+M0g09QYzZkiKT16hXM4vlZPX0eC dCAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gPk0txwiQH41tkl6+Ko80XOzDT7sy08dTJ8kEynQ9CU=; b=lS72pVj1YZSsNZYrCZhwsJDQxapKu+a2GsEKJBfiz0DOGG4jsp7w/HD9Jz4+G6b8vJ 6qF221W4NtNV8Ae0jsMK8JB6BQDXF6Sx1Qi5+Lj2iIwjIkJRObLQ/gzc0R3Mda1xHMxn t3zIgixyCoEZWEHuO9McdAP8FhVe6K35sd7EET+o/IF6BQuEN4EoDlrmErecfj3nT19D qDpCV238vgboBzGuDhoIuo/k/G+OH7u4AV4VCfZRX/QOIHoda55WqpxDEM1r9KCr6/ah bXgXFiZOmhjpZU7pixTurlsvTBYOsDytD+JK5BIO9pmz6rptF2ezD9uI05HRW/B4zGsz K1pQ== X-Gm-Message-State: AOAM533E1w2HYNq6NjWBy+l9SwLJ+mYWUVpCLB4JrzTjr9IY1fljHHFa DWDZx2Na7cQw8gRByDITsR5ePRwrkrxuhExnUy4= X-Google-Smtp-Source: ABdhPJxINTgdzGxgxpyx7J3bDDMYfqiVzgSvvr9cLG3u0qIDaQdOp29ZfGUSOS2zQVfphaDqdijzJ2sm00mrrmGaTqM= X-Received: by 2002:a17:90a:5407:: with SMTP id z7mr3379125pjh.228.1617802078532; Wed, 07 Apr 2021 06:27:58 -0700 (PDT) MIME-Version: 1.0 References: <20210402090542.131194-1-marcan@marcan.st> <20210402090542.131194-12-marcan@marcan.st> In-Reply-To: <20210402090542.131194-12-marcan@marcan.st> From: Andy Shevchenko Date: Wed, 7 Apr 2021 16:27:42 +0300 Message-ID: Subject: Re: [PATCH v4 11/18] asm-generic/io.h: implement pci_remap_cfgspace using ioremap_np To: Hector Martin Cc: linux-arm Mailing List , Marc Zyngier , Rob Herring , Arnd Bergmann , Olof Johansson , Krzysztof Kozlowski , Mark Kettenis , Tony Lindgren , Mohamed Mediouni , Stan Skowronek , Alexander Graf , Will Deacon , Linus Walleij , Mark Rutland , Jonathan Corbet , Catalin Marinas , Christoph Hellwig , "David S. Miller" , devicetree , Linux Documentation List , Linux-Arch , Linux Kernel Mailing List X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210407_142803_279523_F9BF5404 X-CRM114-Status: GOOD ( 17.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Apr 2, 2021 at 12:07 PM Hector Martin wrote: > > Now that we have ioremap_np(), we can make pci_remap_cfgspace() default > to it, falling back to ioremap() on platforms where it is not available. > > Remove the arm64 implementation, since that is now redundant. Future > cleanups should be able to do the same for other arches, and eventually > make the generic pci_remap_cfgspace() unconditional. ... > + void __iomem *ret = ioremap_np(offset, size); > + > + if (!ret) > + ret = ioremap(offset, size); > + > + return ret; Usually negative conditions are worse for cognitive functions of human beings. (On top of that some patterns are applied) I would rewrite above as void __iomem *ret; ret = ioremap_np(offset, size); if (ret) return ret; return ioremap(offset, size); -- With Best Regards, Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel