Re: [PATCH v0 1/4] Add support for sysfs to btrfs.

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

 



On Thu, 23 Aug 2012 14:12:59 +0200, Goffredo Baroncelli wrote:
> Export via sysfs some information about the btrfs devices and
> filesystem.
> ---
>  fs/btrfs/super.c |    4 
>  fs/btrfs/sysfs.c |  933 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  fs/btrfs/sysfs.h |   31 ++
>  3 files changed, 963 insertions(+), 5 deletions(-)
>  create mode 100644 fs/btrfs/sysfs.h

Hi Goffredo,

The Signed-off-by line is missing, it is mandatory.

[...]
> +struct btrfs_sysfs_fsid {
> +		struct kobject			*kobj;
> +		struct list_head		list;
> +		u8						fsid[BTRFS_FSID_SIZE];
> +};

Tabsize needs to be 8.

> +static struct list_head btrfs_sysfs_device_list;
> +static struct list_head btrfs_sysfs_fs_devices_list;
> +static struct list_head btrfs_sysfs_filesystem_list;
> +static struct list_head btrfs_sysfs_fsid_list;
> +
> +
> +void uuid_unparse( u8 *uuid, char *out ){
> +	static char *i2x = "0123456789abcdef";
> +	static int 	lengths[] = {4,2,2,2,6,0};
> +	int 		i;
> +	
> +	for(i=0; ; i++){
> +		int j;
> +		for(j=0; j < lengths[i] ; j++, uuid++){
> +			*out++ = i2x[*uuid >> 4];
> +			*out++ = i2x[*uuid & 0x0f];
> +		}
> +		if( !lengths[i+1] ){
> +			*out = 0;
> +			break;
> +		}else{
> +			*out++ = '-';
> +		}
> +	}
> +}

All the missing spaces and all the spaces that are too much...
One line contains a trailing TAB character before the end of the line.
A newline is missing before the opening curly bracket of the function body.
An empty line between the 'int j;' and the code is common, like the one
after the 'int i;'.

[more lines deleted...]

Please refer to:
Documentation/SubmittingPatches
Documentation/SubmitChecklist
Documentation/CodingStyle

And apply:
scripts/checkpatch.pl

I did not look at the patch itself after noticing the style issues.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux