From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33ED9C433DB for ; Fri, 12 Mar 2021 12:51:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D501B64FE0 for ; Fri, 12 Mar 2021 12:51:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231555AbhCLMul (ORCPT ); Fri, 12 Mar 2021 07:50:41 -0500 Received: from honk.sigxcpu.org ([24.134.29.49]:33050 "EHLO honk.sigxcpu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229866AbhCLMuj (ORCPT ); Fri, 12 Mar 2021 07:50:39 -0500 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id EC153FB03; Fri, 12 Mar 2021 13:50:36 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at honk.sigxcpu.org Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FiOlfnBrBDy9; Fri, 12 Mar 2021 13:50:35 +0100 (CET) Date: Fri, 12 Mar 2021 13:50:34 +0100 From: Guido =?iso-8859-1?Q?G=FCnther?= To: Elias Rudberg Cc: heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org Subject: Re: [PATCH] usb: typec: Remove vdo[3] part of tps6598x_rx_identity_reg struct Message-ID: References: <20210311124710.6563-1-mail@eliasrudberg.se> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210311124710.6563-1-mail@eliasrudberg.se> Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Hi, On Thu, Mar 11, 2021 at 01:47:10PM +0100, Elias Rudberg wrote: > Remove the unused "u32 vdo[3]" part in the tps6598x_rx_identity_reg > struct. This helps avoid "failed to register partner" errors which > happen when tps6598x_read_partner_identity() fails because the > amount of data read is 12 bytes smaller than the struct size. > Note that vdo[3] is already in usb_pd_identity and hence > shouldn't be added to tps6598x_rx_identity_reg as well. > > Fixes: f6c56ca91b92 ("usb: typec: Add the Product Type VDOs to struct usb_pd_identity") > > Signed-off-by: Elias Rudberg > --- > drivers/usb/typec/tps6598x.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/usb/typec/tps6598x.c b/drivers/usb/typec/tps6598x.c > index 6e6ef6317523..29bd1c5a283c 100644 > --- a/drivers/usb/typec/tps6598x.c > +++ b/drivers/usb/typec/tps6598x.c > @@ -64,7 +64,6 @@ enum { > struct tps6598x_rx_identity_reg { > u8 status; > struct usb_pd_identity identity; > - u32 vdo[3]; > } __packed; > > /* Standard Task return codes */ Reviewed-by: Guido Günther Cheers, -- Guido > -- > 2.25.1 >