From patchwork Fri Nov 11 09:42:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 18628 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp644527wru; Fri, 11 Nov 2022 01:48:24 -0800 (PST) X-Google-Smtp-Source: AA0mqf7dzTAowfLHeIeAfFGzrHv6NjyMWSN0fdJNcu7nGZlbNSdqZKXo/TCKEy0TIxqKO0iX3hbs X-Received: by 2002:a05:6402:4006:b0:461:59fc:f670 with SMTP id d6-20020a056402400600b0046159fcf670mr772397eda.88.1668160104451; Fri, 11 Nov 2022 01:48:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668160104; cv=none; d=google.com; s=arc-20160816; b=j0kZFi/vaTSZ8R9dXyATyYq0yR8E3/TLHRHHJHr7vVmZl9aId0oJHBhvJXGn97Ipsg NrNLDfb8nUlzLpAwQBCJUTxXkKxf4h8PUWaP2TGCD+OwW3my6omORpdeFxJYb3OrSZcM YsjTp8rExuq+cFycggmrCmZ4miF4cFiUe6v5FrvavqkGEgpIVRdS5O9wf8jeHdStoW3f yTS9XUQiaz1FDBfqb0N/Nv7jsqkvTRJJTchK+T+iLYoWXugiTwif3d4AJRxoOlGusaYZ JtwWNqF+oYFS85vdxlqA/XRbDU1paY1UmyejqcyKM+QUSkXOLxhujrOdMweKKSFtqbe3 jpQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=K+z55U1Wylwn/YjJLjZmjhvHOWKK+ryXKhTkBsgZ0YY=; b=P4LejJEzUIqQk+mRpFTN4rE8hLGb04D2WOj8JjaOIp+RJxr7LVBH8/CfY935JyOubc RebKoZqM34jUZvtHU8QaXu7o/eg0L8KrZKGhgydQv0mdUDDgol/4MO4H8RzsiIpf6djo Pyj2MQ225IMOtIlHibgPu8J9mpJ5Mr26CgA281OiildoFJOvU1/gFkPHjoDSCkrwnBAo JrmRuVhHGewHKBUCkxGbrY3pX3fOV5AV5NiB8qOqWzXQ+Zua/ioLVB6jyjBsTiOAMnja wLLOFsOmZGLNZoo74aN3yxTYe20gSq+dpnNPPiMBDb+2eauTWY7OLxmnNfdVa7MbiK+m +EYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AkV9KHrh; 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=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t13-20020a056402240d00b004614f376c2fsi1985368eda.88.2022.11.11.01.48.00; Fri, 11 Nov 2022 01:48:24 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=AkV9KHrh; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232901AbiKKJng (ORCPT + 99 others); Fri, 11 Nov 2022 04:43:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233686AbiKKJnS (ORCPT ); Fri, 11 Nov 2022 04:43:18 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71A1F78782; Fri, 11 Nov 2022 01:43:17 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 084D361F2D; Fri, 11 Nov 2022 09:43:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5DF7EC43142; Fri, 11 Nov 2022 09:43:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668159796; bh=TzRtDoyAfzMufPd65BGkX4pJ/DMl35ij09Pc1cMge34=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AkV9KHrhRaLPwJse3DLZBzlWclo57AXP2hdYhe7qInV7pfqF1KTZLt8OMfbx06k+r o9GGULfLHoOYWvqVHiK/U//cKrOV5fQEIgyp82qL6bkblNQBoFr0UWNXpefv0i3vQo UhF2MbjxzLtaebXZnrwmJWD3RRmzZcMEEUBXYlvKnpVPB0Uj+BRPBT7YvqxZpQFyVM bE1LRoirVW/mSJ5d2+oiuKEcDZ8mucVDY5C9hRZ7fZiKu8BJGI6gdKRcyibQcdW9EW TMLCzMJbtt+Hqv4Jl0/GqRZLjftDUwTEsdFe0ry78I9NZwRHxcmFN/4y45/JZd7qHM 3mbwPHT3w88QQ== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1otQYi-00030f-Kx; Fri, 11 Nov 2022 10:42:48 +0100 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Dmitry Baryshkov , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 3/3] phy: qcom-qmp-pcie: drop redundant clock allocation Date: Fri, 11 Nov 2022 10:42:39 +0100 Message-Id: <20221111094239.11547-4-johan+linaro@kernel.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221111094239.11547-1-johan+linaro@kernel.org> References: <20221111094239.11547-1-johan+linaro@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749192649454018165?= X-GMAIL-MSGID: =?utf-8?q?1749192649454018165?= Since the QMP driver split, there is no reason to allocate the fixed-rate pipe clock structure separately from the driver data. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c index 328708a09c37..68cafc9561ae 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c @@ -1546,6 +1546,8 @@ struct qmp_pcie { struct phy *phy; int mode; + + struct clk_fixed_rate pipe_clk_fixed; }; static inline void qphy_setbits(void __iomem *base, u32 offset, u32 val) @@ -2410,7 +2412,7 @@ static void phy_clk_release_provider(void *res) */ static int phy_pipe_clk_register(struct qmp_pcie *qmp, struct device_node *np) { - struct clk_fixed_rate *fixed; + struct clk_fixed_rate *fixed = &qmp->pipe_clk_fixed; struct clk_init_data init = { }; int ret; @@ -2420,10 +2422,6 @@ static int phy_pipe_clk_register(struct qmp_pcie *qmp, struct device_node *np) return ret; } - fixed = devm_kzalloc(qmp->dev, sizeof(*fixed), GFP_KERNEL); - if (!fixed) - return -ENOMEM; - init.ops = &clk_fixed_rate_ops; /*