mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: vbyravarasu@nvidia.com
Cc: torvalds@linux-foundation.org, a.zummo@towertech.it,
	bunk@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] bcd: limit bin2bcd input value to lie between 0-99
Date: Tue, 22 Nov 2011 14:32:14 -0800	[thread overview]
Message-ID: <20111122143214.5cc8f17e.akpm@linux-foundation.org> (raw)
In-Reply-To: <1321420292-26970-1-git-send-email-vbyravarasu@nvidia.com>

On Wed, 16 Nov 2011 10:41:32 +0530
vbyravarasu@nvidia.com wrote:

> From: venu byravarasu <vbyravarasu@nvidia.com>
> 
> Current implementation of bin2bcd allows any value
> between 0x0 to 0xF to be stored in the most significant
> nibble of its returned value, against to the BCD limits
> of 0 - 9. Hence fixing it.
> 
> e.g. say val passed to bin2bcd is 123.
> In that case the expected value to be returned by
> this function is 0x23.
> However, without the fix being added, it would
> return 0xC3.
> 

I'm not sure that I agree.  Passing 123 to bin2bcd() is a bug, isn't
it?  We want to know about bugs so we can fix them, and quietly repairing
thngs in callees prevents that.


  reply	other threads:[~2011-11-22 22:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-16  5:11 vbyravarasu
2011-11-22 22:32 ` Andrew Morton [this message]
2011-11-23  3:52   ` Venu Byravarasu
2011-12-13  9:56   ` Venu Byravarasu
  -- strict thread matches above, loose matches on Subject: below --
2011-11-15 12:40 vbyravarasu

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=20111122143214.5cc8f17e.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=a.zummo@towertech.it \
    --cc=bunk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=vbyravarasu@nvidia.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

all inboxes | Powered by JetHome®