From nobody Thu Nov 25 02:42:34 2021 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 0F2EE1898513; Thu, 25 Nov 2021 02:42:35 +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 4J02Gf54t1z3kCt; Thu, 25 Nov 2021 02:42:34 +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 83B9315842; Thu, 25 Nov 2021 02:42:34 +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 1AP2gYTe049504; Thu, 25 Nov 2021 02:42:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AP2gYS6049503; Thu, 25 Nov 2021 02:42:34 GMT (envelope-from git) Date: Thu, 25 Nov 2021 02:42:34 GMT Message-Id: <202111250242.1AP2gYS6049503@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Scott Long Subject: git: 6ef1ad0dcfe8 - main - Fix "set but not used" warnings in mfi. The one in mfi.c:mfi_data_cb() was a hidden but likely harmless mistake. The rest were just old code that was OBE. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: scottl X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6ef1ad0dcfe8b0a0d95a571652d8c7183aa6a4e3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637808154; 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=CxDw5BKP3zT8SYJVNus4/6Mf9fG1Qhxl/BXlk2h/dvI=; b=XIOvunFev32HwNIwzM2cW5d2sfM3CPr8Tw98wK5R5O6Aw2XKQVetcBeS5FbN1fCxkp+VH5 r0Ym6yibyzjYSZhz/JoytW3uQARmsu5zhNiUg1IpIONa8Is/256JGUMeZxyeCFAx20+mX5 6WLYb73y48o6J+aZR5n7lWOSxxs3suUxpiIyZzzBfqLt/v/NUHdk2d78+iPXXff3QDDgeJ UFOzj8bTmWFpDpr8SQbdRLj3/0O5Qn2N1ZHKN9NHk1QBmSjDOrBi6Yop/uG2RUbq/D+pAz igVVaXgRvsz0YWLlgthIuHyGDXyP7fxN8QALqQRYcBS7023enK9A1TuNU0A6Ww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637808154; a=rsa-sha256; cv=none; b=wB6MCQP0BNLLT/jnz6o9BeQG0MfYkiZ3xzVEJ/dq5suvdc8qAMgibE5q6AcQoJ9DmEkV5y CflI081FYv0UhhCf81SgSX5veVc/Ow+NhE0DCKVf/l1DSF8LsgbAD32kiNO88S0qAQ/dgu rl+MgJhWRHEkxUYybC6KedvgrhidR66GN8NuPOxj4KqUkKP09hbc9WVVEWhAa79e5+6mZy FXBagbMNiiNQLAtGO+gynIP5CTN7qj14ODqgMBwgZ7gkNXwEZU3EWlKRXQW8urU7taLqb4 ErxbbjMiJxBzMhAqCUmRqeLIonKAf/jM5lVGJKCikBwwDXWW5j3h/EzS3p12hQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by scottl: URL: https://cgit.FreeBSD.org/src/commit/?id=6ef1ad0dcfe8b0a0d95a571652d8c7183aa6a4e3 commit 6ef1ad0dcfe8b0a0d95a571652d8c7183aa6a4e3 Author: Scott Long AuthorDate: 2021-11-25 02:41:18 +0000 Commit: Scott Long CommitDate: 2021-11-25 02:41:18 +0000 Fix "set but not used" warnings in mfi. The one in mfi.c:mfi_data_cb() was a hidden but likely harmless mistake. The rest were just old code that was OBE. --- sys/dev/mfi/mfi.c | 4 +--- sys/dev/mfi/mfi_cam.c | 2 -- sys/dev/mfi/mfi_disk.c | 5 ----- sys/dev/mfi/mfi_tbolt.c | 8 ++------ 4 files changed, 3 insertions(+), 16 deletions(-) diff --git a/sys/dev/mfi/mfi.c b/sys/dev/mfi/mfi.c index 981f5a2673e5..0cf0bdb478af 100644 --- a/sys/dev/mfi/mfi.c +++ b/sys/dev/mfi/mfi.c @@ -2433,7 +2433,7 @@ mfi_data_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) * least 1 frame, so don't compensate for the modulo of the * following division. */ - cm->cm_total_frame_size += (sc->mfi_sge_size * nsegs); + cm->cm_total_frame_size += (sge_size * nsegs); cm->cm_extra_frames = (cm->cm_total_frame_size - 1) / MFI_FRAME_SIZE; if ((error = mfi_send_frame(sc, cm)) != 0) { @@ -3108,7 +3108,6 @@ mfi_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td struct mfi_ioc_passthru iop_swab; #endif int error, locked; - union mfi_sgl *sgl; sc = dev->si_drv1; error = 0; @@ -3200,7 +3199,6 @@ mfi_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td cm->cm_sg = (union mfi_sgl *)&cm->cm_frame->bytes[ioc->mfi_sgl_off]; } - sgl = cm->cm_sg; cm->cm_flags = 0; if (cm->cm_frame->header.flags & MFI_FRAME_DATAIN) cm->cm_flags |= MFI_CMD_DATAIN; diff --git a/sys/dev/mfi/mfi_cam.c b/sys/dev/mfi/mfi_cam.c index 2ea27527e158..431dc7b4c129 100644 --- a/sys/dev/mfi/mfi_cam.c +++ b/sys/dev/mfi/mfi_cam.c @@ -406,10 +406,8 @@ mfip_done(struct mfi_command *cm) union ccb *ccb = cm->cm_private; struct ccb_hdr *ccbh = &ccb->ccb_h; struct ccb_scsiio *csio = &ccb->csio; - struct mfip_softc *sc; struct mfi_pass_frame *pt; - sc = ccbh->ccb_mfip_ptr; pt = &cm->cm_frame->pass; switch (pt->header.cmd_status) { diff --git a/sys/dev/mfi/mfi_disk.c b/sys/dev/mfi/mfi_disk.c index 016d3f99e9ad..e1f1420d5676 100644 --- a/sys/dev/mfi/mfi_disk.c +++ b/sys/dev/mfi/mfi_disk.c @@ -304,11 +304,6 @@ mfi_disk_strategy(struct bio *bio) void mfi_disk_complete(struct bio *bio) { - struct mfi_disk *sc; - struct mfi_frame_header *hdr; - - sc = bio->bio_disk->d_drv1; - hdr = bio->bio_driver1; if (bio->bio_flags & BIO_ERROR) { bio->bio_resid = bio->bio_bcount; diff --git a/sys/dev/mfi/mfi_tbolt.c b/sys/dev/mfi/mfi_tbolt.c index f9eaf16912c3..0d2088f3a0a7 100644 --- a/sys/dev/mfi/mfi_tbolt.c +++ b/sys/dev/mfi/mfi_tbolt.c @@ -660,7 +660,6 @@ mfi_tbolt_complete_cmd(struct mfi_softc *sc) struct mfi_cmd_tbolt *cmd_tbolt; uint16_t smid; uint8_t reply_descript_type; - struct mfi_mpi2_request_raid_scsi_io *scsi_io_req; uint32_t status, extStatus; uint16_t num_completed; union desc_value val; @@ -700,7 +699,6 @@ mfi_tbolt_complete_cmd(struct mfi_softc *sc) goto next; } cmd_mfi = &sc->mfi_commands[cmd_tbolt->sync_cmd_idx]; - scsi_io_req = cmd_tbolt->io_request; status = cmd_mfi->cm_frame->dcmd.header.cmd_status; extStatus = cmd_mfi->cm_frame->dcmd.header.scsi_status; @@ -939,7 +937,7 @@ static int mfi_tbolt_make_sgl(struct mfi_softc *sc, struct mfi_command *mfi_cmd, pMpi25IeeeSgeChain64_t sgl_ptr, struct mfi_cmd_tbolt *cmd) { - uint8_t i, sg_processed, sg_to_process; + uint8_t i, sg_processed; uint8_t sge_count, sge_idx; union mfi_sgl *os_sgl; pMpi25IeeeSgeChain64_t sgl_end; @@ -997,7 +995,7 @@ mfi_tbolt_make_sgl(struct mfi_softc *sc, struct mfi_command *mfi_cmd, if (sg_processed < sge_count) { pMpi25IeeeSgeChain64_t sg_chain; - sg_to_process = sge_count - sg_processed; + cmd->io_request->ChainOffset = sc->chain_offset_value_for_main_message; sg_chain = sgl_ptr; @@ -1086,12 +1084,10 @@ int mfi_tbolt_send_frame(struct mfi_softc *sc, struct mfi_command *cm) { struct mfi_frame_header *hdr; - uint8_t *cdb; union mfi_mpi2_request_descriptor *req_desc = NULL; int tm = mfi_polled_cmd_timeout * 1000; hdr = &cm->cm_frame->header; - cdb = cm->cm_frame->pass.cdb; if (sc->adpreset) return 1; if ((cm->cm_flags & MFI_CMD_POLLED) == 0) {