Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753346AbcLLSQI (ORCPT ); Mon, 12 Dec 2016 13:16:08 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:32983 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752633AbcLLSQH (ORCPT ); Mon, 12 Dec 2016 13:16:07 -0500 Subject: Re: [V2] mtd: devices: docg3:- Handle return value of devm_ioremap. To: Boris Brezillon References: <1481511604-6116-1-git-send-email-arvind.yadav.cs@gmail.com> <20161212094218.2d29b34a@bbrezillon> <80fc935a-39aa-eaca-e75c-02078c3dab05@gmail.com> <20161212180444.22a1f4ff@bbrezillon> Cc: robert.jarzmik@free.fr, dwmw2@infradead.org, computersforpeace@gmail.com, marek.vasut@gmail.com, richard@nod.at, cyrille.pitchen@atmel.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org From: arvind Yadav Message-ID: Date: Mon, 12 Dec 2016 23:45:55 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20161212180444.22a1f4ff@bbrezillon> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1103 Lines: 35 Hi Boris, Yes, It's possible that two driver can use same iomem region. For example you can check commit id - : 33cf75656923ff11d67a937a4f8e9344f58cea77 Here, It's not required. Thanks -Arvind On Monday 12 December 2016 10:34 PM, Boris Brezillon wrote: > Hi Arvind, > > On Mon, 12 Dec 2016 21:33:05 +0530 > arvind Yadav wrote: > >> There is problem, if you will use devm_ioremap_resource instead of >> devm_ioremap, >> than devm_ioremap_resource will call request_mem_region(). >> request_mem_region() allows to tell the kernel that this driver is going >> to use >> this range of I/O addresses, which will prevent other drivers to make an >> overlapping call to request_mem_region If other driver want to use same >> address >> space to access then it will not allow. Means we can not share same >> address space >> between two driver. > The question is, is it required here? In general, allowing 2 different > drivers from touching the same iomem region is a bad idea, so, if > there's a reason to allow that here, I'd like to know more about it. > > Thanks, > > Boris