All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: mturquette@linaro.org
Cc: linux-clk@vger.kernel.org
Subject: re: ARM: OMAP4: clock: Convert to common clk
Date: Tue, 21 Jul 2015 00:48:55 +0300	[thread overview]
Message-ID: <20150720214855.GA22901@mwanda> (raw)

Hello Mike Turquette,

The patch 32cc002116b8: "ARM: OMAP4: clock: Convert to common clk"
from Nov 10, 2012, leads to the following Smatch warning:

	drivers/clk/ti/clkt_dpll.c:213 omap2_init_dpll_parent()
	warn: signedness bug returning '(-22)'

drivers/clk/ti/clkt_dpll.c
   204  /* Public functions */
   205  u8 omap2_init_dpll_parent(struct clk_hw *hw)
        ^^

   206  {
   207          struct clk_hw_omap *clk = to_clk_hw_omap(hw);
   208          u32 v;
   209          struct dpll_data *dd;
   210  
   211          dd = clk->dpll_data;
   212          if (!dd)
   213                  return -EINVAL;
                               ^^^^^^^
Truncated to positive u8.

   214  
   215          v = ti_clk_ll_ops->clk_readl(dd->control_reg);
   216          v &= dd->enable_mask;
   217          v >>= __ffs(dd->enable_mask);
   218  
   219          /* Reparent the struct clk in case the dpll is in bypass */
   220          if (_omap2_dpll_is_in_bypass(v))
   221                  return 1;
   222  
   223          return 0;
   224  }

regards,
dan carpenter

             reply	other threads:[~2015-07-20 21:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-20 21:48 Dan Carpenter [this message]
2015-07-24  0:18 ` ARM: OMAP4: clock: Convert to common clk Michael Turquette

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=20150720214855.GA22901@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=mturquette@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.