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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 14AB3C28D13 for ; Mon, 22 Aug 2022 23:56:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qYIXdDqn3i83u9bn4jC/p4x1139SEkse7tgd4T0wGgc=; b=3HallkcZ+zw4ak CFD3IXymYW9hPHPfGFrONHNUNjfCi+xyXrxd1j7ZdkPQCpI+xDPU5F+bc6CjPYCH87pgz8vUSTvC7 ORufwVrbZgv8C45FMGFGIFlAl5R/BbDM6awzXdAhRHFU1ryBMtxzx9MWejBwvqGOaj4W4xTDwR864 a6UssVIm8HVmXdCSK5lQyomqaUFXyWPN27JAsV2gVVI1H1ady4DvuKWfC6xecLlN9JjQzPww1/PES 8dQit16wf1DsXUQj7e50gjhLQ1WGtvomo4vy84DjvBr3B/IJJvWKYdEJQ+LfiJ3tdiUv1VWHlNIEd zyIysn42afBcuWcKUx9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oQHGi-00GDSS-Ia; Mon, 22 Aug 2022 23:55:44 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oQHGd-00GDLZ-Qm for linux-arm-kernel@lists.infradead.org; Mon, 22 Aug 2022 23:55:42 +0000 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-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220822_165539_959487_BA702A3F X-CRM114-Status: GOOD ( 17.86 ) 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 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel