From patchwork Thu Aug 15 08:57:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heikki Krogerus X-Patchwork-Id: 819684 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) (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 B8FE117A932 for ; Thu, 15 Aug 2024 08:57:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723712252; cv=none; b=Shgu54XnPRIXy7p6aLapbZQF0ffkBNbRORxicj6ScbovgywSD+1Vo9X2t6pHi00JtFFD5dQOWRRhpNqB8+J6MQnHwfiPtRgF2dezEJgQGOzhxMxcTD8MfjTWJ1jLuh16RsvMfn9Mae1uNwgdVwN1uXsu5tw3PDvxYJL9vKGTQBI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723712252; c=relaxed/simple; bh=XyvNZIHSzqVRCUbNIr1R7QCL340HzX8ZGKvsfnlrLhk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=LmZtw1nyZsP2rHthHrd8UqsiKlaZdAJnEHwXEUJ7fCTZyBave6qTSHiUp+e/eCRhbxkLNCeIgJrQPnA1UeWGjlEsbY6f8a1vwKLleMM0V9rYWTI9Pv7doUWPMJ7C1VNwU2z+tuMQI+uH3DKyiJ100DUfUNWW4+RyBNpsCUeYbf4= 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=lP81t6EM; arc=none smtp.client-ip=198.175.65.17 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="lP81t6EM" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1723712251; x=1755248251; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=XyvNZIHSzqVRCUbNIr1R7QCL340HzX8ZGKvsfnlrLhk=; b=lP81t6EMNgWGrCN6mk5ll5mrM9Pq8//x+xlhjJbR0j1Ilol1VusHR+6u K15BdMlsW2x4Lvn0xsogIcFz0rZTDHB/D/O/I5zjMzwRd8mYcRsLzOw0J CGu0Mgmk0Gh5+Q3yCdua79so8lZ84p/C8vH4/gIuu9YIVjsTbTTlmyH/d OVsbO4G4bCvTa6vWiS5xmQWMD44IXF7c50/gOWZqVphUtb/pw0WnCdyWz ispn/8lAcsFQmnIOcAbyvbC26hnEfq3/PGAqTttowJaL18asDiUjbAEwO 9dNCqe++XRJ806rPSBdIJoWPvASMrgRTuRor7/iZYP8EwlUVL6pnEdyiq Q==; X-CSE-ConnectionGUID: VQv4Dpn8RzCOaW/S8vLjcw== X-CSE-MsgGUID: uCS/xBfoSPaWy8nQwEok5Q== X-IronPort-AV: E=McAfee;i="6700,10204,11164"; a="22094611" X-IronPort-AV: E=Sophos;i="6.10,148,1719903600"; d="scan'208";a="22094611" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Aug 2024 01:57:30 -0700 X-CSE-ConnectionGUID: aruQRKN/S8m1PY0j41qGOA== X-CSE-MsgGUID: auLF0UhAT5SG9jnx/FCqVg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,148,1719903600"; d="scan'208";a="96816945" Received: from black.fi.intel.com (HELO black.fi.intel.com.) ([10.237.72.28]) by orviesa001.jf.intel.com with ESMTP; 15 Aug 2024 01:57:27 -0700 From: Heikki Krogerus To: Greg Kroah-Hartman Cc: Jameson Thies , Benson Leung , Prashant Malani , Dmitry Baryshkov , linux-usb@vger.kernel.org Subject: [PATCH 0/5] usb: typec: ucsi: Minor improvements Date: Thu, 15 Aug 2024 11:57:21 +0300 Message-ID: <20240815085726.2865482-1-heikki.krogerus@linux.intel.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Hi, The two first patches prevent potential issues. The rest are just cleanups - removing duplicated or otherwise useless code. James, can you test these? I'm changing the handling of the identity discovery in patch 3/5. It would be great if you (or somebody else) could confirm that it continues to work as expected. thanks, Heikki Krogerus (5): usb: typec: ucsi: Don't truncate the reads usb: typec: ucsi: Only assign the identity structure if the PPM supports it usb: typec: ucsi: Common function for the GET_PD_MESSAGE command usb: typec: ucsi: Call CANCEL from single location usb: typec: ucsi: Remove useless error check from ucsi_read_error() drivers/usb/typec/ucsi/ucsi.c | 126 ++++++++++------------------------ drivers/usb/typec/ucsi/ucsi.h | 14 +--- 2 files changed, 39 insertions(+), 101 deletions(-)