linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [2.6.4-rc2] bogus semicolon behind if()
@ 2004-03-08 23:14 Thomas Schlichter
  2004-03-08 23:43 ` Andreas Schwab
  2004-03-09  0:33 ` Andrew Morton
  0 siblings, 2 replies; 22+ messages in thread
From: Thomas Schlichter @ 2004-03-08 23:14 UTC (permalink / raw)
  To: linux-kernel

Hi,

recently I found a bogus semicolon an if statement. So I was searching for 
other possible problems with following command:

find linux-2.6.4-rc2 -name "*.c" -exec grep -Hn "\<if[[:space:]]*(\([^()]\|
([^()]*)\)*)[[:space:]]*;" {} \;

That found following possible problems:

linux-2.6.4-rc2/arch/um/kernel/tt/tracer.c:257:		if(WIFEXITED(status)) ;
linux-2.6.4-rc2/arch/i386/kernel/io_apic.c:2200:				if (check_nmi_watchdog() < 
0);
linux-2.6.4-rc2/arch/i386/kernel/io_apic.c:2224:				if (check_nmi_watchdog() < 
0);
linux-2.6.4-rc2/drivers/atm/iphase.c:155:     if (!desc1) ;
linux-2.6.4-rc2/drivers/net/wan/pc300_drv.c:3664:			if (card->chan[i].d.dev);
linux-2.6.4-rc2/drivers/net/tokenring/ibmtr.c:613:	else if 
(ti->shared_ram_paging == 0xf);  /* No paging in adapter */
linux-2.6.4-rc2/drivers/usb/misc/speedtch.c:92:#define DEBUG_ON(x)	do { if 
(x); } while (0)
linux-2.6.4-rc2/drivers/usb/media/w9968cf.c:3374:		if (tuner.tuner != 0);
linux-2.6.4-rc2/drivers/isdn/capi/capiutil.c:438:	else if (c <= 0x0f);
linux-2.6.4-rc2/drivers/isdn/hisax/hfc_sx.c:385:	if (Read_hfc(cs, 
HFCSX_INT_S1));
linux-2.6.4-rc2/drivers/isdn/hisax/hfc_sx.c:415:	if (Read_hfc(cs, 
HFCSX_INT_S2));
linux-2.6.4-rc2/drivers/isdn/hisax/hfc_sx.c:1290:						if (Read_hfc(cs, 
HFCSX_INT_S1));
linux-2.6.4-rc2/drivers/isdn/hisax/hfc_pci.c:131:	if (Read_hfc(cs, 
HFCPCI_INT_S1));
linux-2.6.4-rc2/drivers/isdn/hisax/hfc_pci.c:161:	if (Read_hfc(cs, 
HFCPCI_INT_S1));
linux-2.6.4-rc2/drivers/isdn/hisax/hfc_pci.c:1543:						if (Read_hfc(cs, 
HFCPCI_INT_S1));
linux-2.6.4-rc2/drivers/s390/scsi/zfcp_erp.c:2057:		if (status == 
ZFCP_ERP_SUCCEEDED) ;	/* no further action */
linux-2.6.4-rc2/drivers/scsi/sg.c:356:	if (ppos != &filp->f_pos) ;	/* FIXME: 
Hmm.  Seek to the right place, or fail?  */
linux-2.6.4-rc2/drivers/scsi/sg.c:514:	if (ppos != &filp->f_pos) ;	/* FIXME: 
Hmm.  Seek to the right place, or fail?  */

Best regards
   Thomas Schlichter

P.S.: Wouldn't it be nice if gcc complained about these mistakes?


^ permalink raw reply	[flat|nested] 22+ messages in thread
* Re: [2.6.4-rc2] bogus semicolon behind if()
@ 2004-03-20 17:04 Mikael Pettersson
  0 siblings, 0 replies; 22+ messages in thread
From: Mikael Pettersson @ 2004-03-20 17:04 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, macro, phil.el, schwab, thomas.schlichter

