Semicolon missing in if_dwxe.c probably leading to a bug

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Semicolon missing in if_dwxe.c probably leading to a bug

wilfried.meindl
>Synopsis: typo: if_dwxe.c: missing semicolon in dwxe_reset()
>Category: kernel
>Environment:
        System      : OpenBSD 6.5
        Details     : OpenBSD 6.5 (GENERIC.MP) #2: Thu Aug 29 20:11:44 CEST 2019
                         [hidden email]:/usr/src/sys/arch/arm64/compile/GENERIC.MP

        Architecture: OpenBSD.arm64
        Machine     : arm64
>Description:
        While looking at the source file /sys/dev/fdt/if_dwxe.c I realized
        that a semicolon might be missing after the 'return' in the function
        dwxe_reset(), line 1266. The logic of the code and the indentation
        suggest this.
        The delay call one line lower should probably reduce the polling
        frequency. Right now it is an argument of the return statement and
        only called when the loop is exited, not while it is running.
>How-To-Repeat:
        n\a
>Fix:
        Put a semicolon after the 'return' keyword in file
        /sys/dev/fdt/if_dwxe.c in the function dwxe_reset(), line 1266.


dmesg:
OpenBSD 6.5 (GENERIC.MP) #2: Thu Aug 29 20:11:44 CEST 2019
    [hidden email]:/usr/src/sys/arch/arm64/compile/GENERIC.MP
real mem  = 944558080 (900MB)
avail mem = 886784000 (845MB)
mainbus0 at root: FriendlyElec NanoPi-NEO2
cpu0 at mainbus0 mpidr 0: ARM Cortex-A53 r0p4
cpu0: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu0: 512KB 64b/line 16-way L2 cache
efi0 at mainbus0: UEFI 2.7
efi0: Das U-Boot rev 0x20190100
apm0 at mainbus0
sxiccmu0 at mainbus0
psci0 at mainbus0: PSCI 1.1, SMCCC 1.1
simplebus0 at mainbus0: "soc"
syscon0 at simplebus0: "syscon"
sxiccmu1 at simplebus0
sxipio0 at simplebus0: 94 pins
ampintc0 at simplebus0 nirq 224, ncpu 4 ipi: 0, 1: "interrupt-controller"
sxiccmu2 at simplebus0
sxipio1 at simplebus0: 12 pins
"clock" at simplebus0 not configured
"hdmi" at simplebus0 not configured
"i2s" at simplebus0 not configured
"mixer" at simplebus0 not configured
"sound" at simplebus0 not configured
"lcd-controller" at simplebus0 not configured
"syscon" at simplebus0 not configured
"dma-controller" at simplebus0 not configured
sximmc0 at simplebus0
sdmmc0 at sximmc0: 4-bit, sd high-speed, mmc high-speed, dma
"usb" at simplebus0 not configured
"eeprom" at simplebus0 not configured
"phy" at simplebus0 not configured
ehci0 at simplebus0
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Generic EHCI root hub" rev 2.00/1.00 addr 1
ohci0 at simplebus0: version 1.0
ehci1 at simplebus0
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 configuration 1 interface 0 "Generic EHCI root hub" rev 2.00/1.00 addr 1
ohci1 at simplebus0: version 1.0
ehci2 at simplebus0
usb2 at ehci2: USB revision 2.0
uhub2 at usb2 configuration 1 interface 0 "Generic EHCI root hub" rev 2.00/1.00 addr 1
ohci2 at simplebus0: version 1.0
ehci3 at simplebus0
usb3 at ehci3: USB revision 2.0
uhub3 at usb3 configuration 1 interface 0 "Generic EHCI root hub" rev 2.00/1.00 addr 1
ohci3 at simplebus0: version 1.0
"clock" at simplebus0 not configured
"pinctrl" at simplebus0 not configured
sxitemp0 at simplebus0
"timer" at simplebus0 not configured
dwxe0 at simplebus0: address 02:01:75:c1:e2:5d
rgephy0 at dwxe0 phy 0: RTL8169S/8110S/8211 PHY, rev. 5
"spi" at simplebus0 not configured
"spi" at simplebus0 not configured
"watchdog" at simplebus0 not configured
"codec" at simplebus0 not configured
com0 at simplebus0: ns16550, no working fifo
com0: console
com1 at simplebus0: ns16550, no working fifo
com2 at simplebus0: ns16550, no working fifo
com3 at simplebus0: ns16550, no working fifo
sxitwi0 at simplebus0
iic0 at sxitwi0
"dallas,ds1307" at iic0 addr 0x68 not configured
sxitwi1 at simplebus0
iic1 at sxitwi1
sxitwi2 at simplebus0
iic2 at sxitwi2
"interrupt-controller" at simplebus0 not configured
sxirtc0 at simplebus0
"clock" at simplebus0 not configured
"codec-analog" at simplebus0 not configured
"pinctrl" at simplebus0 not configured
gpio0 at sxipio0: 32 pins
gpio1 at sxipio0: 32 pins
gpio2 at sxipio0: 32 pins
gpio3 at sxipio0: 32 pins
gpio4 at sxipio0: 32 pins
gpio5 at sxipio0: 32 pins
gpio6 at sxipio0: 32 pins
gpio7 at sxipio1: 32 pins
usb4 at ohci0: USB revision 1.0
uhub4 at usb4 configuration 1 interface 0 "Generic OHCI root hub" rev 1.00/1.00 addr 1
usb5 at ohci1: USB revision 1.0
uhub5 at usb5 configuration 1 interface 0 "Generic OHCI root hub" rev 1.00/1.00 addr 1
usb6 at ohci2: USB revision 1.0
uhub6 at usb6 configuration 1 interface 0 "Generic OHCI root hub" rev 1.00/1.00 addr 1
usb7 at ohci3: USB revision 1.0
uhub7 at usb7 configuration 1 interface 0 "Generic OHCI root hub" rev 1.00/1.00 addr 1
agtimer0 at mainbus0: tick rate 24000 KHz
cpu1 at mainbus0 mpidr 1: ARM Cortex-A53 r0p4
cpu1: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu1: 512KB 64b/line 16-way L2 cache
cpu2 at mainbus0 mpidr 2: ARM Cortex-A53 r0p4
cpu2: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu2: 512KB 64b/line 16-way L2 cache
cpu3 at mainbus0 mpidr 3: ARM Cortex-A53 r0p4
cpu3: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache
cpu3: 512KB 64b/line 16-way L2 cache
scsibus0 at sdmmc0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <SD/MMC, SC128, 0080> SCSI2 0/direct removable
sd0: 121942MB, 512 bytes/sector, 249737216 sectors
umass0 at uhub3 port 1 configuration 1 interface 0 "TOSHIBA External USB 3.0" rev 2.10/3.15 addr 2
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets, initiator 0
sd1 at scsibus1 targ 1 lun 0: <TOSHIBA, External USB 3.0, 5438> SCSI4 0/direct fixed serial.0480a20250323015186F
sd1: 1907729MB, 512 bytes/sector, 3907029164 sectors
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
bootfile: sd0a:/bsd
boot device: sd0
root on sd0a (a4fabe77cb4ff019.a) swap on sd0b dump on sd0b

