public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Anderson Briglia <anderson.briglia@indt.org.br>
To: ext Pierre Ossman <drzeus-list@drzeus.cx>
Cc: "Linux-omap-open-source@linux.omap.com" 
	<linux-omap-open-source@linux.omap.com>,
	Russell King <rmk+lkml@arm.linux.org.uk>,
	Tony Lindgren <tony@atomide.com>,
	"Aguiar Carlos (EXT-INdT/Manaus)" <carlos.aguiar@indt.org.br>,
	ext David Brownell <david-b@pacbell.net>,
	"Lizardo Anderson (EXT-INdT/Manaus)"
	<anderson.lizardo@indt.org.br>,
	linux-kernel@vger.kernel.org
Subject: Re: [patch 3/5] [RFC] Add MMC Password Protection (lock/unlock) support V7: mmc_lock_unlock.diff
Date: Tue, 05 Dec 2006 14:06:36 -0400	[thread overview]
Message-ID: <4575B52C.70403@indt.org.br> (raw)
In-Reply-To: <457483B5.8060205@drzeus.cx>

ext Pierre Ossman wrote:

> Anderson Briglia wrote:
>> Actually they represent the bits regarding the modes and it is used
>> when we
>> have to send the LOCK/UNLOCK mode on the command data block, according
>> to the MMC Spec.
>> If you take a look at mmc_lock_unlock function, we use those modes to
>> set the right bit
>> when composing the command data block.
>> This definition makes the code more legible and simple.
> 
> In that case you need to change the code to make sure it is clear that
> it is bits and not values.

Yes. As I sent another version after read your comment, I'll fix the V8 code just for this patch, ok? I don't see that 
we have to send another version.


> Also, your definition for
> MMC_LOCK_MODE_UNLOCK is wrong.

This definition:

#define MMC_LOCK_MODE_UNLOCK    (0<<2)

also tries to make the code more clear and legible. It is indicating that this bit is on the position 3 into the bits 
array, according to MMC Spec.
But, why zero? Well, the bit must be 1 for locking and 0 for unlocking. We are using the unlocking action, so we used zero.
Is there any issue using this piece of code?
If you prefer another approach we can adjust our patch.

Regards,

Anderson Briglia

  reply	other threads:[~2006-12-05 18:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-22 14:51 [patch 3/5] [RFC] Add MMC Password Protection (lock/unlock) support V7: mmc_lock_unlock.diff Anderson Briglia
2006-11-25  8:47 ` Pierre Ossman
2006-11-27 13:45   ` Anderson Briglia
2006-12-01 21:20     ` Pierre Ossman
2006-12-04 18:45   ` Anderson Briglia
2006-12-04 20:23     ` Pierre Ossman
2006-12-05 18:06       ` Anderson Briglia [this message]
2006-11-25  8:53 ` Pierre Ossman

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=4575B52C.70403@indt.org.br \
    --to=anderson.briglia@indt.org.br \
    --cc=anderson.lizardo@indt.org.br \
    --cc=carlos.aguiar@indt.org.br \
    --cc=david-b@pacbell.net \
    --cc=drzeus-list@drzeus.cx \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap-open-source@linux.omap.com \
    --cc=rmk+lkml@arm.linux.org.uk \
    --cc=tony@atomide.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