public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [bug report] clk: tegra: Add BPMP clock driver
Date: Thu, 17 Nov 2016 15:59:54 +0300	[thread overview]
Message-ID: <20161117125645.GA32763@mwanda> (raw)

Hello Thierry Reding,

The patch 569d53d81e37: "clk: tegra: Add BPMP clock driver" from Aug
18, 2016, leads to the following static checker warning:

	drivers/clk/tegra/clk-bpmp.c:183 tegra_bpmp_clk_get_parent()
	warn: sizeof(&pointer)?

drivers/clk/tegra/clk-bpmp.c
   171  static u8 tegra_bpmp_clk_get_parent(struct clk_hw *hw)
   172  {
   173          struct tegra_bpmp_clk *clk = to_tegra_bpmp_clk(hw);
   174          struct cmd_clk_get_parent_response response;
   175          struct tegra_bpmp_clk_message msg;
   176          unsigned int i;
   177          int err;
   178  
   179          memset(&msg, 0, sizeof(msg));
   180          msg.cmd = CMD_CLK_GET_PARENT;
   181          msg.clk = clk->id;
   182          msg.rx.data = &response;
   183          msg.rx.size = sizeof(&response);

This should almost certainly sizeof(response). int vs pointer.

   184  
   185          err = tegra_bpmp_clk_transfer(clk->bpmp, &msg);
   186          if (err < 0) {
   187                  dev_err(clk->bpmp->dev, "failed to get parent for %s: %d\n",

regards,
dan carpenter

             reply	other threads:[~2016-11-17 12:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-17 12:59 Dan Carpenter [this message]
2016-11-17 17:25 ` [bug report] clk: tegra: Add BPMP clock driver Thierry Reding

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=20161117125645.GA32763@mwanda \
    --to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    /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