linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Hennerich <michael.hennerich@analog.com>
To: Shubhrajyoti Datta <omaplinuxkernel@gmail.com>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"jic23@kernel.org" <jic23@kernel.org>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	"device-drivers-devel@blackfin.uclinux.org"
	<device-drivers-devel@blackfin.uclinux.org>
Subject: Re: [PATCH] iio: ad9523: Fix argument type mismatch
Date: Mon, 11 Jun 2012 11:15:47 +0200	[thread overview]
Message-ID: <4FD5B743.7070500@analog.com> (raw)
In-Reply-To: <CAM=Q2ctNYnq9S9fr4K6sh+k3311nMON8Yho+-vAdd3dSdOXRHg@mail.gmail.com>

On 06/11/2012 11:02 AM, Shubhrajyoti Datta wrote:
> Hi Michael,
>
> On Mon, Jun 11, 2012 at 1:21 PM,<michael.hennerich@analog.com>  wrote:
>> From: Michael Hennerich<michael.hennerich@analog.com>
>>
>> drivers/iio/frequency/ad9523.c:378 ad9523_vco_out_map()
>>          warn: value 2 can't fit into 1 'out'
>>
>> Signed-off-by: Michael Hennerich<michael.hennerich@analog.com>
>> Reported-by: Dan Carpenter<dan.carpenter@oracle.com>
>> ---
>>   drivers/iio/frequency/ad9523.c |    2 +-
>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/iio/frequency/ad9523.c b/drivers/iio/frequency/ad9523.c
>> index 7272924..43f47d9 100644
>> --- a/drivers/iio/frequency/ad9523.c
>> +++ b/drivers/iio/frequency/ad9523.c
>> @@ -361,7 +361,7 @@ static int ad9523_io_update(struct iio_dev *indio_dev)
>>   }
>>
>>   static int ad9523_vco_out_map(struct iio_dev *indio_dev,
>> -                             unsigned ch, bool out)
>> +                             unsigned ch, unsigned out)
> Unsigned defaults to unsigned int right shouldnt it be a char?
> Or am I missing something.
>
Hi Shubhrajyoti,

can you explain why this matters?
If you take a closer look at the disassembly -
you will notice that 'unsigned int' will generate nicer code.

-- 
Greetings,
Michael

--
Analog Devices GmbH      Wilhelm-Wagenfeld-Str. 6      80807 Muenchen
Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368;
Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin,
Margaret Seif

  reply	other threads:[~2012-06-11  9:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-11  7:51 [PATCH] iio: ad9523: Fix argument type mismatch michael.hennerich
2012-06-11  9:02 ` Shubhrajyoti Datta
2012-06-11  9:15   ` Michael Hennerich [this message]
2012-06-11 11:17     ` Shubhrajyoti Datta
2012-06-11 11:36       ` Lars-Peter Clausen
2012-06-11 12:29         ` Shubhrajyoti Datta
  -- strict thread matches above, loose matches on Subject: below --
2012-06-08 11:04 michael.hennerich

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=4FD5B743.7070500@analog.com \
    --to=michael.hennerich@analog.com \
    --cc=device-drivers-devel@blackfin.uclinux.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=omaplinuxkernel@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).