From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E0223BBC3; Mon, 1 Apr 2024 16:41:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711989689; cv=none; b=olgrQJ3ZerSoazQ8eBRtER5CGJDmN9nfA/hZQoB+jOVsk7ucxw276efvZ0SCnr8PdutdczV37SoiTpAG39fHHFL884gQE0YH1w5Dr5xHAk7/aFIkTHpHpaTCGMbUj1YP6N9mvv5TQOyZYCuYKozL+4owwUMTY8A7ljSHQVTu+io= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711989689; c=relaxed/simple; bh=BCmzf0xIkadibwWozY5+U09JH06/aOue3+EXVQbRk0g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=igADg8J0uaUfFFR6XZJFcWOcn0LNrZ0CME1ZuZnvPJX15M2pfoZUbhgW7PUXgGjVvZHxQD7b40X4uxaboK8Vk64/l7P48IWqyDReNXMPekGEVLbDVtcIssVeoondz+5AklcR6zabXTV7BaIu3L4ovQxC+866scA08cnhUJ69EkM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=RjVoYEcj; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="RjVoYEcj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1C0CC433C7; Mon, 1 Apr 2024 16:41:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1711989689; bh=BCmzf0xIkadibwWozY5+U09JH06/aOue3+EXVQbRk0g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RjVoYEcj7KWNwGYzPs3VOD8e4L6+bwUaCIHtJNlEORs2QPzpTf0PZq0vSgxSX9rhj 1C71u3AbvzqwdqLtrZjd9Kqwyp1dhISvIVs7dVucJSc9ItH887U2pnKdGsMmjByxbz d3DSFOC6ZXtH8R484T4XQpY9G+56m/zJMAzPaQxs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Benson Leung , Prashant Malani , Dmitry Baryshkov , Jameson Thies , Sasha Levin Subject: [PATCH 6.6 085/396] usb: typec: ucsi: Clean up UCSI_CABLE_PROP macros Date: Mon, 1 Apr 2024 17:42:14 +0200 Message-ID: <20240401152550.452292779@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240401152547.867452742@linuxfoundation.org> References: <20240401152547.867452742@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jameson Thies [ Upstream commit 4d0a5a9915793377c0fe1a8d78de6bcd92cea963 ] Clean up UCSI_CABLE_PROP macros by fixing a bitmask shifting error for plug type and updating the modal support macro for consistent naming. Fixes: 3cf657f07918 ("usb: typec: ucsi: Remove all bit-fields") Cc: stable@vger.kernel.org Reviewed-by: Benson Leung Reviewed-by: Prashant Malani Reviewed-by: Dmitry Baryshkov Signed-off-by: Jameson Thies Link: https://lore.kernel.org/r/20240305025804.1290919-2-jthies@google.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/usb/typec/ucsi/ucsi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/typec/ucsi/ucsi.h b/drivers/usb/typec/ucsi/ucsi.h index 474315a72c770..13ec976b1c747 100644 --- a/drivers/usb/typec/ucsi/ucsi.h +++ b/drivers/usb/typec/ucsi/ucsi.h @@ -221,12 +221,12 @@ struct ucsi_cable_property { #define UCSI_CABLE_PROP_FLAG_VBUS_IN_CABLE BIT(0) #define UCSI_CABLE_PROP_FLAG_ACTIVE_CABLE BIT(1) #define UCSI_CABLE_PROP_FLAG_DIRECTIONALITY BIT(2) -#define UCSI_CABLE_PROP_FLAG_PLUG_TYPE(_f_) ((_f_) & GENMASK(3, 0)) +#define UCSI_CABLE_PROP_FLAG_PLUG_TYPE(_f_) (((_f_) & GENMASK(4, 3)) >> 3) #define UCSI_CABLE_PROPERTY_PLUG_TYPE_A 0 #define UCSI_CABLE_PROPERTY_PLUG_TYPE_B 1 #define UCSI_CABLE_PROPERTY_PLUG_TYPE_C 2 #define UCSI_CABLE_PROPERTY_PLUG_OTHER 3 -#define UCSI_CABLE_PROP_MODE_SUPPORT BIT(5) +#define UCSI_CABLE_PROP_FLAG_MODE_SUPPORT BIT(5) u8 latency; } __packed; -- 2.43.0