From: Takashi Iwai Subject: Re: [patch] make some bitfields unsigned Date: Mon, 16 Nov 2009 10:14:22 +0100 Message-ID: References: Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id DFD9B10380A for ; Mon, 16 Nov 2009 10:14:22 +0100 (CET) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Dan Carpenter Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Mon, 16 Nov 2009 11:07:17 +0200 (SAST), Dan Carpenter wrote: > > This is a clean up and doesn't change the behavior. > > Bit fields should always be unsigned. Otherwise pm_suspend_enabled will > be -1 when you want it to be 1. The other bad thing is that the sparse > checker will complain 36 times if they aren't unsigned. > > The other bitfields in that struct are unsigned already. > > regards, > dan carpenter > > Signed-off-by: Dan Carpenter Thanks! Applied now. Takashi > > --- orig/sound/pci/ice1712/ice1712.h 2009-11-14 12:09:26.000000000 +0200 > +++ devel/sound/pci/ice1712/ice1712.h 2009-11-14 12:10:01.000000000 +0200 > @@ -382,8 +382,8 @@ > #ifdef CONFIG_PM > int (*pm_suspend)(struct snd_ice1712 *); > int (*pm_resume)(struct snd_ice1712 *); > - int pm_suspend_enabled:1; > - int pm_saved_is_spdif_master:1; > + unsigned int pm_suspend_enabled:1; > + unsigned int pm_saved_is_spdif_master:1; > unsigned int pm_saved_spdif_ctrl; > unsigned char pm_saved_spdif_cfg; > unsigned int pm_saved_route; >