public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: wens@csie.org
Cc: linux-clk@vger.kernel.org
Subject: [bug report] clk: sunxi-ng: Add A80 CCU
Date: Mon, 6 Feb 2017 16:47:37 +0300	[thread overview]
Message-ID: <20170206134737.GA2593@mwanda> (raw)

Hello Chen-Yu Tsai,

The patch b8eb71dcdd08: "clk: sunxi-ng: Add A80 CCU" from Jan 28,
2017, leads to the following static checker warning:

	drivers/clk/sunxi-ng/ccu-sun9i-a80.c:1205 sun9i_a80_ccu_probe()
	warn: odd binop '0x10000 & 0x40000'

drivers/clk/sunxi-ng/ccu-sun9i-a80.c
  1192  static int sun9i_a80_ccu_probe(struct platform_device *pdev)
  1193  {
  1194          struct resource *res;
  1195          void __iomem *reg;
  1196          u32 val;
  1197  
  1198          res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
  1199          reg = devm_ioremap_resource(&pdev->dev, res);
  1200          if (IS_ERR(reg))
  1201                  return PTR_ERR(reg);
  1202  
  1203          /* Enforce d1 = 0, d2 = 0 for Audio PLL */
  1204          val = readl(reg + SUN9I_A80_PLL_AUDIO_REG);
  1205          val &= (BIT(16) & BIT(18));

This line just sets "val" to zero.  Not sure what was intended.

  1206          writel(val, reg + SUN9I_A80_PLL_AUDIO_REG);
  1207  
  1208          return sunxi_ccu_probe(pdev->dev.of_node, reg, &sun9i_a80_ccu_desc);
  1209  }

regards,
dan carpenter

                 reply	other threads:[~2017-02-06 13:47 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=20170206134737.GA2593@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=wens@csie.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