Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3679469rdh; Tue, 28 Nov 2023 00:13:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IHUEeVUCrv/jWocoQWNhZk9DF334cBR2JOtwk8IJX/NDqM6XseQeCbYDkNVb8O1fwEiiHFt X-Received: by 2002:a05:6a20:12c7:b0:187:4329:f06d with SMTP id v7-20020a056a2012c700b001874329f06dmr21906608pzg.31.1701159207710; Tue, 28 Nov 2023 00:13:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701159207; cv=none; d=google.com; s=arc-20160816; b=YEvsIoC4BPleaXp9xPM4duhBw6kdBl+1HrmdRNXyZQuIeuTwIN20XDMRzagP5G6A74 MV6h9ADu2gfoCdwgQBP6CymrB4MMdLaD26BQ5Nf8D78bHM8E1EcKPfJmmUskvAOBPcjA 1tyr08vi4guvVRZ+NDI6m6MuDmFa2M4fpHpBDMT2bcvZlEzdcRaVUSKWrzq/8NWwtrAZ tHyALgqsG7Kd3IDk/xz4AQI/jXkpxnZp+17iEZDJgh4zpdWCCvtAT6Q6I7zaEiyDTG6f y5ujLmuDeL67zAgmAWeqzMVABkrNaDeENwI1Xi5zwTEv41YaNlIVy/Y4Gwa4iBwTi8KS 8kxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=zpwm000QAOoZSUQCBzRlpk9Gd8KwiRUntvgfBwUKof0=; fh=KxDXAO3vWDCMI+0gySJ+PZ+FMXYSmms2fDAJp26UNTA=; b=rXrIrY1geaMbBZ5jdhJzg1LplsnoAiDiqXiCzd2pMXj9oNkiRSTEFV7hGenRBRVU7Q EMzYRcRszqca9rQroRCCVX1Ym7bAKvyr96a6P47GdbCcgvG4jzu7XaHFLXT2uEwihP8x 0QJ3Y1UuZ6S1BgnJgMfamB4+dQh9YORNsOvdito7vTJFQ+flv0DXrjXvjdQtdJPEGSRB cC8Y4JV+wIlW2+5TPobFSEfEdneQSqT8ZtVjNk9aNqgwwcdZr72wejO0d26dsm198npS +oqnwl+8NaWd8LJLbvTPz92PjyI8vkdz5PW48iNF9XoqzOp/YvXyillm9g3rRQ6B4gZo hqBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wZg5YV72; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id a7-20020a63d207000000b005b8f24e6525si11380695pgg.81.2023.11.28.00.13.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 00:13:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wZg5YV72; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 6295B80A6BEC; Tue, 28 Nov 2023 00:13:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344031AbjK1ING (ORCPT + 99 others); Tue, 28 Nov 2023 03:13:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233910AbjK1INF (ORCPT ); Tue, 28 Nov 2023 03:13:05 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70846C1 for ; Tue, 28 Nov 2023 00:07:40 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC038C433C7; Tue, 28 Nov 2023 08:07:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1701158860; bh=0t+O+30Xv5t/NqO26Aolg8thAtJ3OrzSz6sxE+kDq18=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wZg5YV72F+D/Yaov5ZJtMMfrCI70bcfZPYtVG97UzrnZqGNDp5215cHjUEsns6TfA wMFUIMh5+jZs87WA8JtzUItRNXkkAY9HaVB0jMgK/0s+35aFzkfUfK4jFeyAfmMwH9 P4vmeKXZpOSljde8EvefzsR4IzXBlEwRlKwCVjs8= Date: Tue, 28 Nov 2023 08:07:37 +0000 From: Greg KH To: RD Babiera Cc: heikki.krogerus@linux.intel.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, badhri@google.com, stable@vger.kernel.org Subject: Re: [PATCH v2] usb: typec: class: fix typec_altmode_put_partner to put plugs Message-ID: <2023112847-verdict-percent-71b3@gregkh> References: <20231127210951.730114-2-rdbabiera@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231127210951.730114-2-rdbabiera@google.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 28 Nov 2023 00:13:25 -0800 (PST) On Mon, Nov 27, 2023 at 09:09:52PM +0000, RD Babiera wrote: > When typec_altmode_put_partner is called by a plug altmode upon release, > the port altmode the plug belongs to will not remove its reference to the > plug. The check to see if the altmode being released evaluates against the > released altmode's partner instead of the calling altmode itself, so change > adev in typec_altmode_put_partner to properly refer to the altmode being > released. > > typec_altmode_set_partner is not run for port altmodes, so also add a check > in typec_altmode_release to prevent typec_altmode_put_partner() calls on > port altmode release. > > --- > Changes since v1: > * Changed commit message for clarity > * Added check to typec_altmode_release to only call put_partner if altmode > belongs to port partner or plug > --- This info all goes below the following lines: > > Fixes: 8a37d87d72f0 ("usb: typec: Bus type for alternate modes") > Cc: stable@vger.kernel.org > Signed-off-by: RD Babiera > --- Down here, otherwise if you try to apply this patch, your signed-off-by lines are removed from the patch, right? As-is, this can not be applied at all :( Please fix up, thanks. greg k-h