All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [alsa-cvslog] alsa-kernel: emu10k1: Fix outl() in snd_emu10k1_resume_regs()
       [not found] <ALOGGER1159978767.86@alsa-project.org>
@ 2006-10-04 16:23 ` James Courtier-Dutton
  2006-10-04 16:26   ` Takashi Iwai
                     ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: James Courtier-Dutton @ 2006-10-04 16:23 UTC (permalink / raw)
  To: alsa-devel

Takashi Iwai wrote:
> -		outl(emu->port + A_IOCFG, emu->saved_a_iocfg);
> -	outl(emu->port + HCFG, emu->saved_hcfg);
> +		outl(emu->saved_a_iocfg, emu->port + A_IOCFG);
> +	outl(emu->saved_hcfg, emu->port + HCFG);
>   
Is there any tool to find out who got this wrong in the first place?


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [alsa-cvslog] alsa-kernel: emu10k1: Fix outl() in snd_emu10k1_resume_regs()
  2006-10-04 16:23 ` [alsa-cvslog] alsa-kernel: emu10k1: Fix outl() in snd_emu10k1_resume_regs() James Courtier-Dutton
@ 2006-10-04 16:26   ` Takashi Iwai
  2006-10-04 16:52     ` Takashi Iwai
  2006-10-04 17:33     ` Ville Syrjälä
  2006-10-04 16:36   ` Arnaud Patard
  2006-10-04 18:08   ` Jaroslav Kysela
  2 siblings, 2 replies; 9+ messages in thread
From: Takashi Iwai @ 2006-10-04 16:26 UTC (permalink / raw)
  To: James Courtier-Dutton; +Cc: alsa-devel

At Wed, 04 Oct 2006 17:23:14 +0100,
James Courtier-Dutton wrote:
> 
> Takashi Iwai wrote:
> > -		outl(emu->port + A_IOCFG, emu->saved_a_iocfg);
> > -	outl(emu->port + HCFG, emu->saved_hcfg);
> > +		outl(emu->saved_a_iocfg, emu->port + A_IOCFG);
> > +	outl(emu->saved_hcfg, emu->port + HCFG);
> >   
> Is there any tool to find out who got this wrong in the first place?

One could check whether the argument is long or not.  The long is
likely an i/o port while the data is int or unsigned int.
But, C allows implicit conversion, so the compiler would never
complain...


Takashi

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [alsa-cvslog] alsa-kernel: emu10k1: Fix outl() in snd_emu10k1_resume_regs()
  2006-10-04 16:23 ` [alsa-cvslog] alsa-kernel: emu10k1: Fix outl() in snd_emu10k1_resume_regs() James Courtier-Dutton
  2006-10-04 16:26   ` Takashi Iwai
@ 2006-10-04 16:36   ` Arnaud Patard
  2006-10-04 16:43     ` James Courtier-Dutton
  2006-10-04 18:08   ` Jaroslav Kysela
  2 siblings, 1 reply; 9+ messages in thread
From: Arnaud Patard @ 2006-10-04 16:36 UTC (permalink / raw)
  To: James Courtier-Dutton; +Cc: alsa-devel

James Courtier-Dutton <James@superbug.co.uk> writes:

> Takashi Iwai wrote:
>> -		outl(emu->port + A_IOCFG, emu->saved_a_iocfg);
>> -	outl(emu->port + HCFG, emu->saved_hcfg);
>> +		outl(emu->saved_a_iocfg, emu->port + A_IOCFG);
>> +	outl(emu->saved_hcfg, emu->port + HCFG);
>>   
> Is there any tool to find out who got this wrong in the first place?

Git or gitweb. I think also that hg should have also the history

FYI, a quick look to gitweb, gives this commit :
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=09668b441dacdf4640509b640ad73e24efd5204f


Regards,
Arnaud


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [alsa-cvslog] alsa-kernel: emu10k1: Fix outl() in snd_emu10k1_resume_regs()
  2006-10-04 16:36   ` Arnaud Patard
@ 2006-10-04 16:43     ` James Courtier-Dutton
  2006-10-04 16:52       ` Jochen Voss
  0 siblings, 1 reply; 9+ messages in thread
From: James Courtier-Dutton @ 2006-10-04 16:43 UTC (permalink / raw)
  To: Arnaud Patard (Rtp); +Cc: alsa-devel

