Re: add missing semicolon to tree(3) example code
On Mon, Feb 18, 2013 at 12:11:37AM +0100, Mark Kettenis wrote: > > Date: Sun, 17 Feb 2013 18:45:10 +0100 > > From: Otto Moerbeek > > > > On Sun, Feb 17, 2013 at 03:59:41PM +0100, Franco Fichtner wrote: > > > > > Hi all, > > > > > > found this still lingering in my tree. Still trying to figure out > > > the best workflow for sending patches. Not sure if this adheres > > > to the standards. > > > > > > Thanks, > > > Franco > > > --- > > > share/man/man3/tree.3 | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/share/man/man3/tree.3 b/share/man/man3/tree.3 > > > index bb9a5b2..f4a410c 100644 > > > --- a/share/man/man3/tree.3 > > > +++ b/share/man/man3/tree.3 > > > @@ -499,7 +499,7 @@ intcmp(struct node *e1, struct node *e2) > > > } > > > > > > RB_HEAD(inttree, node) head = RB_INITIALIZER(&head); > > > -RB_GENERATE(inttree, node, entry, intcmp) > > > +RB_GENERATE(inttree, node, entry, intcmp); > > > > > > int testdata[] = { > > > 20, 16, 17, 13, 3, 6, 1, 8, 2, 4, 10, 19, 5, 9, 12, 15, 18, > > > -- > > > > I don't agree. RB_GENERATE creates a function definition, and those are > > not followed by a semicolon. It would just create an empty declaration. > > On the other hand adding the semicolon helps editors to auto-indent > the code. emacs does not seem to have problems without a smeicolon anyway, some complers (using specific options) will complain about this. e.g. gcc --pedantic: x.c:18: warning: ISO C does not allow extra ';' outside of a function -Otto
Re: add missing semicolon to tree(3) example code
> Date: Sun, 17 Feb 2013 18:45:10 +0100 > From: Otto Moerbeek > > On Sun, Feb 17, 2013 at 03:59:41PM +0100, Franco Fichtner wrote: > > > Hi all, > > > > found this still lingering in my tree. Still trying to figure out > > the best workflow for sending patches. Not sure if this adheres > > to the standards. > > > > Thanks, > > Franco > > --- > > share/man/man3/tree.3 | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/share/man/man3/tree.3 b/share/man/man3/tree.3 > > index bb9a5b2..f4a410c 100644 > > --- a/share/man/man3/tree.3 > > +++ b/share/man/man3/tree.3 > > @@ -499,7 +499,7 @@ intcmp(struct node *e1, struct node *e2) > > } > > > > RB_HEAD(inttree, node) head = RB_INITIALIZER(&head); > > -RB_GENERATE(inttree, node, entry, intcmp) > > +RB_GENERATE(inttree, node, entry, intcmp); > > > > int testdata[] = { > > 20, 16, 17, 13, 3, 6, 1, 8, 2, 4, 10, 19, 5, 9, 12, 15, 18, > > -- > > I don't agree. RB_GENERATE creates a function definition, and those are > not followed by a semicolon. It would just create an empty declaration. On the other hand adding the semicolon helps editors to auto-indent the code.
Re: add missing semicolon to tree(3) example code
On Feb 17, 2013, at 6:45 PM, Otto Moerbeek wrote: > On Sun, Feb 17, 2013 at 03:59:41PM +0100, Franco Fichtner wrote: > >> Hi all, >> >> found this still lingering in my tree. Still trying to figure out >> the best workflow for sending patches. Not sure if this adheres >> to the standards. >> >> Thanks, >> Franco >> --- >> share/man/man3/tree.3 | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/share/man/man3/tree.3 b/share/man/man3/tree.3 >> index bb9a5b2..f4a410c 100644 >> --- a/share/man/man3/tree.3 >> +++ b/share/man/man3/tree.3 >> @@ -499,7 +499,7 @@ intcmp(struct node *e1, struct node *e2) >> } >> >> RB_HEAD(inttree, node) head = RB_INITIALIZER(&head); >> -RB_GENERATE(inttree, node, entry, intcmp) >> +RB_GENERATE(inttree, node, entry, intcmp); >> >> int testdata[] = { >> 20, 16, 17, 13, 3, 6, 1, 8, 2, 4, 10, 19, 5, 9, 12, 15, 18, >> -- > > I don't agree. RB_GENERATE creates a function definition, and those are > not followed by a semicolon. It would just create an empty declaration. Ok, I wasn't stating it's strictly necessary. It's just that most of the lines implementing splay or rb trees are using the semicolon. It implies knowledge of the underlying code to leave the semicolon out just for this particular macro; and the man page shows a semicolon in the synopsis section regardless. > As for sending diff, I (and quite some people here) prefer cvs diff -p > on a checked out tree, it shows which version you diffed against. Alright, thanks, I'll see what I can do on my real OpenBSD box. FWIW, this diff was based on -current. Franco
Re: add missing semicolon to tree(3) example code
On Sun, Feb 17, 2013 at 03:59:41PM +0100, Franco Fichtner wrote: > Hi all, > > found this still lingering in my tree. Still trying to figure out > the best workflow for sending patches. Not sure if this adheres > to the standards. > > Thanks, > Franco > --- > share/man/man3/tree.3 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/share/man/man3/tree.3 b/share/man/man3/tree.3 > index bb9a5b2..f4a410c 100644 > --- a/share/man/man3/tree.3 > +++ b/share/man/man3/tree.3 > @@ -499,7 +499,7 @@ intcmp(struct node *e1, struct node *e2) > } > > RB_HEAD(inttree, node) head = RB_INITIALIZER(&head); > -RB_GENERATE(inttree, node, entry, intcmp) > +RB_GENERATE(inttree, node, entry, intcmp); > > int testdata[] = { > 20, 16, 17, 13, 3, 6, 1, 8, 2, 4, 10, 19, 5, 9, 12, 15, 18, > -- I don't agree. RB_GENERATE creates a function definition, and those are not followed by a semicolon. It would just create an empty declaration. As for sending diff, I (and quite some people here) prefer cvs diff -p on a checked out tree, it shows which version you diffed against. -Otto
add missing semicolon to tree(3) example code
Hi all, found this still lingering in my tree. Still trying to figure out the best workflow for sending patches. Not sure if this adheres to the standards. Thanks, Franco --- share/man/man3/tree.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man3/tree.3 b/share/man/man3/tree.3 index bb9a5b2..f4a410c 100644 --- a/share/man/man3/tree.3 +++ b/share/man/man3/tree.3 @@ -499,7 +499,7 @@ intcmp(struct node *e1, struct node *e2) } RB_HEAD(inttree, node) head = RB_INITIALIZER(&head); -RB_GENERATE(inttree, node, entry, intcmp) +RB_GENERATE(inttree, node, entry, intcmp); int testdata[] = { 20, 16, 17, 13, 3, 6, 1, 8, 2, 4, 10, 19, 5, 9, 12, 15, 18, --
Re: OpenBSD/hppa port B1000 PCI bug during load of existing cardbus adapter driver
On 2/17/2013 5:29 AM, Ivan Solonin wrote: Hello. I've tested 2 different PCI PCMCIA/CardBus adapters known to OpenBSD with the latest snapshot GENERIC kernel but no one of them has reached operational state. Both adapters work on i386 machines. Is this related to the hppa page stating that "pcmcia(4) PCMCIA adapters." as an unsupported peripheral? ~Brian
OpenBSD/hppa port B1000 PCI bug during load of existing cardbus adapter driver
Hello. I've tested 2 different PCI PCMCIA/CardBus adapters known to OpenBSD with the latest snapshot GENERIC kernel but no one of them has reached operational state. Both adapters work on i386 machines. chip RICOH R5C475II: OpenBSD/hppa BOOT 1.2 boot> booting dk5a:/bsd: 4190208+1253376+606208 [80+203648+186846]=0x6a5774 SPID bits: 0xfe0, error = 0 pdc_coproc: 0xc0, 0xc0; model 10 rev 1 WARNING: BTLB purge failed WARNING: cannot block map kernel text [ using 391028 bytes of bsd ELF symbol table ] Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. Copyright (c) 1995-2013 OpenBSD. All rights reserved. http://www.OpenBSD.org OpenBSD 5.3-beta (GENERIC) #27: Fri Feb 15 20:09:52 MST 2013 dera...@hppa.openbsd.org:/usr/src/sys/arch/hppa/compile/GENERIC HP 9000/785/B1000 (AllegroLow W) PA-RISC 2.0a real mem = 1073741824 (1024MB) rsvd mem = 524288 (512KB) avail mem = 1045942272 (997MB) mainbus0 at root [flex fff8] pdc0 at mainbus0 power0 at mainbus0 offset 400804 lcd0 at mainbus0 offset 5d0008: model 0 cpu0 at mainbus0 offset ffa irq 31: PCXW L1-A 300MHz, FPU PCXW rev 1 cpu0: 512K(64b/l) Icache, 1024K(64b/l) wr-back Dcache, 160 coherent TLB mem0 at mainbus0 offset ed10200: size 1024MB astro0 at mainbus0 offset ed0: Astro rev 2.1 elroy0 at astro0 offset ed3c000: Elroy TR2.1 APIC ver 20, 7 pins pci0 at elroy0 elroy1 at astro0 offset ed38000: Elroy TR2.1 APIC ver 20, 7 pins pci1 at elroy1 elroy2 at astro0 offset ed32000: Elroy TR2.1 APIC ver 20, 7 pins pci2 at elroy2 cbb0 at pci2 dev 5 function 0 "Ricoh 5C475 CardBus" rev 0x80can't map registers elroy3 at astro0 offset ed3: Elroy TR2.1 APIC ver 20, 7 pins pci3 at elroy3 dc0 at pci3 dev 12 function 0 "DEC 21142/3" rev 0x41: line 2 irq 2, address 00:10:83:36:20:0b lxtphy0 at dc0 phy 1: LXT970 10/100 PHY, rev. 3 "Analog Devices AD1889 Audio" rev 0x00 at pci3 dev 13 function 0 not configured pciide0 at pci3 dev 14 function 0 "NS PC87415 IDE" rev 0x03: DMA, channel 0 configured to native-PCI, channel 1 configured to native-PCI pciide0: using line 0 irq 3 for native-PCI interrupt wd0 at pciide0 channel 0 drive 0: wd0: 16-sector PIO, LBA, 2014MB, 4124736 sectors atapiscsi0 at pciide0 channel 0 drive 1 scsibus0 at atapiscsi0: 2 targets cd0 at scsibus0 targ 0 lun 0: ATAPI 5/cdrom removable wd0(pciide0:0:0): using BIOS timings, DMA mode 2 cd0(pciide0:0:1): using BIOS timings, DMA mode 2 ssio0 at pci3 dev 14 function 1 "NS 87560 Legacy I/O" rev 0x01: line 0 irq 3 com0 at ssio0 offset 3f8 irq 4: ns16550a, 16 byte fifo com0: console com1 at ssio0 offset 2f8 irq 3: ns16550a, 16 byte fifo lpt0 at ssio0 offset 378 irq 7 ohci0 at pci3 dev 14 function 2 "NS USB" rev 0x02: line 0 irq 3, version 1.0, legacy support siop0 at pci3 dev 15 function 0 "Symbios Logic 53c896" rev 0x04: line 1 irq 5, using 8K of on-board RAM scsibus1 at siop0: 16 targets, initiator 7 siop0: switching to single-ended mode siop1 at pci3 dev 15 function 1 "Symbios Logic 53c896" rev 0x04: line 1 irq 5, using 8K of on-board RAM scsibus2 at siop1: 16 targets, initiator 7 sd0 at scsibus2 targ 5 lun 0: SCSI3 0/direct fixed serial.SEAGATE_ST336607LC_3JAX0RVN7516ZSR5 sd0: 35003MB, 512 bytes/sector, 71687372 sectors usb0 at ohci0: USB revision 1.0 uhub0 at usb0 "NS OHCI root hub" rev 1.00/1.00 addr 1 siop1: target 5 now using tagged 16 bit 40.0 MHz 31 REQ/ACK offset xfers vscsi0 at root scsibus3 at vscsi0: 256 targets softraid0 at root scsibus4 at softraid0: 256 targets bootpath: 10/0/15/1.5 class=1 flags=80 hpa=0xf4004000 spa=0x0 io=0x19000 root on sd0a (035c775f1aac71c7.a) swap on sd0b dump on sd0b chip RICOH R5C485: OpenBSD/hppa BOOT 1.2 boot> booting dk5a:/bsd: 4190208+1253376+606208 [80+203648+186846]=0x6a5774 SPID bits: 0xfe0, error = 0 pdc_coproc: 0xc0, 0xc0; model 10 rev 1 WARNING: BTLB purge failed WARNING: cannot block map kernel text [ using 391028 bytes of bsd ELF symbol table ] Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. Copyright (c) 1995-2013 OpenBSD. All rights reserved. http://www.OpenBSD.org OpenBSD 5.3-beta (GENERIC) #27: Fri Feb 15 20:09:52 MST 2013 dera...@hppa.openbsd.org:/usr/src/sys/arch/hppa/compile/GENERIC HP 9000/785/B1000 (AllegroLow W) PA-RISC 2.0a real mem = 1073741824 (1024MB) rsvd mem = 524288 (512KB) avail mem = 1045942272 (997MB) mainbus0 at root [flex fff8] pdc0 at mainbus0 power0 at mainbus0 offset 400804 lcd0 at mainbus0 offset 5d0008: model 0 cpu0 at mainbus0 offset ffa irq 31: PCXW L1-A 300MHz, FPU PCXW rev 1 cpu0: 512K(64b/l) Icache, 1024K(64b/l) wr-back Dcache, 160 coherent TLB mem0 at mainbus0 offset ed10200: size 1024MB astro0 at mainbus0 offset ed0: Astro rev 2.1 elroy0 at astro0 offset ed3c000: Elroy TR2.1 APIC ver 20, 7 pins pci0 at elroy0 elroy1 at astro0 offset ed38000: Elroy TR2.1 APIC ver 20, 7 pins pci1 at elroy1 elroy2 at astro0 offset ed32000: Elroy TR2.1 APIC
Re: Fixing a phrase in /stable.html
funny enough, i took a short break from the book i'm reading to check email and read this message. returning to the book i read this sentence: "We picked the twelfth and thirteenth of July, but for awhile the issue was in some doubt." :) --patrick On Sunday, February 17, 2013, Jason McIntyre wrote: > On Sun, Feb 17, 2013 at 01:29:00PM +0400, Nick Permyakov wrote: > > Hi, > > > > I might be nitpicking, but the sentence "This will take awhile..." at > > the bottom of http://www.openbsd.org/stable.html doesn't seem very > > grammatical to me. I'd suggest fixing it to read "...take a while...". > > > > Best regards, > > Nick Permyakov > > > > i thought it sounded strange too, so i looked it up. from collins > cobuild: > > awhile: "Awhile" means for a short time. It is more commonly > spelled `a while', which is considered more correct, especially > in British English. > > so i don;t think there's anything wrong with it, as such. having said > that, it's written in the context of a make build. i wonder whether the > author really wanted to suggest a short time ;) > > jmc > >
OpenBSD/hppa port B1000 PCI USB 2.0 bug
Hello. I've tested 3 different PCI USB 2.0 controllers on the latest snapshot but each of them has been halted during boot of the GENERIC kernel. All that controllers work fine on the different i386 platforms. chip VIA VT6212L: OpenBSD/hppa BOOT 1.2 boot> booting dk5a:/bsd: 4190208+1253376+606208 [80+203648+186846]=0x6a5774 SPID bits: 0xfe0, error = 0 pdc_coproc: 0xc0, 0xc0; model 10 rev 1 WARNING: BTLB purge failed WARNING: cannot block map kernel text [ using 391028 bytes of bsd ELF symbol table ] Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. Copyright (c) 1995-2013 OpenBSD. All rights reserved. http://www.OpenBSD.org OpenBSD 5.3-beta (GENERIC) #27: Fri Feb 15 20:09:52 MST 2013 dera...@hppa.openbsd.org:/usr/src/sys/arch/hppa/compile/GENERIC HP 9000/785/B1000 (AllegroLow W) PA-RISC 2.0a real mem = 1073741824 (1024MB) rsvd mem = 524288 (512KB) avail mem = 1045942272 (997MB) mainbus0 at root [flex fff8] pdc0 at mainbus0 power0 at mainbus0 offset 400804 lcd0 at mainbus0 offset 5d0008: model 0 cpu0 at mainbus0 offset ffa irq 31: PCXW L1-A 300MHz, FPU PCXW rev 1 cpu0: 512K(64b/l) Icache, 1024K(64b/l) wr-back Dcache, 160 coherent TLB mem0 at mainbus0 offset ed10200: size 1024MB astro0 at mainbus0 offset ed0: Astro rev 2.1 elroy0 at astro0 offset ed3c000: Elroy TR2.1 APIC ver 20, 7 pins pci0 at elroy0 elroy1 at astro0 offset ed38000: Elroy TR2.1 APIC ver 20, 7 pins pci1 at elroy1 elroy2 at astro0 offset ed32000: Elroy TR2.1 APIC ver 20, 7 pins pci2 at elroy2 uhci0 at pci2 dev 5 function 0 "VIA VT83C572 USB" rev 0x61: line 1 irq 2 uhci1 at pci2 dev 5 function 1 "VIA VT83C572 USB" rev 0x61: line 5 irq 3 ehci0 at pci2 dev 5 function 2 "VIA VT6202 USB" rev 0x63: line 3 irq 5 usb0 at ehci0: USB revision 2.0 uhub0 at usb0 "VIA EHCI root hub" rev 2.00/1.00 addr 1 usb1 at uhci0: USB revision 1.0 uhub1 at usb1 "VIA UHCI root hub" rev 1.00/1.00 addr 1 usb2 at uhci1: USB revision 1.0 uhub2 at usb2 "VIA UHCI root hub" rev 1.00/1.00 addr 1 elroy3 at astro0 offset ed3: Elroy TR2.1 APIC ver 20, 7 pins pci3 at elroy3 dc0 at pci3 dev 12 function 0 "DEC 21142/3" rev 0x41: line 2 irq 6, address 00:10:83:36:20:0b lxtphy0 at dc0 phy 1: LXT970 10/100 PHY, rev. 3 "Analog Devices AD1889 Audio" rev 0x00 at pci3 dev 13 function 0 not configured pciide0 at pci3 dev 14 function 0 "NS PC87415 IDE" rev 0x03: DMA, channel 0 configured to native-PCI, channel 1 configured to native-PCI pciide0: using line 0 irq 7 for native-PCI interrupt wd0 at pciide0 channel 0 drive 0: wd0: 16-sector PIO, LBA, 2014MB, 4124736 sectors atapiscsi0 at pciide0 channel 0 drive 1 scsibus0 at atapiscsi0: 2 targets cd0 at scsibus0 targ 0 lun 0: ATAPI 5/cdrom removable wd0(pciide0:0:0): using BIOS timings, DMA mode 2 cd0(pciide0:0:1): using BIOS timings, DMA mode 2 ssio0 at pci3 dev 14 function 1 "NS 87560 Legacy I/O" rev 0x01: line 0 irq 7 com0 at ssio0 offset 3f8 irq 4: ns16550a, 16 byte fifo com0: console com1 at ssio0 offset 2f8 irq 3: ns16550a, 16 byte fifo lpt0 at ssio0 offset 378 irq 7 ohci0 at pci3 dev 14 function 2 "NS USB" rev 0x02: line 0 irq 7, version 1.0, legacy support siop0 at pci3 dev 15 function 0 "Symbios Logic 53c896" rev 0x04: line 1 irq 8, using 8K of on-board RAM scsibus1 at siop0: 16 targets, initiator 7 siop0: switching to single-ended mode siop1 at pci3 dev 15 function 1 "Symbios Logic 53c896" rev 0x04: line 1 irq 8, using 8K of on-board RAM scsibus2 at siop1: 16 targets, initiator 7 sd0 at scsibus2 targ 5 lun 0: SCSI3 0/direct fixed serial.SEAGATE_ST336607LC_3JAX0RVN7516ZSR5 sd0: 35003MB, 512 bytes/sector, 71687372 sectors usb3 at ohci0: USB revision 1.0 uhub3 at usb3 "NS OHCI root hub" rev 1.00/1.00 addr 1 ehci0: unrecoverable error, controller halted chip ALi M5273: OpenBSD/hppa BOOT 1.2 boot> booting dk5a:/bsd: 4190208+1253376+606208 [80+203648+186846]=0x6a5774 SPID bits: 0xfe0, error = 0 pdc_coproc: 0xc0, 0xc0; model 10 rev 1 WARNING: BTLB purge failed WARNING: cannot block map kernel text [ using 391028 bytes of bsd ELF symbol table ] Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. Copyright (c) 1995-2013 OpenBSD. All rights reserved. http://www.OpenBSD.org OpenBSD 5.3-beta (GENERIC) #27: Fri Feb 15 20:09:52 MST 2013 dera...@hppa.openbsd.org:/usr/src/sys/arch/hppa/compile/GENERIC HP 9000/785/B1000 (AllegroLow W) PA-RISC 2.0a real mem = 1073741824 (1024MB) rsvd mem = 524288 (512KB) avail mem = 1045942272 (997MB) mainbus0 at root [flex fff8] pdc0 at mainbus0 power0 at mainbus0 offset 400804 lcd0 at mainbus0 offset 5d0008: model 0 cpu0 at mainbus0 offset ffa irq 31: PCXW L1-A 300MHz, FPU PCXW rev 1 cpu0: 512K(64b/l) Icache, 1024K(64b/l) wr-back Dcache, 160 coherent TLB mem0 at mainbus0 offset ed10200: size 1024MB astro0 at mainbus0 offset ed0: Astro rev 2.1 elroy0 at astro0 offset ed3c000: Elroy TR2.1 APIC ver 20, 7 pins pci0 at
Re: Fixing a phrase in /stable.html
On Sun, Feb 17, 2013 at 01:29:00PM +0400, Nick Permyakov wrote: > Hi, > > I might be nitpicking, but the sentence "This will take awhile..." at > the bottom of http://www.openbsd.org/stable.html doesn't seem very > grammatical to me. I'd suggest fixing it to read "...take a while...". > > Best regards, > Nick Permyakov > i thought it sounded strange too, so i looked it up. from collins cobuild: awhile: "Awhile" means for a short time. It is more commonly spelled `a while', which is considered more correct, especially in British English. so i don;t think there's anything wrong with it, as such. having said that, it's written in the context of a make build. i wonder whether the author really wanted to suggest a short time ;) jmc
Fixing a phrase in /stable.html
Hi, I might be nitpicking, but the sentence "This will take awhile..." at the bottom of http://www.openbsd.org/stable.html doesn't seem very grammatical to me. I'd suggest fixing it to read "...take a while...". Best regards, Nick Permyakov