usbdevs:
Controller /dev/usb0:
addr 01: 0000:0000 Generic, EHCI root hub
         high speed, self powered, config 1, rev 1.00
         driver: uhub0
Controller /dev/usb1:
addr 01: 0000:0000 Generic, EHCI root hub
         high speed, self powered, config 1, rev 1.00
         driver: uhub1
Controller /dev/usb2:
addr 01: 0000:0000 Generic, EHCI root hub
         high speed, self powered, config 1, rev 1.00
         driver: uhub2
Controller /dev/usb3:
addr 01: 0000:0000 Generic, EHCI root hub
         high speed, self powered, config 1, rev 1.00
         driver: uhub3
addr 02: 0480:a202 TOSHIBA, External USB 3.0
         high speed, power 500 mA, config 1, rev 3.15, iSerial 20150323015186F
         driver: umass0
Controller /dev/usb4:
addr 01: 0000:0000 Generic, OHCI root hub
         full speed, self powered, config 1, rev 1.00
         driver: uhub4
Controller /dev/usb5:
addr 01: 0000:0000 Generic, OHCI root hub
         full speed, self powered, config 1, rev 1.00
         driver: uhub5
Controller /dev/usb6:
addr 01: 0000:0000 Generic, OHCI root hub
         full speed, self powered, config 1, rev 1.00
         driver: uhub6
Controller /dev/usb7:
addr 01: 0000:0000 Generic, OHCI root hub
         full speed, self powered, config 1, rev 1.00
         driver: uhub7