From nobody Thu Nov 25 03:29:01 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 6A5061891080; Thu, 25 Nov 2021 03:29:02 +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 4J03JG0rdfz4TPq; Thu, 25 Nov 2021 03:29:02 +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 EC7B816394; Thu, 25 Nov 2021 03:29:01 +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 1AP3T1uY004487; Thu, 25 Nov 2021 03:29:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AP3T1bj004486; Thu, 25 Nov 2021 03:29:01 GMT (envelope-from git) Date: Thu, 25 Nov 2021 03:29:01 GMT Message-Id: <202111250329.1AP3T1bj004486@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: 61f17c5fd6cf - main - Fix "set but not used" warnings in the mpr driver. This fixes a minor bug in error handling. 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: scottl X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 61f17c5fd6cfaaf4fa9f543965997022488a29d5 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637810942; 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=dKhIHdit4gEUX1zVLh+ZE07ioAOX21B+DGfXpoyHmOo=; b=qJptnnmFw+F6jrZN1IUcLpA0y7axYpEGgm9JyYAqmmpp74Wy1TYcRuZA1nNjvuWmc4x1ab +bcyOWWkQnvkGe20YPPwXNF3mHf9hjh3K6R40RYTjpmc1y0uoryqzbLR75A2RhDiNVf22F qyqFoIhrsxoDyEJZ3OXSsmNbg8kZstZCpZNZC3/B5fMon5TxwKexNiJnjKMV7MG9EfEWf7 9Q2xj6ZzGdxxaYNETV224/jVN2r1zNi9oFr3D2ueCBx6OyHW1M6D/1otwK02G8wkU5Fvr2 gB5tkdjsBmTTxhwVK0WZpTE4M0I30bI5diG739lCZGYZxizEEckPNjen1y86WA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637810942; a=rsa-sha256; cv=none; b=nJ0e0u9uvEW0flk/BfTcgB1E8fN8SnPguf5RTkrd0n0w3s/rHgxwhPAHrt/TgXW2cG8uGu rvpfZJsTVzQq2mCIYhVRmSBYUx6K1uowPKKbpQWDaswzxI5/n4Jjzy3jOns0IDNW7ccfNP 6bnBrwOR2gI6W0dU4Q4Mt5pusZV0rrZJVHj0HFF5uUnvZy1kXWeWYpPGpOtOZu7Q+85E5N AHW1KYT2NvWToY9CEAOKIaW5s4VmheOAqWR1rqLtxKUFD/njmZ6wmMfVhstMGeNsmX0q8E RpHpdOgheYBC5GEoPj1u7QdHVGqxtFeHmJcjZrGohUgKl1VlZ+Q5bFGL7bGt0Q== 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=61f17c5fd6cfaaf4fa9f543965997022488a29d5 commit 61f17c5fd6cfaaf4fa9f543965997022488a29d5 Author: Scott Long AuthorDate: 2021-11-25 03:28:29 +0000 Commit: Scott Long CommitDate: 2021-11-25 03:28:29 +0000 Fix "set but not used" warnings in the mpr driver. This fixes a minor bug in error handling. --- sys/dev/mpr/mpr_sas.c | 7 ++----- sys/dev/mpr/mpr_sas_lsi.c | 3 --- sys/dev/mpr/mpr_table.c | 2 -- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/sys/dev/mpr/mpr_sas.c b/sys/dev/mpr/mpr_sas.c index a4872dcc769e..db5df14562e7 100644 --- a/sys/dev/mpr/mpr_sas.c +++ b/sys/dev/mpr/mpr_sas.c @@ -1229,14 +1229,12 @@ static void mprsas_logical_unit_reset_complete(struct mpr_softc *sc, struct mpr_command *tm) { MPI2_SCSI_TASK_MANAGE_REPLY *reply; - MPI2_SCSI_TASK_MANAGE_REQUEST *req; unsigned int cm_count = 0; struct mpr_command *cm; struct mprsas_target *targ; callout_stop(&tm->cm_callout); - req = (MPI2_SCSI_TASK_MANAGE_REQUEST *)tm->cm_req; reply = (MPI2_SCSI_TASK_MANAGE_REPLY *)tm->cm_reply; targ = tm->cm_targ; @@ -1839,10 +1837,11 @@ mprsas_build_nvme_unmap(struct mpr_softc *sc, struct mpr_command *cm, mpr_build_nvme_prp(sc, cm, req, (void *)(uintptr_t)nvme_dsm_ranges_dma_handle, 0, data_length); mpr_map_command(sc, cm); + res = 0; out: free(plist, M_MPR); - return 0; + return (res); } static void @@ -2919,11 +2918,9 @@ mprsas_send_smpcmd(struct mprsas_softc *sassc, union ccb *ccb, uint64_t sasaddr) uint8_t *request, *response; MPI2_SMP_PASSTHROUGH_REQUEST *req; struct mpr_softc *sc; - struct sglist *sg; int error; sc = sassc->sc; - sg = NULL; error = 0; switch (ccb->ccb_h.flags & CAM_DATA_MASK) { diff --git a/sys/dev/mpr/mpr_sas_lsi.c b/sys/dev/mpr/mpr_sas_lsi.c index 025395f6eedd..92b78c5e0d17 100644 --- a/sys/dev/mpr/mpr_sas_lsi.c +++ b/sys/dev/mpr/mpr_sas_lsi.c @@ -271,9 +271,6 @@ mprsas_fw_work(struct mpr_softc *sc, struct mpr_fw_event_work *fw_event) } case MPI2_EVENT_SAS_ENCL_DEVICE_STATUS_CHANGE: { - Mpi2EventDataSasEnclDevStatusChange_t *data; - data = (Mpi2EventDataSasEnclDevStatusChange_t *) - fw_event->event_data; mpr_mapping_enclosure_dev_status_change_event(sc, fw_event->event_data); break; diff --git a/sys/dev/mpr/mpr_table.c b/sys/dev/mpr/mpr_table.c index 719866b5fa74..7bc629be7335 100644 --- a/sys/dev/mpr/mpr_table.c +++ b/sys/dev/mpr/mpr_table.c @@ -541,12 +541,10 @@ mpr_print_sgl(struct mpr_softc *sc, struct mpr_command *cm, int offset) MPI2_IEEE_SGE_SIMPLE64 *ieee_sge; MPI25_IEEE_SGE_CHAIN64 *ieee_sgc; MPI2_SGE_SIMPLE64 *sge; - MPI2_REQUEST_HEADER *req; struct mpr_chain *chain = NULL; char *frame; u_int i = 0, flags, length; - req = (MPI2_REQUEST_HEADER *)cm->cm_req; frame = (char *)cm->cm_req; ieee_sge = (MPI2_IEEE_SGE_SIMPLE64 *)&frame[offset * 4]; sge = (MPI2_SGE_SIMPLE64 *)&frame[offset * 4];