Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753088AbZKARTO (ORCPT ); Sun, 1 Nov 2009 12:19:14 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752945AbZKARTL (ORCPT ); Sun, 1 Nov 2009 12:19:11 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:57023 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752893AbZKARTJ (ORCPT ); Sun, 1 Nov 2009 12:19:09 -0500 Date: Sun, 1 Nov 2009 09:18:12 -0800 (PST) From: Linus Torvalds X-X-Sender: torvalds@localhost.localdomain To: "Rafael J. Wysocki" cc: Benjamin Herrenschmidt , Linux Kernel Mailing List , Kernel Testers List , Greg Kroah-Hartman , Jose Marino , ACPI Devel Maling List , Linux PCI , Dominik Brodowski Subject: Re: Help needed, Re: [Bug #14334] pcmcia suspend regression from 2.6.31.1 to 2.6.31.2 - Dell Inspiron 600m In-Reply-To: <200911010936.10409.rjw@sisk.pl> Message-ID: References: <200911010010.07394.rjw@sisk.pl> <200911010024.12081.rjw@sisk.pl> <200911010936.10409.rjw@sisk.pl> User-Agent: Alpine 2.01 (LFD 1184 2008-12-16) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1366 Lines: 42 On Sun, 1 Nov 2009, Rafael J. Wysocki wrote: > > If people don't object, I'll push it through the suspend-2.6 tree along > with a few other bug fixes. No objections, but a cleanup request: > +static int socket_early_resume(struct pcmcia_socket *skt) > +{ > + if (skt->state & SOCKET_SUSPEND) > + socket_start_resume(skt); > + > + return 0; > +} > + > +static int socket_late_resume(struct pcmcia_socket *skt) > +{ > + if (!(skt->state & SOCKET_SUSPEND)) > + return 0; As far as I can tell, that "SOCKET_SUSPEND" test is totally pointless. That socket _is_ going to be suspended, and testing for it here just seems to confuse things. So I'd remove it from both early_resume and late_resume, and only keep it in the case of the legacy user-requested suspend/resume (do we even do that any more?). The SOCKET_SUSPEND flag itself is still relevant, of course, since the state change handling will test it (in order to avoid insert/remove handlign while we have the suspend flag set). It's just that the suspend code shouldn't _test_ it, since the suspend code is what sets it in the first place. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/