All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: ola.o.lilja@stericsson.com
Cc: alsa-devel@alsa-project.org
Subject: Re: ASoC: codecs: Add AB8500 codec-driver
Date: Sat, 16 Jun 2012 16:19:04 +0300	[thread overview]
Message-ID: <20120616131904.GA17980@elgon.mountain> (raw)

Hello Ola Lilja,

The patch 679d7abdc754: "ASoC: codecs: Add AB8500 codec-driver" from
Jun 7, 2012, leads to the following Sparse warnings:

sound/soc/codecs/ab8500-codec.c:1960:53:
	warning: cast truncates bits from constant value (1013 becomes 13)
sound/soc/codecs/ab8500-codec.c:1968:53:
	warning: cast truncates bits from constant value (1013 becomes 13)

sound/soc/codecs/ab8500-codec.c
  1958          /* Set DMic-clocks to outputs */
  1959          status = abx500_get_register_interruptible(codec->dev, (u8)AB8500_MISC,
  1960                                                  (u8)AB8500_GPIO_DIR4_REG,
                                                            ^^^^^^^^^^^^^^^^^^^^
  1961                                                  &value8);
  1962          if (status < 0)
  1963                  return status;
  1964          value = value8 | GPIO27_DIR_OUTPUT | GPIO29_DIR_OUTPUT |
  1965                  GPIO31_DIR_OUTPUT;
  1966          status = abx500_set_register_interruptible(codec->dev,
  1967                                                  (u8)AB8500_MISC,
  1968                                                  (u8)AB8500_GPIO_DIR4_REG,
                                                        ^^^^^^^^^^^^^^^^^^^^^^^^
  1969                                                  value);

In my quick check we only seem to use the truncated values of these
defines so I'm not sure this was intended.

regards,
dan carpenter

             reply	other threads:[~2012-06-16 13:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-16 13:19 Dan Carpenter [this message]
2012-06-19  8:50 ` ASoC: codecs: Add AB8500 codec-driver Ola Lilja

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=20120616131904.GA17980@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=ola.o.lilja@stericsson.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 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.