Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1207496rbb; Mon, 26 Feb 2024 02:05:14 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWIpFC4OtFr9h/M4GIqc4WP8iYL4xNPzjD7c4Pv1BbDdk72xtgglNj+6sATQONxakdHvoDF4T/3e61KVQ9SYo2ebs5FInuc5M+l3LvOXg== X-Google-Smtp-Source: AGHT+IF3mXP1bH9esUgfbBcx4xSlPG89KVxX03XLgraOM7GW2RqOMYLrnyDPW5jlCfzXWRNbeuOm X-Received: by 2002:a05:622a:1649:b0:42e:8523:573f with SMTP id y9-20020a05622a164900b0042e8523573fmr3304483qtj.10.1708941914599; Mon, 26 Feb 2024 02:05:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708941914; cv=pass; d=google.com; s=arc-20160816; b=Bl847v+QPYPCwtUA4jI8dIP+x1yqMofCKoBUSc7OXv93rx8glqd3s32yJzTi4YuDLM eTAuuoNwtuxyXVJYlxaE3z6JFrpPJmDFbJ/1tgo9/phsalmFRLrd7NcT7wBdkR0voCyQ OWEPfZ41Fl3QaO/30DQ3wSlK2cono1fXy++ukmecea9Q5nEn9g+7Btk/HZoGvEL7O67l VnOI/7uoJ9jDSXxnqno2/K/SLVUlU1QAkp22+PpQKQOVL6Gkvh7wwu8ax6CxpgA+8Qa4 vcdGOaLV4cxpTOaq4VxMeiMMBBZkB87TW2/B9+EsKxjaOCFijzxjD/svBy2/kdP6prL5 b8wQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=MTd6bq0yazNIPY57CJ1f+Fp/66RcMMzAZAp831EOe6Q=; fh=IgDv2fqL49gOboXXzCXMN0XID3/S4C2lxLde4mXZeek=; b=vMUTOp82aHrBT4RHjHIIf3lWas+lO6GUDaEkMnfH5lWxkxbtmWlS+4g86boG3g9rIK rbgRX5/gXdaq9hwLKmFfUsFMOhvrFvGpY9af/qpWPu0nSUUbMRkeIGDZ786PUx6B4T+n XYQto/ij/WHRnH7xu3NflDgOPsfhBmOJJQ+Q7EFm9HSj/y3Ce7lKdMCutoM9Aqq6Vhhv d3zD1xlx3EWf/OaQrXFQ6StHrGDT1GtZpHQ7LwOuihq58jMEIJ3myZSslqqd1TMBdoPc rz+kIR1Tp8eGi75ezm+ulGyUTyzbbjBlpWbR8DHcDRa3tzYm1WwO0K8kMdyxvnhyHF4b x74Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HpB7g5hz; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-80962-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80962-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id j8-20020ac86648000000b0042da7adb8aasi4692012qtp.267.2024.02.26.02.05.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 02:05:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80962-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HpB7g5hz; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-80962-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80962-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4A0081C24173 for ; Mon, 26 Feb 2024 09:29:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C29225FDD7; Mon, 26 Feb 2024 08:48:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="HpB7g5hz" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (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 6BD575FBB8; Mon, 26 Feb 2024 08:48:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708937329; cv=none; b=IfZhaiqxKqwpRsH9EVXaKLvwwPKi/Me1IDkdgDXr2LTZb0OQCsDRR80IeKkjAzZ/xxYn15KJKl68a1V7ulE6o8sC6mdEPlDxNzY7OHmMTyPU3DDRGROuH4CP6ukRl6z7YT6pv4k+SS27Bcw/+lhbF/e+H4kzp8zfDAhkD3NA3CI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708937329; c=relaxed/simple; bh=PheRjvk280i0sCgbgnxoEOvf9uZatel4oU6XXDdLpHA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kU0PNy/v1unhMh1mL2TJ41E/5htl/O4ecDZf4Z1OQODuU/1167TL55C5K5XYeF+yMJBSYUpw9Hjes5dHbNT/GqUarkEwXNZMxIfjPZ9rbRkGZ8NQe7KwoLfqGvhWaXD7etUkNuICBjs1yr7MA//sxT6/H8zZYzoxZVqhQr+3Dkw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=HpB7g5hz; arc=none smtp.client-ip=192.198.163.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708937327; x=1740473327; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=PheRjvk280i0sCgbgnxoEOvf9uZatel4oU6XXDdLpHA=; b=HpB7g5hzmezWkTBBWst1uYKy3HffB73LM+rbT4AmPcGagvA13KLdu/Eu Pj4/c/eRLqOKh9AOBEJQVRAhWi+qIQStcdfvvKgv4SjBhMpREx/TVPjH/ 7k2ORYeCMvMrS9ONWSQnXy15XbeA5lZLUup8DMNlhY1VPWuhreV2zLeEV XI+5r7fOoPulZDEQupxBYzBsE3UnECqkIwuqMJEqGmyJeaYH4fUIPsU8n a38Ia04+qzno2/oRE1IfnECnXwiyAPNLuxvRS/jxQAqTxaFo3B2LxmJmw VcjBrpoglMQ4FQZV9ymXHEm7pMVxp0m/WAUzZlHfVGPMXWTQLHNhAkNom A==; X-IronPort-AV: E=McAfee;i="6600,9927,10995"; a="6996018" X-IronPort-AV: E=Sophos;i="6.06,185,1705392000"; d="scan'208";a="6996018" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2024 00:48:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10995"; a="937029556" X-IronPort-AV: E=Sophos;i="6.06,185,1705392000"; d="scan'208";a="937029556" Received: from kuha.fi.intel.com ([10.237.72.185]) by fmsmga001.fm.intel.com with SMTP; 26 Feb 2024 00:48:42 -0800 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Mon, 26 Feb 2024 10:48:41 +0200 Date: Mon, 26 Feb 2024 10:48:41 +0200 From: Heikki Krogerus To: Jameson Thies Cc: linux-usb@vger.kernel.org, pmalani@chromium.org, bleung@google.com, abhishekpandit@chromium.org, andersson@kernel.org, dmitry.baryshkov@linaro.org, fabrice.gasnier@foss.st.com, gregkh@linuxfoundation.org, hdegoede@redhat.com, neil.armstrong@linaro.org, rajaram.regupathy@intel.com, saranya.gopal@intel.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/4] usb: typec: ucsi: Clean up UCSI_CABLE_PROP macros Message-ID: References: <20240223010328.2826774-1-jthies@google.com> <20240223010328.2826774-2-jthies@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240223010328.2826774-2-jthies@google.com> On Fri, Feb 23, 2024 at 01:03:25AM +0000, Jameson Thies wrote: > 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") > Signed-off-by: Jameson Thies This is missing CC stable. > --- > Tested by building v6.6 kernel. > > 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 7e35ffbe0a6f..469a2baf472e 100644 > --- a/drivers/usb/typec/ucsi/ucsi.h > +++ b/drivers/usb/typec/ucsi/ucsi.h > @@ -259,12 +259,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.44.0.rc0.258.g7320e95886-goog -- heikki