From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Shtylyov Subject: Re: [ PATCH] Add suspend/resume for HPET was: Re: [3/6] 2.6.21-rc4: known regressions Date: Thu, 29 Mar 2007 17:20:27 +0400 Message-ID: <460BBD1B.4040308@ru.mvista.com> References: <200703290641.20236.maximlevitsky@gmail.com> <200703290747.28929.maximlevitsky@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <200703290747.28929.maximlevitsky@gmail.com> 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: Maxim Cc: gregkh@suse.de, Jeff Chua , linux-ide@vger.kernel.org, jgarzik@pobox.com, Ingo Molnar , linux-pm@lists.osdl.org, Linux Kernel Mailing List , Adrian Bunk , linux-acpi@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz, "Eric W. Biederman" , Jens Axboe , "Michael S. Tsirkin" , Thomas Gleixner , Linus Torvalds , Andrew Morton List-Id: linux-ide@vger.kernel.org Hello. Maxim wrote: > --- > This adds support of suspend/resume on i386 for HPET The part after usually "---" gets cut off, the patch description and = signoff should actially *precede* it. > Signed-off-by: Maxim Levitsky > diff --git a/arch/i386/kernel/hpet.c b/arch/i386/kernel/hpet.c > index 0fd9fba..7c67780 100644 > --- a/arch/i386/kernel/hpet.c > +++ b/arch/i386/kernel/hpet.c [...] > +static __init int hpet_register_sysfs(void) > +{ > + int err; > + > + if (!is_hpet_capable()) > + return 0; > + > + err =3D sysdev_class_register(&hpet_class); > + > + if (!err) { > + sysdev_register(&hpet_device); > + if (err) > + sysdev_class_unregister(&hpet_class); This doesn't make sense, err will always be 0. Perhaps you actually = intended to check the result of sysdev_register()? > + } > + > + return err; > +} > + > +device_initcall(hpet_register_sysfs); > + > +#endif WBR, Sergei From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753469AbXC2NUB (ORCPT ); Thu, 29 Mar 2007 09:20:01 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753466AbXC2NUB (ORCPT ); Thu, 29 Mar 2007 09:20:01 -0400 Received: from h155.mvista.com ([63.81.120.155]:21936 "EHLO imap.sh.mvista.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753457AbXC2NT7 (ORCPT ); Thu, 29 Mar 2007 09:19:59 -0400 Message-ID: <460BBD1B.4040308@ru.mvista.com> Date: Thu, 29 Mar 2007 17:20:27 +0400 From: Sergei Shtylyov Organization: MontaVista Software Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.2) Gecko/20040803 X-Accept-Language: ru, en-us, en-gb MIME-Version: 1.0 To: Maxim Cc: Linus Torvalds , Ingo Molnar , Thomas Gleixner , Jeff Chua , Adrian Bunk , Andrew Morton , Linux Kernel Mailing List , "Eric W. Biederman" , "Rafael J. Wysocki" , pavel@suse.cz, linux-pm@lists.osdl.org, gregkh@suse.de, linux-pci@atrey.karlin.mff.cuni.cz, Jens Axboe , Len Brown , linux-acpi@vger.kernel.org, jgarzik@pobox.com, linux-ide@vger.kernel.org, "Michael S. Tsirkin" Subject: Re: [ PATCH] Add suspend/resume for HPET was: Re: [3/6] 2.6.21-rc4: known regressions References: <200703290641.20236.maximlevitsky@gmail.com> <200703290747.28929.maximlevitsky@gmail.com> In-Reply-To: <200703290747.28929.maximlevitsky@gmail.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Hello. Maxim wrote: > --- > This adds support of suspend/resume on i386 for HPET The part after usually "---" gets cut off, the patch description and signoff should actially *precede* it. > Signed-off-by: Maxim Levitsky > diff --git a/arch/i386/kernel/hpet.c b/arch/i386/kernel/hpet.c > index 0fd9fba..7c67780 100644 > --- a/arch/i386/kernel/hpet.c > +++ b/arch/i386/kernel/hpet.c [...] > +static __init int hpet_register_sysfs(void) > +{ > + int err; > + > + if (!is_hpet_capable()) > + return 0; > + > + err = sysdev_class_register(&hpet_class); > + > + if (!err) { > + sysdev_register(&hpet_device); > + if (err) > + sysdev_class_unregister(&hpet_class); This doesn't make sense, err will always be 0. Perhaps you actually intended to check the result of sysdev_register()? > + } > + > + return err; > +} > + > +device_initcall(hpet_register_sysfs); > + > +#endif WBR, Sergei