Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752876AbcLLQdG (ORCPT ); Mon, 12 Dec 2016 11:33:06 -0500 Received: from smtp06.smtpout.orange.fr ([80.12.242.128]:45400 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751180AbcLLQdF (ORCPT ); Mon, 12 Dec 2016 11:33:05 -0500 X-ME-Helo: belgarion X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Mon, 12 Dec 2016 17:33:03 +0100 X-ME-IP: 109.222.95.68 From: Robert Jarzmik To: arvind Yadav Cc: Boris Brezillon , 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 Subject: Re: [V2] mtd: devices: docg3:- Handle return value of devm_ioremap. References: <1481511604-6116-1-git-send-email-arvind.yadav.cs@gmail.com> <20161212094218.2d29b34a@bbrezillon> <80fc935a-39aa-eaca-e75c-02078c3dab05@gmail.com> X-URL: http://belgarath.falguerolles.org/ Date: Mon, 12 Dec 2016 17:32:58 +0100 In-Reply-To: <80fc935a-39aa-eaca-e75c-02078c3dab05@gmail.com> (arvind Yadav's message of "Mon, 12 Dec 2016 21:33:05 +0530") Message-ID: <8760mp151h.fsf@belgarion.home> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 919 Lines: 24 arvind Yadav writes: > 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. Hi, You're right Arvind, and still, it's worth noticing that the docg3 access semantics imply a "reserved" resource path (see how doc_register_readb() does a write and how this cannot be shared with another driver). Therefore I'll be willing to ack a mix of your both patches, the devm_ioremap_resource() from Boris and the error message from your patch. Cheers. -- Robert