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 B0EE5C19F2D for ; Sun, 7 Aug 2022 02:00:06 +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=m/uB7iCe3mKuO8R9bLllNkSfJ5fQJTX2JgaXqVtEARQ=; b=1q3HSG8uYPlkCo OVD9oyq+4iVlWPApOAadwn1aL5u8nutyFXb/mn2MSuwaU3aEpP0/yumqZA7y+84cDm/trrWl3Sa4f kWUdkaD+npuwZPi1u6/rDpxKp+1/jEDk1AbSuwnjvgFe1Pzt7o8G5r+2DQb/d1VdNN/L3bvvFsfov YdaUi5SosWfOOLYJkNwx8rVRSozaJCMTuM9TRYZcjP0/PI1K3xY9li7SpcffypYhtQVwFCuk4cBRj t2RX3N/U0bxL4GjRLah4Z/LyAAZYKePNcB9VSA6hjHJEuDw8lpWd3b5HUymuUhZ7JBRj3uZ6IwkdU j/59a9HZi7NkS8PWWxqQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oKVZF-004OAI-1X; Sun, 07 Aug 2022 01:59:01 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oKVZB-004O83-Em for linux-arm-kernel@lists.infradead.org; Sun, 07 Aug 2022 01:58:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1659837536; 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=SZh/yM6kokaO6+gJeFFxN++jZ3rqj9aWovbwRZ1sZ8g=; b=e3NVZJNUl+yrgp4ug/ng4uEZTrk7XWWk+LF+EYRASLcKTMZ4djNMty5sy5AnLjY3qsIsrl PgMt7SsCO7OTKQe3Nx5Fpy5bNvjI2aKjlMi0IXR7JHkFCq3WTbkFhVGkxuGYVtfE6Gn/UJ L20QJyufjW1NCi8LTWeW03STKdbrBCg= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-592-fRPzZ0wWMdqRwTlrV-o6AA-1; Sat, 06 Aug 2022 21:58:52 -0400 X-MC-Unique: fRPzZ0wWMdqRwTlrV-o6AA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BFF6B2800486; Sun, 7 Aug 2022 01:58:51 +0000 (UTC) Received: from localhost (ovpn-12-55.pek2.redhat.com [10.72.12.55]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A39931415116; Sun, 7 Aug 2022 01:58:50 +0000 (UTC) Date: Sun, 7 Aug 2022 09:58:47 +0800 From: Baoquan He To: Alexander Gordeev Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, hch@infradead.org, wangkefeng.wang@huawei.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 01/11] mm/ioremap: change the return value of io[re|un]map_allowed Message-ID: <20220807015847.GC416711@MiWiFi-R3L-srv> References: <20220801144029.57829-1-bhe@redhat.com> <20220801144029.57829-2-bhe@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220806_185857_569801_730E420B X-CRM114-Status: GOOD ( 13.35 ) 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/04/22 at 05:42pm, Alexander Gordeev wrote: > On Mon, Aug 01, 2022 at 10:40:19PM +0800, Baoquan He wrote: > > Hi Baoquan, > > > --- a/arch/arm64/mm/ioremap.c > > +++ b/arch/arm64/mm/ioremap.c > > @@ -3,19 +3,20 @@ > > #include > > #include > > > > -bool ioremap_allowed(phys_addr_t phys_addr, size_t size, unsigned long prot) > > +void __iomem *ioremap_allowed(phys_addr_t phys_addr, size_t size, unsigned long prot) > > { > > unsigned long last_addr = phys_addr + size - 1; > > + int ret = -EINVAL; > > If ret variable is really needed? There are two places where -EINVAL need be returned. I can remove variable ret, and return -EINVAL directly if there's concern. Thanks again for looking into this series. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel