linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Hogan <james@albanarts.com>
To: Marco Stornelli <marco.stornelli@gmail.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
	Linux Embedded <linux-embedded@vger.kernel.org>,
	Linux FS Devel <linux-fsdevel@vger.kernel.org>,
	Tim Bird <tim.bird@am.sony.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 02/16 v2] pramfs: super block operations
Date: Sat, 6 Nov 2010 11:16:27 +0000	[thread overview]
Message-ID: <20101106111627.GA13497@gandalf.local> (raw)
In-Reply-To: <4CD51847.20306@gmail.com>

Hi Marco,

On Sat, Nov 06, 2010 at 09:56:39AM +0100, Marco Stornelli wrote:
> From: Marco Stornelli <marco.stornelli@gmail.com>
> +static void pram_set_blocksize(struct super_block *sb, unsigned long size)
> +{
> +	int bits;
> +
> +	/*
> +	* We've already validated the user input and the value here must be
> +	* between PRAM_MAX_BLOCK_SIZE and PRAM_MIN_BLOCK_SIZE
> +	* and it must be a power of 2.
> +	*/

Should this comment have spaces after the tabs to be consistent with the
other multiline comments (pram_ioremap) and the coding style?

> +	bits = fls(size) - 1;
> +	sb->s_blocksize_bits = bits;
> +	sb->s_blocksize = (1<<bits);
> +}
> +
> +static inline void *pram_ioremap(phys_addr_t phys_addr, ssize_t size)
> +{
> +	void *retval;
> +
> +	/*
> +	 * NOTE: Userland may not map this resource, we will mark the region so
> +	 * /dev/mem and the sysfs MMIO access will not be allowed. This
> +	 * restriction depends on STRICT_DEVMEM option. If this option is
> +	 * disabled or not available we mark the region only as busy.
> +	 */
> +	retval = request_mem_region_exclusive(phys_addr, size, "pramfs");
> +	if (!retval)
> +		goto fail;
> +
> +	retval = ioremap_nocache(phys_addr, size);
> +
> +	if (retval)
> +		wrprotect(retval, size);
> +fail:
> +	return retval;
> +}

Cheers
James

  reply	other threads:[~2010-11-06 11:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-06  8:56 [PATCH 02/16 v2] pramfs: super block operations Marco Stornelli
2010-11-06 11:16 ` James Hogan [this message]
2010-11-06 14:59   ` Marco Stornelli
2010-11-06 13:12 ` James Hogan
2010-11-06 14:59   ` Marco Stornelli
2010-11-08 10:42 ` yidong zhang
2010-11-08 11:54   ` Marco Stornelli

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=20101106111627.GA13497@gandalf.local \
    --to=james@albanarts.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-embedded@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marco.stornelli@gmail.com \
    --cc=tim.bird@am.sony.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).