From nobody Sun Apr 21 03:04:15 2024 X-Original-To: dev-commits-src-main@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 4VMYBR6Lhmz5HGpd; Sun, 21 Apr 2024 03:04:15 +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 4VMYBR5nHdz4BGJ; Sun, 21 Apr 2024 03:04:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713668655; 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=za32YJ/WgBzJoc1FugMF1QAyVnKyo5UtOQFyX4LK0zQ=; b=ocwrb3yuDS5dr7S92Ki9S9lqClOiVe7XlxRojrM9SSst3hH3kWTrX2w7D/XrpWRCfCDDPT Z/yGsBZu9B97vWFjly5nxhUTvRgnUoPebgEQzCaVPjCowm/ZSu1WD57im9z0UqUIbq/dGW 1sc2FAmOUn2y/mVVlWptGbJW8TXpTMstnwKam+IZDMjdF3yh3znBuEvdH44s9iJxJBbAAp mnc/vMrLXfTuQjTCWflGpceU56CEivL9mzQuHFxah3JPT3gr/X2y5l89ngNtNmiZCKTC/6 6F4LSKRAQwy6n1grjA1P0OZCATH2A2E6rOV85zuG26cWajIrEjLr964B8dB68Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713668655; a=rsa-sha256; cv=none; b=Vk7a8Ctkfb1W0CocGyQlXnTSYVcsQ1kzlY1EbFKYHzJv10lRFeB7OxfgieiZimT8K2ua0S CJ8m5Dxt13xGfJ51OLMlR0KA85nIMVWhXAFWKPprkWXuFQu1nChPFEUxwh7IchdZ5VQA0h HcKufDsKLhhibXi7gWTScZkSwFv7wDMOCoq0vhQp8XgCzZeb8C/e5Sho17v3XotE1JcBTK r86slqK5+2Mb6ysk9BoZvXh/oQ5m63Va/6xKsDFlrfN71gnrF/kf/BTXe9eBPzB2l+e6Yo XTP5o+IuWpZSzgoIcXnsy0PHbCWFK/vISFlYUempzrWwIvXMKXscbITBJWf4Lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713668655; 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=za32YJ/WgBzJoc1FugMF1QAyVnKyo5UtOQFyX4LK0zQ=; b=kP4MbAVdsZDQbPVUmnuAKaopIne7D+QXy1X0WXb0AdjgKDkgSZMP4nZ9GZq4pktR3Ek13S Cxriq7GJybD4iK/3vMIfpZsFExOZeGTIP4fLdr4Sr+fCGHv++D1w3UKWFRpHaKA6CQrFco uBuonChNeApok0Z7CXcGurFL7uddSDjMRSUuZr9tr/HWOBTqSB2yTNMH+NakPees3b1iD3 1EnjYKSbHH8Z1p3wDXtedj48nulD5qKZokspRs8+/oiQp9q/TKd0e9cneNYh7WyCHOzEy5 sX9mHcFpx/xMAL+Qd3J6b3T9308TGAI0iagnHwZDvFM3UfbJ4VJkF04O7vnnvg== 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 4VMYBR5Nbrz13cb; Sun, 21 Apr 2024 03:04:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43L34FfC097651; Sun, 21 Apr 2024 03:04:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43L34FfY097648; Sun, 21 Apr 2024 03:04:15 GMT (envelope-from git) Date: Sun, 21 Apr 2024 03:04:15 GMT Message-Id: <202404210304.43L34FfY097648@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: b5e0cc2fa44f - main - ahc(4): resolve some minor nits List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b5e0cc2fa44f52f16fc0b9c3f1709bc0f43fe2d0 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=b5e0cc2fa44f52f16fc0b9c3f1709bc0f43fe2d0 commit b5e0cc2fa44f52f16fc0b9c3f1709bc0f43fe2d0 Author: Kyle Evans AuthorDate: 2024-04-21 03:04:04 +0000 Commit: Kyle Evans CommitDate: 2024-04-21 03:04:04 +0000 ahc(4): resolve some minor nits In ahc_init(), qoutfifo is already assigned to effectively the same value a couple lines up, except in the first assignment it uses the proper definition; keep the more descriptive assignment. ahc_targetcmd_offset() gets the offset wrong entirely; as per the area of ahc_init() this diff also touches, targetcmds is laid out first in the shared map and it's followed by the qoutfifo. As a result, we'd generally be getting negative offsets here. We can't actually do a partial sync anyways, so there was no consequence to getting this wrong. Reviewed by: imp, mav Differential Revision: https://reviews.freebsd.org/D44859 --- sys/dev/aic7xxx/aic7xxx.c | 1 - sys/dev/aic7xxx/aic7xxx_inline.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/dev/aic7xxx/aic7xxx.c b/sys/dev/aic7xxx/aic7xxx.c index 9934fbcc41bb..4d97d8ee6367 100644 --- a/sys/dev/aic7xxx/aic7xxx.c +++ b/sys/dev/aic7xxx/aic7xxx.c @@ -4931,7 +4931,6 @@ ahc_init(struct ahc_softc *ahc) for (i = 0; i < AHC_TMODE_CMDS; i++) ahc->targetcmds[i].cmd_valid = 0; ahc_sync_tqinfifo(ahc, BUS_DMASYNC_PREREAD); - ahc->qoutfifo = (uint8_t *)&ahc->targetcmds[256]; } ahc->qinfifo = &ahc->qoutfifo[256]; diff --git a/sys/dev/aic7xxx/aic7xxx_inline.h b/sys/dev/aic7xxx/aic7xxx_inline.h index ac043ddb8bbd..6a6501b72c13 100644 --- a/sys/dev/aic7xxx/aic7xxx_inline.h +++ b/sys/dev/aic7xxx/aic7xxx_inline.h @@ -217,7 +217,7 @@ ahc_sync_sglist(struct ahc_softc *ahc, struct scb *scb, int op) static __inline uint32_t ahc_targetcmd_offset(struct ahc_softc *ahc, u_int index) { - return (((uint8_t *)&ahc->targetcmds[index]) - ahc->qoutfifo); + return (((uint8_t *)&ahc->targetcmds[index]) - (uint8_t *)ahc->targetcmds); } /******************************** Debugging ***********************************/