On Thu, 18 Mar 2004 01:52:36 -0800, Andrew Morton wrote:
>Mikael Pettersson <mikpe@csd.uu.se> wrote:
>>
>> Maciej W. Rozycki writes:
>>  > On Wed, 17 Mar 2004, Andrew Morton wrote:
>>  > 
>>  > > I still have a couple of NMI patches in -mm:
>>  > > 
>>  > > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.5-rc1/2.6.5-rc1-mm1/broken-out/nmi_watchdog-local-apic-fix.patch
>>  > > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.5-rc1/2.6.5-rc1-mm1/broken-out/nmi-1-hz.patch
>>  > > 
>>  > > What should we do with these?
>>  > 
>>  >  I think we should ask Mikael Pettersson as he is the local APIC watchdog 
>>  > expert.  Mikael?
>> 
>> Will do. Is there a problem with them, or do you just want them
>> reviewed for merging into 2.6.5-rc?
>> 
>
>They seem to work OK - I did a batch of testing with various setups.  But a
>retest wouldn't hurt.
>
>We mainly need a review and general finish-it-off-and-bless-it please.

'nmi_watchdog-local-apic-fix.patch' looks Ok, although I
would prefer if it didn't put a 'static' on nmi_perfctr_msr:
the perfctr driver needs access to it.

I'm not happy with 'nmi-1-hz.patch'. The real problem is that
SMP with nmi_watchdog=2 initialises the lapic NMI watchdog but
doesn't check it and therefore doesn't reduce nmi_hz.
This is an SMP bug, but instead of fixing it the patch removes
the check from UP and changes nmi.c to compensate.

This would be Ok if check_nmi_watchdog() with nmi_watchdog=2
was redundant, but I don't believe it is. It has exposed bugs
and unexpected hardware changes before, and so should remain.

I propose the patch below instead. It changes smpboot.c to do a
check_nmi_watchdog() at the appropriate place, which fixes the
high NMI frequency problem w/o changing anything else.
I've verified that it solves the problem on my MP-capable UP box.

/Mikael

diff -ruN linux-2.6.5-rc2/arch/i386/kernel/smpboot.c linux-2.6.5-rc2.smpboot-lapic-watchdog-fix/arch/i386/kernel/smpboot.c
--- linux-2.6.5-rc2/arch/i386/kernel/smpboot.c	2004-03-11 14:01:25.000000000 +0100
+++ linux-2.6.5-rc2.smpboot-lapic-watchdog-fix/arch/i386/kernel/smpboot.c	2004-03-20 17:21:30.113862000 +0100
@@ -1107,6 +1107,9 @@
 		}
 	}
 
+	if (nmi_watchdog == NMI_LOCAL_APIC)
+		check_nmi_watchdog();
+
 	smpboot_setup_io_apic();
 
 	setup_boot_APIC_clock();

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

end of thread, other threads:[~2004-03-21  3:55 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-08 23:14 [2.6.4-rc2] bogus semicolon behind if() Thomas Schlichter
2004-03-08 23:43 ` Andreas Schwab
2004-03-08 23:56   ` Thomas Schlichter
2004-03-09  0:29   ` Andrew Morton
2004-03-09  7:01     ` Philippe Elie
2004-03-09 11:08       ` Thomas Schlichter
2004-03-10  6:08         ` Philippe Elie
2004-03-10 16:20           ` Zwane Mwaikambo
2004-03-17 17:20           ` Maciej W. Rozycki
2004-03-17 16:51         ` Maciej W. Rozycki
2004-03-17 18:25           ` Andrew Morton
2004-03-17 18:50             ` Maciej W. Rozycki
2004-03-18  9:46               ` Mikael Pettersson
2004-03-18  9:52                 ` Andrew Morton
2004-03-21  3:51             ` Zwane Mwaikambo
2004-03-21  3:55               ` Zwane Mwaikambo
2004-03-19 19:01           ` Thomas Schlichter
2004-03-19 20:30             ` Maciej W. Rozycki
2004-03-19 23:13               ` Thomas Schlichter
2004-03-09  0:33 ` Andrew Morton
2004-03-09 11:09   ` Thomas Schlichter
2004-03-20 17:04 Mikael Pettersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).