Re: [PATCH 02/16 v2] pramfs: super block operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Marco,

On Sat, Nov 06, 2010 at 09:56:39AM +0100, Marco Stornelli wrote:
> From: Marco Stornelli <marco.stornelli@xxxxxxxxx>
> +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
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux