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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7047CC28D13 for ; Mon, 22 Aug 2022 23:55:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 632E66B0073; Mon, 22 Aug 2022 19:55:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5B86C6B0074; Mon, 22 Aug 2022 19:55:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 480D28D0001; Mon, 22 Aug 2022 19:55:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 31F866B0073 for ; Mon, 22 Aug 2022 19:55:36 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 0C42CAAE6E for ; Mon, 22 Aug 2022 23:55:36 +0000 (UTC) X-FDA: 79828888272.23.93A9312 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf19.hostedemail.com (Postfix) with ESMTP id 40CE41A0004 for ; Mon, 22 Aug 2022 23:55:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661212534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=96UuXTm67Lu9/orI0Lgpr5EQeDdGY9QYj2tu9iaXGWY=; b=djH6DxvP5Kdv/+VVBjGDs9nAS6zgcIJ1BcNS/8tsfQ0CyVWVnZnr2hG4AA8FdnG0GUqls3 tO3cgO+EMoi/lFcGDdlb4kaW1I3DNG377PylkAAuk2jhgdDs9FLA9gRvS6+77V9/RtgLlI Ex2YOkql+zKyDG6KqhO6ALwkq67i1b8= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-375-2nYVoJ_GNMSeaEkDB4toXA-1; Mon, 22 Aug 2022 19:55:31 -0400 X-MC-Unique: 2nYVoJ_GNMSeaEkDB4toXA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DBAEB801585; Mon, 22 Aug 2022 23:55:30 +0000 (UTC) Received: from localhost (ovpn-12-31.pek2.redhat.com [10.72.12.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EC2091121315; Mon, 22 Aug 2022 23:55:29 +0000 (UTC) Date: Tue, 23 Aug 2022 07:55:26 +0800 From: Baoquan He To: Christoph Hellwig Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.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: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661212535; a=rsa-sha256; cv=none; b=38EJi1pgBKhmi8ndbc5P6m/q0UNdiOj+vCOgeZ+/Jx8OpzAGYvpC9p22zICGW4IwqicUnO dAlCtwdrSBlaujjsISVzIfiuamLfX31ATxi3d0qq+s76H2/zXZZ7cNc3Kpf7YmS2tQzNHE 3kSJgzSK3ObU4p5w/PCWdZTNxE4cUEI= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=djH6DxvP; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf19.hostedemail.com: domain of bhe@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=bhe@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661212535; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=96UuXTm67Lu9/orI0Lgpr5EQeDdGY9QYj2tu9iaXGWY=; b=uvF6yk2wo2WL2b0RNm6RcWS2sC7hMGk9oKmR1/S0XBAdAc0zCCIZUmU0OFu+f7v+O56jOr q09bFAbgRo1gpm/AdXeorH5NVtA6nm/KaRVWAz0JvG+wD2oykYU8ZX+hfs5UdxJ7Xn9tnA /pZU9Xs0OCVzrlNu3Zk6qcrQ+Ala5l8= X-Rspam-User: Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=djH6DxvP; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf19.hostedemail.com: domain of bhe@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=bhe@redhat.com X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 40CE41A0004 X-Stat-Signature: 5brixtf1j1xco7ub738q96hpdf7px6wn X-HE-Tag: 1661212535-979461 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 08/20/22 at 11:53pm, Christoph Hellwig wrote: > 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. Thanks for reviewing. Will break the line. > > I also wonder if we just want a common definition with a __weak default > instead of duplicating it in many arch headers. Seems __weak symbol is not suggested any more in kernel. Please see below thread. [PATCH] kexec_file: Drop weak attribute from arch_kexec_apply_relocations[_add] https://lore.kernel.org/all/20220518181828.645877-1-naveen.n.rao@linux.vnet.ibm.com/T/#u > > > + ioaddr = arch_ioremap(phys_addr, size, prot); > > + if (IS_ERR(ioaddr)) > > + return NULL; > > + else if (ioaddr) > > + return ioaddr; > > No need for the else here. Do you mean changing it like this? It's fine to me if I get it correctly. ioaddr = arch_ioremap(phys_addr, size, prot); if (IS_ERR(ioaddr)) return NULL; if (ioaddr) return ioaddr; Thanks Baoquan