From nobody Thu Jan 06 19:10:36 2022 X-Original-To: dev-commits-src-branches@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 A9B501945C14; Thu, 6 Jan 2022 19:10:37 +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 4JVGCK0RMrz4mQf; Thu, 6 Jan 2022 19:10:37 +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 E3498252E8; Thu, 6 Jan 2022 19:10:36 +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 206JAaOA062973; Thu, 6 Jan 2022 19:10:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 206JAaWO062972; Thu, 6 Jan 2022 19:10:36 GMT (envelope-from git) Date: Thu, 6 Jan 2022 19:10:36 GMT Message-Id: <202201061910.206JAaWO062972@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: ea4e9becc788 - stable/13 - Fix "set but not used" warnings in the mpr driver. This fixes a minor bug in error handling. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ea4e9becc788aaca1a09614631409a2b5970af03 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641496237; 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=xOKdcFMO+FqDgKqgzAPkM+bM80Xo0YVWpM0GjQrXncE=; b=hZEAPSs00r1BjZJ5wAix3oXYwyq2ASQuZpNWCcZi9+twStlLacSDZ+g6qaCa3QSWBjLPSt 4DvEOObxWJ4obpItnTGY80aRL0J9WKArMj7Ye9wRh5WUlp3HnbJf/FdD2/KCGUKaskAcqo msjsKeFRe4rv3VOMvfaFM3w7yjEiuOxUL/CyRhw9EHSbMjd+gKmg0941+DV6hh1037YkAF +P29mjAlf5HGWwaj0br8c+j+Bvz1FiuKnAqC1KtknS4csCeX9agvjxDXIupBGjdRheOoWF S3Lp2xfa4lQgIDjBGI7pUwHGk0+hc7ZL3EPK0RVRLaW1wHj1wYOj0Z2qk9BLeg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641496237; a=rsa-sha256; cv=none; b=XAj4XHtrKuzt1slS7akDO1Vrg/FqzRU57jw7wC3DTRnpyjOM4OgJ9T/CtpBI4C30urdhIS PdDOrtjAP9vIr3cazGsxLDkOBO6xOHuhXxd5XM8qxw4+EZlKsbSfS5EdrJoBD88Nnvhx8/ PUUrF2LSD3eRXkBgHHBhl9/IGPBVztNNStNGUij9UzLh7R3DRGgUlTPDzr6ApiBCRkogZG RFK0SnzI0110hwhz9Dg/GoZDeDvTbosqIj9LyAHydZq8ucjleCDF8xr8XPGH3I0Xl9ZTHm w+hbYfPhCg/TEexMfDdQ0ntfJPaV8LrH/zCKqyyDoTzY6kmOrkYstZ9B30VAuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=ea4e9becc788aaca1a09614631409a2b5970af03 commit ea4e9becc788aaca1a09614631409a2b5970af03 Author: Scott Long AuthorDate: 2021-11-25 03:28:29 +0000 Commit: Alexander Motin CommitDate: 2022-01-06 19:08:50 +0000 Fix "set but not used" warnings in the mpr driver. This fixes a minor bug in error handling. (cherry picked from commit 61f17c5fd6cfaaf4fa9f543965997022488a29d5) --- 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 f0e05f9c886f..9f934e19e763 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];