From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751047AbcFVVyr (ORCPT ); Wed, 22 Jun 2016 17:54:47 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:54979 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750718AbcFVVyq (ORCPT ); Wed, 22 Jun 2016 17:54:46 -0400 Date: Wed, 22 Jun 2016 14:54:28 -0700 From: Guenter Roeck To: Heikki Krogerus Cc: Greg KH , Oliver Neukum , Felipe Balbi , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [PATCHv3 1/2] usb: USB Type-C connector class Message-ID: <20160622215428.GA15297@roeck-us.net> References: <1466520711-125758-1-git-send-email-heikki.krogerus@linux.intel.com> <1466520711-125758-2-git-send-email-heikki.krogerus@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1466520711-125758-2-git-send-email-heikki.krogerus@linux.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Tue, Jun 21, 2016 at 05:51:50PM +0300, Heikki Krogerus wrote: > The purpose of USB Type-C connector class is to provide > unified interface for the user space to get the status and > basic information about USB Type-C connectors on a system, > control over data role swapping, and when USB PD is > available, also control over power role swapping and > Alternate Modes. > > Signed-off-by: Heikki Krogerus > --- [ ... ] > + > +static void typec_remove_partner(struct typec_port *port) > +{ > + WARN_ON(port->partner->alt_modes); You are setting partner->alt_modes in typec_register_altmodes(), but you don't clear it in typec_unregister_altmodes(). Does this work for you ? I always get the warning when I remove a cable. Thanks, Guenter