Arnaud Patard (Rtp) wrote:
> James Courtier-Dutton <James@superbug.co.uk> writes:
>
>   
>> Takashi Iwai wrote:
>>     
>>> -		outl(emu->port + A_IOCFG, emu->saved_a_iocfg);
>>> -	outl(emu->port + HCFG, emu->saved_hcfg);
>>> +		outl(emu->saved_a_iocfg, emu->port + A_IOCFG);
>>> +	outl(emu->saved_hcfg, emu->port + HCFG);
>>>   
>>>       
>> Is there any tool to find out who got this wrong in the first place?
>>     
>
> Git or gitweb. I think also that hg should have also the history
>
> FYI, a quick look to gitweb, gives this commit :
> http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=09668b441dacdf4640509b640ad73e24efd5204f
>
>
> Regards,
> Arnaud
>
>   

I meant, how do I find out who committed the line with the bug in it.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [alsa-cvslog] alsa-kernel: emu10k1: Fix outl() in snd_emu10k1_resume_regs()
  2006-10-04 16:43     ` James Courtier-Dutton
@ 2006-10-04 16:52       ` Jochen Voss
  0 siblings, 0 replies; 9+ messages in thread
From: Jochen Voss @ 2006-10-04 16:52 UTC (permalink / raw)
  To: alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 344 bytes --]

Hello,

On Wed, Oct 04, 2006 at 05:43:17PM +0100, James Courtier-Dutton wrote:
> I meant, how do I find out who committed the line with the bug in it.

For git there is git-blame which annotates each line of a file with
information about the last commit.  I do not know about hg though.

All the best,
Jochen
-- 
http://seehuhn.de/

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 348 bytes --]

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

