From nobody Wed Sep 25 14:20:45 2024 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 4XDJmY1zZwz5XWxs; Wed, 25 Sep 2024 14:20:45 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XDJmY1R4Rz4F55; Wed, 25 Sep 2024 14:20:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727274045; 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=r5QEKVgNx+J6mLfrp6/NIGFKc0It8pK7TincangCw2g=; b=EE/722fmD5s1jEwJHO8cwUvYD9TwjJGPvx8uGVJGb4h+UUx/E8VLODpi+ez/XKgsf30DEY H6tgT7fg85JCfC1oGP7anO5BCEjxUUui7pFtL6bFGbvQP3NYNGYkRNx79xHXmNRvizJzVd HwyFmZs+Mx/DUjeM5l9jHwSpPK46XJZKOM6ooB+DVPBPyOIC8LohqFXb093o6F9/OzU12D nhopQsHL7AZZc1GVhvA1Chq4xoGBHvHJdqOqodizr/uEkcYxw1gCIR8Zognp5xLf7kDqIl ERJTh+baGSwQSZ23Mxl0/cXqlbdf8uALCkMZDqONwY6pd/W7/0N+UAQHVTEqAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727274045; 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=r5QEKVgNx+J6mLfrp6/NIGFKc0It8pK7TincangCw2g=; b=EDVhhIFJoGtp6YtedARJn8ij0x4chQ/tTcvyaGk4P4BxnAQ2z3KMrqvJkuVTpQBg5Wn83H mErpoIvU5AtrOEJmudgKwUmTEgnjg8+Xb8B4mwray2Y8hAODoLB2rmwm5e2+r0n+EyDkGU hKbD5Nc/oDbeDtVWRGr/XJZDTodb1VYFb3zbmGxcFcfa5e5fdy7Y7RjIlpj6mJF3cye712 1VZurtFEBP8ZCygKryl9i8urHf2GpRVVri4aDyvafD/oePeAkOKZYsRWZ31CGpAwNAskzt kry0Im7B9FahMA02wFXDxSdNAhIM+SAhTo6JXAqP2ZbQG8H77ey1T5G4K4q1Pg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727274045; a=rsa-sha256; cv=none; b=MqTHN5u8yeNttZXvVTQqYnNbNzqmKmKy2CdSoEcuxnhO4Hj2WK+f4DLJtW9oMmlzHP069y y0xulKBsVDg7z9BUnxg/lcWoS11oy16QBDtaedKmW/bsxF1JjVX4ksPjI47M2lh7fZi21M Q7T7bLUiVscswq+fmvx9n1fAslxPFr8nmSXNC5S4nDirqVcpl/JEpTOOjkmGwp0dwSOa61 GaksJ7sotRZ4wXGDzFHbz33SBTBXYLzY+kapNMEhkiRO2Gk28ccnzxMWfmWgQBktz5uokT al6cF+k4G/J5e7hQHQUeGYhioCeyRL+8JonrUSbwo+GLfeWz/rjn11TA8DE+Pg== 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 4XDJmY0vngzGFF; Wed, 25 Sep 2024 14:20:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48PEKjdH052607; Wed, 25 Sep 2024 14:20:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48PEKj7i052604; Wed, 25 Sep 2024 14:20:45 GMT (envelope-from git) Date: Wed, 25 Sep 2024 14:20:45 GMT Message-Id: <202409251420.48PEKj7i052604@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 0063ef79f9e6 - main - ctl_report_supported_opcodes: Rename invalid label to invalid_options 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0063ef79f9e6b9ad47969af3b94ae63e7888852c Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0063ef79f9e6b9ad47969af3b94ae63e7888852c commit 0063ef79f9e6b9ad47969af3b94ae63e7888852c Author: John Baldwin AuthorDate: 2024-09-25 14:20:22 +0000 Commit: John Baldwin CommitDate: 2024-09-25 14:20:22 +0000 ctl_report_supported_opcodes: Rename invalid label to invalid_options This error handling is specific to an invalid value in the REPORTING OPTIONS field of a REPORT SUPPORTED OPERATION CODES command. While here, reuse the label for another case. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D46775 --- sys/cam/ctl/ctl.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index 1505e0886f57..b1367cd79fab 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -7456,33 +7456,26 @@ ctl_report_supported_opcodes(struct ctl_scsiio *ctsio) break; case RSO_OPTIONS_OC: if (ctl_cmd_table[opcode].flags & CTL_CMD_FLAG_SA5) { - ctl_set_invalid_field(/*ctsio*/ ctsio, - /*sks_valid*/ 1, - /*command*/ 1, - /*field*/ 2, - /*bit_valid*/ 1, - /*bit*/ 2); - ctl_done((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); + goto invalid_options; } total_len = sizeof(struct scsi_report_supported_opcodes_one) + 32; break; case RSO_OPTIONS_OC_SA: if ((ctl_cmd_table[opcode].flags & CTL_CMD_FLAG_SA5) == 0 || service_action >= 32) { - goto invalid; + goto invalid_options; } total_len = sizeof(struct scsi_report_supported_opcodes_one) + 32; break; case RSO_OPTIONS_OC_ASA: if ((ctl_cmd_table[opcode].flags & CTL_CMD_FLAG_SA5) != 0 && service_action >= 32) { - goto invalid; + goto invalid_options; } total_len = sizeof(struct scsi_report_supported_opcodes_one) + 32; break; default: -invalid: +invalid_options: ctl_set_invalid_field(/*ctsio*/ ctsio, /*sks_valid*/ 1, /*command*/ 1,