From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cornelia Huck Subject: Re: [RFC][Patch 0/3] Fix device_move() vs. dpm_list issues. Date: Wed, 4 Mar 2009 11:01:31 +0100 Message-ID: <20090304110131.7adf2eb8@gondolin> References: <20090303162446.3aff4457@gondolin> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: Alan Stern Cc: Marcel Holtmann , Heiko Carstens , Martin Schwidefsky , Linux-pm mailing list List-Id: linux-pm@vger.kernel.org On Tue, 3 Mar 2009 14:53:18 -0500 (EST), Alan Stern wrote: > After looking through your s390 patch more carefully, I get a mixed-up > feeling -- as though you think dpm_list goes in reverse order. list_add_tail confused me... > Therefore all you need to do is add a third argument to device_move(); > it can be a enumeration taking on one of the values > > DPM_ORDER_DEV_AFTER_PARENT, > DPM_ORDER_PARENT_BEFORE_DEV, > DPM_ORDER_DEV_LAST. and DPM_ORDER_DO_NOTHING. > > (Come to think of it, I don't understand the reason for moving the > device to the end of dpm_list. What point is there in doing this?) Completeness. It is not strictly needed. > > > > Given that the callers still need to specify what to do, I find it much > > easier (and the resulting code much more understandable) if the callers > > fix up dpm_list... > > I disagree. Doing it the way described above would add less than 10 > lines of code to device_move() and one argument to each caller, whereas > your changes are a lot more extensive. I'm still not quite convinced, but I'll give it a try.