public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: re: clk: qcom: Add support for root clock generators (RCGs)
Date: Wed, 02 Apr 2014 10:48:14 +0000	[thread overview]
Message-ID: <20140402104814.GA19427@mwanda> (raw)

Hello Stephen Boyd,

The patch bcd61c0f535a: "clk: qcom: Add support for root clock
generators (RCGs)" from Jan 15, 2014, leads to the following static
checker warning:

	drivers/clk/qcom/clk-rcg2.c:79 clk_rcg2_get_parent()
	warn: signedness bug returning '(-22)'

drivers/clk/qcom/clk-rcg2.c
    61  static u8 clk_rcg2_get_parent(struct clk_hw *hw)
    62  {
    63          struct clk_rcg2 *rcg = to_clk_rcg2(hw);
    64          int num_parents = __clk_get_num_parents(hw->clk);
    65          u32 cfg;
    66          int i, ret;
    67  
    68          ret = regmap_read(rcg->clkr.regmap, rcg->cmd_rcgr + CFG_REG, &cfg);
    69          if (ret)
    70                  return ret;
    71  
    72          cfg &= CFG_SRC_SEL_MASK;
    73          cfg >>= CFG_SRC_SEL_SHIFT;
    74  
    75          for (i = 0; i < num_parents; i++)
    76                  if (cfg = rcg->parent_map[i])
    77                          return i;
    78  
    79          return -EINVAL;
                ^^^^^^^^^^^^^^
    80  }

See also:

        drivers/clk/qcom/clk-rcg.c:57 clk_rcg_get_parent()
        warn: signedness bug returning '(-22)'

	drivers/clk/qcom/clk-rcg.c:86 clk_dyn_rcg_get_parent()
	warn: signedness bug returning '(-22)'

regards,
dan carpenter

                 reply	other threads:[~2014-04-02 10:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20140402104814.GA19427@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.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