Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp645764rwd; Wed, 7 Jun 2023 05:14:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4I0MezKls5I/Vxr9zZKaCNRMob8rZuYwF8E1IPeA9WA2QPWiBcMLG+ewU7WYfdG50Pr6I2 X-Received: by 2002:a05:6a00:1820:b0:660:ec6d:56af with SMTP id y32-20020a056a00182000b00660ec6d56afmr6226721pfa.24.1686140048294; Wed, 07 Jun 2023 05:14:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686140048; cv=none; d=google.com; s=arc-20160816; b=gQXXEsxI+6eZL7EfVJfBxd3JdMLYU/oci7z4EyFCtHRasdaX6QX6SMmogTtkwrRLzV v7rafJVzDWfC6XCVe+Ng+kYp3vevER8/JipPJYxbQ8VqRnD/H04ZuT26QtK6/LCdtb5p rP745CWtIqlYsa1HIEsbhacTCQmZdHiL7oD8rPD1ShJMfa1t9PXhfCdtFZIlrhyAWFoE x0PD//8AjoXTdqHVFPTjJXAoP7sbncBeuuus/pdwiTyWPemd/a+zoWUiRfvVNR8hV7gf kJzWJBTQUKQtdfa7/W2E0JgH841Bxv4tS9cafbTd6FTbqO7+c9RGbVyGUv/VJkRsxIVH KZIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=cMpYnd8K0KUjk943ETGb3pgLuWnp+NjqkKVfYBnfUjc=; b=CXRFhEgCy/NeEhvgAY1uJdHUpUtB9018rxj1If73I1b3FOfHBuLRPn7N9Hg2NN5mzc 2WDlm7QHfWvpy6bfiqcQyP9me6kBYCjePBsZf6iHOqHtN9tqkGkgZG0/50KGtfkCVjVw l+VsKvwnvMlXT9jgs6zqkEyacT5uEYGY8APmVMQG04UfKd79cePlCUgbII/bCFxG4z2R O0hyXXj5MeUjqimy/hXMZL+kW8T9Du8LzSohy2v6Pm58KJgGalW1/QpwUDkSKIcUfdq3 ft1a8Q/+7F+cywF2kc2q9ep5H26cVjXHuibaTNPCuNBtqHv68QXgRe9oozMjwwaAvmMV ylvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TvREFw8J; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 134-20020a63028c000000b0053f3d04e66bsi8901100pgc.698.2023.06.07.05.13.51; Wed, 07 Jun 2023 05:14:08 -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=@linaro.org header.s=google header.b=TvREFw8J; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231178AbjFGLzX (ORCPT + 99 others); Wed, 7 Jun 2023 07:55:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240493AbjFGLyw (ORCPT ); Wed, 7 Jun 2023 07:54:52 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 161401BE8 for ; Wed, 7 Jun 2023 04:54:46 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-9745d99cfccso1016915666b.1 for ; Wed, 07 Jun 2023 04:54:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686138884; x=1688730884; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=cMpYnd8K0KUjk943ETGb3pgLuWnp+NjqkKVfYBnfUjc=; b=TvREFw8JmP7lNGG8Jt6YNMWuPvV8RkGsW/J3WtZVYPljX9xDYCUe1KvYqrloXDZ5+J rsISilWx+sBnTrlQQI7B3UyBlAwoNC0AljGFxfFqge5LFrrLhoqKZlWTvylcV/HJoqZy 1AtYnLkmzL1jEPoMHO7GNxWepy7jWb+1ChIQPxo0CfxWGavPiD9SsJGgawHgPqsSKFdE s+wxuEo5vqLIbBpiVEAfxtsUlsXlcsUqKJG871Jl5HOfZ6Whb/3o9dKKZ/fhrTDce4gZ GLQxUtPXsDfC0SgOnEKr7SEs9nigRj5vV6g2xXbxY14S8icYwYvSuoptjzI7E7Vu32B+ WDVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686138884; x=1688730884; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cMpYnd8K0KUjk943ETGb3pgLuWnp+NjqkKVfYBnfUjc=; b=Jh1u/QkylToAjUSH/cOPVzV2Ni5HXZvsypcvn5n/OrhH0XwetRLHW2RIqvhLDJSHjF zgT+ZtFGJiB8EI+EF/ux1dIjlw5ZYaXq/wC6wu5eUrnIOGwbpgbe7CS6wyjn/KfXywLq mvXkEsvWXPY7ObxXJrADQXwDElBk1fddBKikEo3lsVzo4oEX0VaIEMDY18C8Mb3zIhY1 0WYzcMQKPVA2xMPwW/Qjk8AZcZRbm4eFY2dRxDfYfbtGuI7AR4nJOwRWumlc9cm9/KSR JZWQdDBZ5qJgH9RZKSlqDohtddsjSs96VMxtD+WvyGAyblib5i8L9JSVpUfq7NK96Wdh qdFw== X-Gm-Message-State: AC+VfDxSw/lVzxblMBl+tA93hTGI0eQ/C+tE11uuLIb9ZCJSNSPbtluP 6lFV+uPqRJ9ZWXUBDNrx4Adedw== X-Received: by 2002:a17:906:6a1c:b0:96f:88a3:3a0e with SMTP id qw28-20020a1709066a1c00b0096f88a33a0emr6274061ejc.0.1686138884458; Wed, 07 Jun 2023 04:54:44 -0700 (PDT) Received: from [192.168.1.20] ([178.197.219.26]) by smtp.gmail.com with ESMTPSA id oz17-20020a170906cd1100b009745edfb7cbsm6802817ejb.45.2023.06.07.04.54.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Jun 2023 04:54:44 -0700 (PDT) Message-ID: <79201bd6-6048-7013-aeb7-34d218139844@linaro.org> Date: Wed, 7 Jun 2023 13:54:42 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH v3 2/5] phy: realtek: usb: Add driver for the Realtek SoC USB 2.0 PHY Content-Language: en-US To: Stanley Chang , Greg Kroah-Hartman Cc: Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alan Stern , Michael Grzeschik , Mathias Nyman , Bagas Sanjaya , Matthias Kaehlcke , Ray Chi , Flavio Suligoi , linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org References: <20230607062500.24669-1-stanley_chang@realtek.com> <20230607062500.24669-2-stanley_chang@realtek.com> From: Krzysztof Kozlowski In-Reply-To: <20230607062500.24669-2-stanley_chang@realtek.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, 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 07/06/2023 08:24, Stanley Chang wrote: > Realtek DHC (digital home center) RTD SoCs support DWC3 XHCI USB > controller. Added the driver to drive the USB 2.0 PHY transceivers. > > Signed-off-by: Stanley Chang > --- > v2 to v3 change: > 1. Broken down into two patches, one for each of USB 2 & 3 PHY. > 2. Removed parameter v1 support for simplification. > 3. Use remove_new for driver remove callback. ... > + platform_set_drvdata(pdev, rtk_phy); > + > + generic_phy = devm_phy_create(rtk_phy->dev, NULL, &ops); > + if (IS_ERR(generic_phy)) > + return PTR_ERR(generic_phy); > + > + phy_set_drvdata(generic_phy, rtk_phy); > + > + phy_provider = devm_of_phy_provider_register(rtk_phy->dev, > + of_phy_simple_xlate); > + if (IS_ERR(phy_provider)) > + return PTR_ERR(phy_provider); > + > + ret = usb_add_phy_dev(&rtk_phy->phy); > + if (ret) > + goto err; > + > + create_debug_files(rtk_phy); > + > +err: > + dev_dbg(dev, "Probe RTK USB 2.0 PHY (ret=%d)\n", ret); I commented on your second patch, but everything is applicable here as well. You have many useless debug messages. Many incorrect or useless "if() return" which point to broken driver design (e.g. concurrent access to half initialized structures where you substitute lack of synchronization with incorrect "if() return"). Undocumented user interface is one more big trouble. I doubt you run checkpatch on this (be sure to run it with --strict and fix almost everything). Best regards, Krzysztof