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 A11582DF73; Mon, 8 Apr 2024 13:04:52 +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=1712581492; cv=none; b=SEWer4N1Z2Yz84WB6UbwoVSH5cZ52QWEK5f0ln1gEu6IMKrSjnrfoYxgvmZvZS9BJyr83lCOfzW3jv88QTmetmqscBdTzw8Mof4qoKLjfUAHTaw1LgUUqg4GlQarN8Gt73Qdwj5uRhsvtBvz8q1OyN5JywIWaKeo4w3AkagjyJA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712581492; c=relaxed/simple; bh=4ztLEga/GUQA/wpWO29x0g4Uz/wcESVVt6gPb6o9RCs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YnWroXu2YRzEEC4PzIRRsXnRxxuXebkuTzs4Ok36Coe2BB7/BFKuRI8zmPuIMnimcXMMdbkztieFQXP9aZstKyhe4RrsUOfF8h42AOfJg6DaykYV984fnjvwXTG8qSsdRUFlu3/9k2duRvfRrB5ZyAcEahZrsE9jd5qoBYaXFBY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=m6h9LYBb; 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="m6h9LYBb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6226C433F1; Mon, 8 Apr 2024 13:04:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712581492; bh=4ztLEga/GUQA/wpWO29x0g4Uz/wcESVVt6gPb6o9RCs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m6h9LYBb2i3EQc07+QQivLRpKPG9OBNsSYGkEsdkzaGWaBqDc615Yes9AAS2y3LeD FsbmvpG+xOF6N0DBB6OTtjjxSa9YsRQP4ksxJCBhqQIOGMVh2a1oepaQTidJY6HlJ2 2OvwXoFyQcJZjifOTKCcoZ6dSrqlJRrdEzBF+XeM= 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 5.15 056/690] usb: typec: ucsi: Clean up UCSI_CABLE_PROP macros Date: Mon, 8 Apr 2024 14:48:42 +0200 Message-ID: <20240408125401.548368618@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240408125359.506372836@linuxfoundation.org> References: <20240408125359.506372836@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 5.15-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 cee666790907e..3dc3da8dbbdf8 100644 --- a/drivers/usb/typec/ucsi/ucsi.h +++ b/drivers/usb/typec/ucsi/ucsi.h @@ -220,12 +220,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