Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp12117124rwd; Fri, 23 Jun 2023 01:23:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6cxN8d2Kt8/PeebtORihqk0t4xMTs5LI0VYOBMwQDLilybkV2FJomnrYsi89I6TQphHFqT X-Received: by 2002:a6b:a14:0:b0:777:aa2c:c2ab with SMTP id z20-20020a6b0a14000000b00777aa2cc2abmr17954332ioi.12.1687508587120; Fri, 23 Jun 2023 01:23:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687508587; cv=none; d=google.com; s=arc-20160816; b=J9GL4tUkhAYUKkX9FdaRoPtcUpquDqlysD1ZyzNT53llV4f1ZXvFE+g7GCtddd3QgA v9HKZP2hJgKZ4bjrZgpNKPPzEwUktt3kQEKTXFrOZotabx00ZY1jBlXWh05LscrWn9qE CGwskWNAswlNA9tR/Ccu9CcDfcnkwTao0vaA6unJasu8k3Ig0DRy8Vn/Plu7Q4Bf/JiX 4Fppps8Mt1kA076gfKezxaDGAYpjPkHbx3eoH8cdBWwmLc5vsRok7RgyPNf3TL1RPjwm HsxZznXFxjX6sZevZoN2/BlDoY/UPHyM+fY5R8GNM+ncTO4oJ3p/oaa48qWw8+Tq0+49 h9SQ== 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=rZkIzIzNNgKKGADWPqhaRfT1Ws52RlnQW832Y4+qRzI=; b=l05jQMRKIoLFO6uhbjMpBcbRmR3NMB4pGY432msrxtgLeKD4Wk4AnrCmRzGhydvUp8 GeSwRp6gGIcWGJcbv+VBqEIdVL+BZVuuZ7+YD4g0i0YVlUhYkcq9XuFvVCJydrpxvAp8 +b/WUkeqsAo/SmTXj+xylqJsXteq10lKNocZSIeai2hSGaDSZlt6YQnaTtbK14xIEP2u zB1o1k41RL93tSGwRVEO02TELrsX3BTQY5jAxeUW6CcVQOUkPDUbCldtonJcszG+uAkM 8osQHVrwEsYIHgIL0JTUSX+/1dUDFWssBH1sxBwz5IVI4XFGhXseg/BlUq9fDtKrxv4n gVAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="iKt/RBDc"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h193-20020a636cca000000b005030925d31asi2475228pgc.203.2023.06.23.01.22.54; Fri, 23 Jun 2023 01:23:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="iKt/RBDc"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231637AbjFWHuP (ORCPT + 99 others); Fri, 23 Jun 2023 03:50:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230474AbjFWHuO (ORCPT ); Fri, 23 Jun 2023 03:50:14 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F10A170E; Fri, 23 Jun 2023 00:50:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B5D9861986; Fri, 23 Jun 2023 07:50:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B45B8C433C8; Fri, 23 Jun 2023 07:50:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1687506612; bh=WtcyzaTUSv/WReXeRZyEpOtCLJ2gt5RNzIT8R9bpWl4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iKt/RBDcZswrLCHI1MAX8yJ/6y/JYOEGW4aWCvlOW3cn1EkERNHhazn9btlt20mWW SdtAQujujGAsZgWZ04kgW7pS4YPc0d4OTzS29oLIsSG2dAbsPEYeBSACrScHLNJeAF cubQlRI1Lll/kYMBaVXTd9yFCE80eMZbUstdRtbw= Date: Fri, 23 Jun 2023 09:50:09 +0200 From: Greg KH To: Kyle Tso Cc: heikki.krogerus@linux.intel.com, badhri@google.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] usb: typec: Set port->pd before adding device for typec_port Message-ID: <2023062330-unwoven-sizable-e17a@gregkh> References: <20230622150423.3726894-1-kyletso@google.com> <20230622150423.3726894-2-kyletso@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230622150423.3726894-2-kyletso@google.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 22, 2023 at 11:04:21PM +0800, Kyle Tso wrote: > When calling device_add in the registration of typec_port, it will do > the NULL check on usb_power_delivery handle in typec_port for the > visibility of the device attributes. It is always NULL because port->pd > is set in typec_port_set_usb_power_delivery which is later than the > device_add call. > > Set port->pd before device_add and only link the device after that. > > Fixes: a7cff92f0635 ("usb: typec: USB Power Delivery helpers for ports and partners") > Signed-off-by: Kyle Tso Shouldn't all of these also have a cc: stable@ line in them as well? thanks, greg k-h