All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Pierre Ossman <drzeus-list@drzeus.cx>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Support for read-only MMC cards
Date: Sat, 4 Jun 2005 20:58:10 +0100	[thread overview]
Message-ID: <20050604205810.A23449@flint.arm.linux.org.uk> (raw)
In-Reply-To: <42A2070D.9060608@drzeus.cx>; from drzeus-list@drzeus.cx on Sat, Jun 04, 2005 at 09:54:53PM +0200

On Sat, Jun 04, 2005 at 09:54:53PM +0200, Pierre Ossman wrote:
> If the card does not support the write commands then only allow
> read-only access.

> @@ -403,9 +407,12 @@ static int mmc_blk_probe(struct mmc_card
>  	if (err)
>  		goto out;
>  
> -	printk(KERN_INFO "%s: %s %s %dKiB\n",
> +	printk(KERN_INFO "%s: %s %s %dKiB",
>  		md->disk->disk_name, mmc_card_id(card), mmc_card_name(card),
>  		(card->csd.capacity << card->csd.read_blkbits) / 1024);
> +	if (!())
> +		printk(" (ro)");
> +	printk("\n");

I'd prefer this to be:

	printk(KERN_INFO "%s: %s %s %dKiB%s\n",
 		md->disk->disk_name, mmc_card_id(card), mmc_card_name(card),
 		(card->csd.capacity << card->csd.read_blkbits) / 1024,
		card->csd.cmdclass & CCC_BLOCK_WRITE ? "" : " (ro)");

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core

  reply	other threads:[~2005-06-04 19:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-04 19:54 [PATCH] Support for read-only MMC cards Pierre Ossman
2005-06-04 19:58 ` Russell King [this message]
2005-06-04 20:05   ` Pierre Ossman
2005-06-04 20:07     ` Russell King
2005-06-04 20:14       ` Pierre Ossman
2005-06-04 20:16         ` Russell King
2005-06-04 20:24           ` 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=20050604205810.A23449@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=drzeus-list@drzeus.cx \
    --cc=linux-kernel@vger.kernel.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 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.