From nobody Fri Dec 10 12:31:27 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CD9F418D191F; Fri, 10 Dec 2021 12:31:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J9VdD5j15z3slD; Fri, 10 Dec 2021 12:31:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5DFF71A7A5; Fri, 10 Dec 2021 12:31:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BACVRp6066164; Fri, 10 Dec 2021 12:31:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BACVREt066163; Fri, 10 Dec 2021 12:31:27 GMT (envelope-from git) Date: Fri, 10 Dec 2021 12:31:27 GMT Message-Id: <202112101231.1BACVREt066163@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: 035813ba1554 - stable/12 - twsi: improve a handful of debug messages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 035813ba15545b7d77429427823d2fb603d83a23 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639139489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/bIeadlBHrHqZridS1EVQJEc2TgheEi/La0Zt+t2id0=; b=q+VEjQBEgW0/K78vHvyhSvU6RXeUsNgSvN0kzYJUbX2X6x2pmJrO7zKx6NxyXFxrLQTLUR 6P3TdeAVIhpkEAlNgUvOhm9dAlCmNANRTuKfbDEmWlbXEHL+93pLZZMnhqG0D6mLvxUoEr u8hkD25Ig70c7WMpN9y38XiWqP2b03doXlY/8P5tPf9epBjCdcU/aJ4IaKIxoN1wtWKFGY uH3RVGjqNm+FSFmpJODNH5PH0ZaEimUMiDMOWJqd4sWd0BTqvg+xWDyDFaQr40H6dR6LN7 6X1FP8YZOMJwTjwcBYYK3pIm63WdUX6TA3RHEE8igrcbnsx6Vy63NpaZwv92Gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639139489; a=rsa-sha256; cv=none; b=qgAJ0NdAfzX7X5wZ+YFkmeurDLxBjt9O8nR2yDy6i/ac4JlNMU60fphQ6J8TYaxfGaeFNM +KRZwhAQ4yoyt/N6Xph8Rn+Rx8dN475SR3tK48i0vR2ABLzME66av7AcwzReGE0C3munfM jwa5yyF6xpd/TZtslxxxR6plKNDg3cnmA5DNt/pMT3f7GrWsX4lTxegIx8x+on3qKI6Zem xaKz5DYPrvFiwDAC/0odZEYFEY407gX+6DZP0Au97thm7joyyoeSZPF4v0VeUlQyIGwdAt 10b/ZaBDCjlsFyprwVsUIj8/0tcqxIhWvJYl3dHnXDN9vWwPLcfEQ/sI5Uh3tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=035813ba15545b7d77429427823d2fb603d83a23 commit 035813ba15545b7d77429427823d2fb603d83a23 Author: Andriy Gapon AuthorDate: 2021-11-26 07:34:28 +0000 Commit: Andriy Gapon CommitDate: 2021-12-10 12:30:54 +0000 twsi: improve a handful of debug messages - use 0x prefix for hex values - print indexes and counts as decimals - break too long lines (cherry picked from commit 578707ed4efda4ec1c91ab1a8f1bace6b1eb714a) --- sys/dev/iicbus/twsi/twsi.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/dev/iicbus/twsi/twsi.c b/sys/dev/iicbus/twsi/twsi.c index 5e899313ac45..384e19e120b9 100644 --- a/sys/dev/iicbus/twsi/twsi.c +++ b/sys/dev/iicbus/twsi/twsi.c @@ -534,9 +534,9 @@ twsi_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) debugf(sc, "Error: %d\n", sc->error); /* Disable module and interrupts */ - debugf(sc, "status=%x\n", TWSI_READ(sc, sc->reg_status)); + debugf(sc, "status=0x%x\n", TWSI_READ(sc, sc->reg_status)); TWSI_WRITE(sc, sc->reg_control, 0); - debugf(sc, "status=%x\n", TWSI_READ(sc, sc->reg_status)); + debugf(sc, "status=0x%x\n", TWSI_READ(sc, sc->reg_status)); error = sc->error; mtx_unlock(&sc->mutex); @@ -553,10 +553,11 @@ twsi_intr(void *arg) sc = arg; mtx_lock(&sc->mutex); - debugf(sc, "Got interrupt Current msg=%x\n", sc->msg_idx); + debugf(sc, "Got interrupt, current msg=%u\n", sc->msg_idx); status = TWSI_READ(sc, sc->reg_status); - debugf(sc, "reg control=%x\n", TWSI_READ(sc, sc->reg_control)); + debugf(sc, "reg control = 0x%x, status = 0x%x\n", + TWSI_READ(sc, sc->reg_control), status); if (sc->transfer == 0) { device_printf(sc->dev, "interrupt without active transfer, " @@ -570,7 +571,8 @@ twsi_intr(void *arg) case TWSI_STATUS_START: case TWSI_STATUS_RPTD_START: /* Transmit the address */ - debugf(sc, "Send the address (%x)", sc->msgs[sc->msg_idx].slave); + debugf(sc, "Send address 0x%x\n", + sc->msgs[sc->msg_idx].slave); if (sc->msgs[sc->msg_idx].flags & IIC_M_RD) TWSI_WRITE(sc, sc->reg_data,