[-- Attachment #3: Type: text/plain, Size: 161 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [alsa-cvslog] alsa-kernel: emu10k1: Fix outl() in snd_emu10k1_resume_regs()
  2006-10-04 16:26   ` Takashi Iwai
@ 2006-10-04 16:52     ` Takashi Iwai
  2006-10-04 17:33     ` Ville Syrjälä
  1 sibling, 0 replies; 9+ messages in thread
From: Takashi Iwai @ 2006-10-04 16:52 UTC (permalink / raw)
  To: James Courtier-Dutton; +Cc: alsa-devel

At Wed, 04 Oct 2006 18:26:24 +0200,
I wrote:
> 
> At Wed, 04 Oct 2006 17:23:14 +0100,
> James Courtier-Dutton wrote:
> > 
> > Takashi Iwai wrote:
> > > -		outl(emu->port + A_IOCFG, emu->saved_a_iocfg);
> > > -	outl(emu->port + HCFG, emu->saved_hcfg);
> > > +		outl(emu->saved_a_iocfg, emu->port + A_IOCFG);
> > > +	outl(emu->saved_hcfg, emu->port + HCFG);
> > >   
> > Is there any tool to find out who got this wrong in the first place?
> 
> One could check whether the argument is long or not.  The long is
> likely an i/o port while the data is int or unsigned int.
> But, C allows implicit conversion, so the compiler would never
> complain...

Err, I must be dense.

An easy way would be to check the line with hg annotate with the
target file, then check the commit log.

Before you digging in:  that part is my fault :)


Takashi

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [alsa-cvslog] alsa-kernel: emu10k1: Fix outl() in snd_emu10k1_resume_regs()
  2006-10-04 16:26   ` Takashi Iwai
  2006-10-04 16:52     ` Takashi Iwai
@ 2006-10-04 17:33     ` Ville Syrjälä
  1 sibling, 0 replies; 9+ messages in thread
From: Ville Syrjälä @ 2006-10-04 17:33 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, James Courtier-Dutton

On Wed, Oct 04, 2006 at 06:26:24PM +0200, Takashi Iwai wrote:
> At Wed, 04 Oct 2006 17:23:14 +0100,
> James Courtier-Dutton wrote:
> > 
> > Takashi Iwai wrote:
> > > -		outl(emu->port + A_IOCFG, emu->saved_a_iocfg);
> > > -	outl(emu->port + HCFG, emu->saved_hcfg);
> > > +		outl(emu->saved_a_iocfg, emu->port + A_IOCFG);
> > > +	outl(emu->saved_hcfg, emu->port + HCFG);
> > >   
> > Is there any tool to find out who got this wrong in the first place?
> 
> One could check whether the argument is long or not.  The long is
> likely an i/o port while the data is int or unsigned int.
> But, C allows implicit conversion, so the compiler would never
> complain...

Using sparse should help in avoiding this kind of bug.

-- 
Ville Syrjälä
syrjala@sci.fi
http://www.sci.fi/~syrjala/

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [alsa-cvslog] alsa-kernel: emu10k1: Fix outl() in snd_emu10k1_resume_regs()
  2006-10-04 16:23 ` [alsa-cvslog] alsa-kernel: emu10k1: Fix outl() in snd_emu10k1_resume_regs() James Courtier-Dutton
  2006-10-04 16:26   ` Takashi Iwai
  2006-10-04 16:36   ` Arnaud Patard
@ 2006-10-04 18:08   ` Jaroslav Kysela
  2006-10-04 18:12     ` Jaroslav Kysela
  2 siblings, 1 reply; 9+ messages in thread
From: Jaroslav Kysela @ 2006-10-04 18:08 UTC (permalink / raw)
  To: James Courtier-Dutton; +Cc: alsa-devel

On Wed, 4 Oct 2006, James Courtier-Dutton wrote:

> Takashi Iwai wrote:
> > -		outl(emu->port + A_IOCFG, emu->saved_a_iocfg);
> > -	outl(emu->port + HCFG, emu->saved_hcfg);
> > +		outl(emu->saved_a_iocfg, emu->port + A_IOCFG);
> > +	outl(emu->saved_hcfg, emu->port + HCFG);
> >   
> Is there any tool to find out who got this wrong in the first place?

Appearently, the bug is in code from first commit of PM code:

Use:

# hg annonate emu10k1_main.c
....
3769:   outl(emu->port + HCFG, emu->saved_hcfg);
....
# hg log -vr 3769
changeset:   3769:f30a961a9d6855846d824f0a23a1565030399e6c
user:        tiwai
date:        Thu Nov 17 16:14:10 2005 +0000
files:       include/emu10k1.h pci/emu10k1/emu10k1.c 
pci/emu10k1/emu10k1_main.c pci/emu10k1/emufx.c pci/emu10k1/emupcm.c 
pci/emu10k1/p16v.c
description:
emu10k1 - Add PM support

Add PM support to emu10k1 driver.

						Jaroslav

-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [alsa-cvslog] alsa-kernel: emu10k1: Fix outl() in snd_emu10k1_resume_regs()
  2006-10-04 18:08   ` Jaroslav Kysela
@ 2006-10-04 18:12     ` Jaroslav Kysela
  0 siblings, 0 replies; 9+ messages in thread
From: Jaroslav Kysela @ 2006-10-04 18:12 UTC (permalink / raw)
  To: James Courtier-Dutton; +Cc: alsa-devel

On Wed, 4 Oct 2006, Jaroslav Kysela wrote:

> On Wed, 4 Oct 2006, James Courtier-Dutton wrote:
> 
> > Takashi Iwai wrote:
> > > -		outl(emu->port + A_IOCFG, emu->saved_a_iocfg);
> > > -	outl(emu->port + HCFG, emu->saved_hcfg);
> > > +		outl(emu->saved_a_iocfg, emu->port + A_IOCFG);
> > > +	outl(emu->saved_hcfg, emu->port + HCFG);
> > >   
> > Is there any tool to find out who got this wrong in the first place?
> 
> Appearently, the bug is in code from first commit of PM code:
> 
> Use:
> 
> # hg annonate emu10k1_main.c

Sorry, should be 'hg annotate' of course.

						Jaroslav

-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-10-04 18:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <ALOGGER1159978767.86@alsa-project.org>
2006-10-04 16:23 ` [alsa-cvslog] alsa-kernel: emu10k1: Fix outl() in snd_emu10k1_resume_regs() James Courtier-Dutton
2006-10-04 16:26   ` Takashi Iwai
2006-10-04 16:52     ` Takashi Iwai
2006-10-04 17:33     ` Ville Syrjälä
2006-10-04 16:36   ` Arnaud Patard
2006-10-04 16:43     ` James Courtier-Dutton
2006-10-04 16:52       ` Jochen Voss
2006-10-04 18:08   ` Jaroslav Kysela
2006-10-04 18:12     ` Jaroslav Kysela

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.