mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Amit Sunil Dhamne <amit.sunil.dhamne@xilinx.com>
To: mturquette@baylibre.com, sboyd@kernel.org,
	michal.simek@xilinx.com, mark.rutland@arm.com,
	linux-clk@vger.kernel.org
Cc: rajanv@xilinx.com, jollys@xilinx.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Rajan Vaja <rajan.vaja@xilinx.com>,
	Tejas Patel <tejas.patel@xilinx.com>,
	Jolly Shah <jolly.shah@xilinx.com>,
	Amit Sunil Dhamne <amit.sunil.dhamne@xilinx.com>
Subject: [RESEND PATCH v2 3/4] drivers: clk: zynqmp: Fix invalid clock name queries
Date: Fri,  1 May 2020 21:37:02 -0700	[thread overview]
Message-ID: <1588394223-257635-4-git-send-email-amit.sunil.dhamne@xilinx.com> (raw)
In-Reply-To: <1588394223-257635-1-git-send-email-amit.sunil.dhamne@xilinx.com>

From: Rajan Vaja <rajan.vaja@xilinx.com>

The clock driver makes EEMI call to get the name of invalid clk
when executing versal_get_clock_info() function. This results in
error messages.
Added check for validating clock before saving clock attribute and
calling zynqmp_pm_clock_get_name() in versal_get_clock_info() function.

Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Tejas Patel <tejas.patel@xilinx.com>
Signed-off-by: Jolly Shah <jolly.shah@xilinx.com>
Signed-off-by: Amit Sunil Dhamne <amit.sunil.dhamne@xilinx.com>
---
 drivers/clk/zynqmp/clkc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/clk/zynqmp/clkc.c b/drivers/clk/zynqmp/clkc.c
index 10e89f2..3e83c51 100644
--- a/drivers/clk/zynqmp/clkc.c
+++ b/drivers/clk/zynqmp/clkc.c
@@ -663,6 +663,11 @@ static void zynqmp_get_clock_info(void)
                        continue;

                clock[i].valid = FIELD_GET(CLK_ATTR_VALID, attr.attr[0]);
+               /* skip query for Invalid clock */
+               ret = zynqmp_is_valid_clock(i);
+               if (ret != CLK_ATTR_VALID)
+                       continue;
+
                clock[i].type = FIELD_GET(CLK_ATTR_TYPE, attr.attr[0]) ?
                        CLK_TYPE_EXTERNAL : CLK_TYPE_OUTPUT;

--
2.7.4

This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

  parent reply	other threads:[~2020-05-02  4:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-02  4:36 [RESEND PATCH v2 0/4] drivers: clk: zynqmp: minor bux fixes for zynqmp clock driver Amit Sunil Dhamne
2020-05-02  4:37 ` [RESEND PATCH v2 1/4] drivers: clk: zynqmp: Limit bestdiv with maxdiv Amit Sunil Dhamne
2020-05-02  4:37 ` [RESEND PATCH v2 2/4] drivers: clk: zynqmp: Fix divider2 calculation Amit Sunil Dhamne
2020-05-02  4:37 ` Amit Sunil Dhamne [this message]
2020-05-02  4:37 ` [RESEND PATCH v2 4/4] drivers: clk: zynqmp: fix memory leak in zynqmp_register_clocks Amit Sunil Dhamne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1588394223-257635-4-git-send-email-amit.sunil.dhamne@xilinx.com \
    --to=amit.sunil.dhamne@xilinx.com \
    --cc=jolly.shah@xilinx.com \
    --cc=jollys@xilinx.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=michal.simek@xilinx.com \
    --cc=mturquette@baylibre.com \
    --cc=rajan.vaja@xilinx.com \
    --cc=rajanv@xilinx.com \
    --cc=sboyd@kernel.org \
    --cc=tejas.patel@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®