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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53775C00140 for ; Sun, 21 Aug 2022 06:53:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229681AbiHUGxy (ORCPT ); Sun, 21 Aug 2022 02:53:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbiHUGxw (ORCPT ); Sun, 21 Aug 2022 02:53:52 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 929D018394 for ; Sat, 20 Aug 2022 23:53:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Y24frkjw92lHic4CzAKbZqlsYEtpR03qXcobos9r9E0=; b=Zc4OOGXgclsb2elQc+GGgtYuch XOrgWVeLrVlOMhXgzHaQNzFfnOEFU6Rje9fdHyXEDL7TNxBFyy3ClASkHKzPwxfkYbug92zSkvFPZ 5rUF1SDbdAznWhM1SiQr9ct3iklufFMW3ohAoEKIiYGXBSW7o1p+4whEGP2gg7EDhnGxCPJcGnwR8 jbjofXeZo6/dkyaXGlYaEtP7XF3qIl8XcsBkzXyU+L+LEQRYjPJpFsvXKVbutRqRzFpZXb1INu3Ld kI3PcZPsFReuKtD6n0eoVpstGs+c/U/Zp3OAJncTx87ssdqOp0z7c274KemdTHTrR97LOJIfzCqSr QJMhbB7Q==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1oPeqD-006ylG-3o; Sun, 21 Aug 2022 06:53:49 +0000 Date: Sat, 20 Aug 2022 23:53:49 -0700 From: Christoph Hellwig To: Baoquan He Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, hch@infradead.org, agordeev@linux.ibm.com, wangkefeng.wang@huawei.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 01/11] mm/ioremap: change the return value of io[re|un]map_allowed and rename Message-ID: References: <20220820003125.353570-1-bhe@redhat.com> <20220820003125.353570-2-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220820003125.353570-2-bhe@redhat.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Aug 20, 2022 at 08:31:15AM +0800, Baoquan He wrote: > +void __iomem *arch_ioremap(phys_addr_t phys_addr, size_t size, unsigned long prot); Please avoid the overly long lines. I also wonder if we just want a common definition with a __weak default instead of duplicating it in many arch headers. > + ioaddr = arch_ioremap(phys_addr, size, prot); > + if (IS_ERR(ioaddr)) > + return NULL; > + else if (ioaddr) > + return ioaddr; No need for the else here.