Date: Thu, 23 May 2024 20:10:51 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 279261] i2c -sv reports stack garbage in message Message-ID: <bug-279261-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D279261 Bug ID: 279261 Summary: i2c -sv reports stack garbage in message Product: Base System Version: 15.0-CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: jfc@mit.edu Created attachment 250908 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D250908&action= =3Dedit Initialize i2c_opt.addr to 0 # i2c -sv dev: /dev/iic0, addr: 0x6cfb7d5c, r/w: r, offset: 0x00, width: 8, count: 1 Hardware may not support START/STOP scanning; trying less-reliable read met= hod. Scanning I2C devices on /dev/iic0: 11 # i2c -f /dev/iic1 -rv dev: /dev/iic1, addr: 0x1903955c, r/w: r, offset: 0x00, width: 8, count: 1 Resetting I2C controller on /dev/iic1 The address 0x6cfb7d5c or 0x1903955c is an uninitialized field in variable i2c_opt and varies from run to run. It is not actually relevant when scann= ing or resetting. The attached patch avoids printing the "dev:" line when verbose in scan or reset mode. The bus name is printed elsewhere and the rest of the fields a= re not relevant. It also initializes the address to 0 just in case it gets us= ed somehow now or in the future. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-279261-227>