Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1277355 > unrolled thread

[PATCH] dm-ioctl: fix 4-characters indentations

Started byGeliang Tang <geliangtang@163.com>
First post2015-11-25 13:50 +0100
Last post2015-11-28 09:40 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] dm-ioctl: fix 4-characters indentations Geliang Tang <geliangtang@163.com> - 2015-11-25 13:50 +0100
    Re: [dm-devel] [PATCH] dm-ioctl: fix 4-characters indentations Minfei Huang <mnfhuang@gmail.com> - 2015-11-28 09:40 +0100

#1277355 — [PATCH] dm-ioctl: fix 4-characters indentations

FromGeliang Tang <geliangtang@163.com>
Date2015-11-25 13:50 +0100
Subject[PATCH] dm-ioctl: fix 4-characters indentations
Message-ID<qyHGi-6l3-27@gated-at.bofh.it>
Change 4-characters indentations to 8-characters.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 drivers/md/dm-ioctl.c | 58 +++++++++++++++++++++++++--------------------------
 1 file changed, 29 insertions(+), 29 deletions(-)

diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
index 80a4395..39aae6b 100644
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -45,10 +45,10 @@ struct dm_table {
 };
 
 struct vers_iter {
-    size_t param_size;
-    struct dm_target_versions *vers, *old_vers;
-    char *end;
-    uint32_t flags;
+	size_t param_size;
+	struct dm_target_versions *vers, *old_vers;
+	char *end;
+	uint32_t flags;
 };
 
 
@@ -557,36 +557,36 @@ static int list_devices(struct dm_ioctl *param, size_t param_size)
 
 static void list_version_get_needed(struct target_type *tt, void *needed_param)
 {
-    size_t *needed = needed_param;
+	size_t *needed = needed_param;
 
-    *needed += sizeof(struct dm_target_versions);
-    *needed += strlen(tt->name);
-    *needed += ALIGN_MASK;
+	*needed += sizeof(struct dm_target_versions);
+	*needed += strlen(tt->name);
+	*needed += ALIGN_MASK;
 }
 
 static void list_version_get_info(struct target_type *tt, void *param)
 {
-    struct vers_iter *info = param;
-
-    /* Check space - it might have changed since the first iteration */
-    if ((char *)info->vers + sizeof(tt->version) + strlen(tt->name) + 1 >
-	info->end) {
-
-	info->flags = DM_BUFFER_FULL_FLAG;
-	return;
-    }
-
-    if (info->old_vers)
-	info->old_vers->next = (uint32_t) ((void *)info->vers -
-					   (void *)info->old_vers);
-    info->vers->version[0] = tt->version[0];
-    info->vers->version[1] = tt->version[1];
-    info->vers->version[2] = tt->version[2];
-    info->vers->next = 0;
-    strcpy(info->vers->name, tt->name);
-
-    info->old_vers = info->vers;
-    info->vers = align_ptr(((void *) ++info->vers) + strlen(tt->name) + 1);
+	struct vers_iter *info = param;
+
+	/* Check space - it might have changed since the first iteration */
+	if ((char *)info->vers + sizeof(tt->version) + strlen(tt->name) + 1 >
+		info->end) {
+
+		info->flags = DM_BUFFER_FULL_FLAG;
+		return;
+	}
+
+	if (info->old_vers)
+		info->old_vers->next = (uint32_t) ((void *)info->vers -
+						   (void *)info->old_vers);
+	info->vers->version[0] = tt->version[0];
+	info->vers->version[1] = tt->version[1];
+	info->vers->version[2] = tt->version[2];
+	info->vers->next = 0;
+	strcpy(info->vers->name, tt->name);
+
+	info->old_vers = info->vers;
+	info->vers = align_ptr(((void *) ++info->vers) + strlen(tt->name) + 1);
 }
 
 static int list_versions(struct dm_ioctl *param, size_t param_size)
-- 
2.5.0


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1279113 — Re: [dm-devel] [PATCH] dm-ioctl: fix 4-characters indentations

FromMinfei Huang <mnfhuang@gmail.com>
Date2015-11-28 09:40 +0100
SubjectRe: [dm-devel] [PATCH] dm-ioctl: fix 4-characters indentations
Message-ID<qzJcZ-6th-1@gated-at.bofh.it>
In reply to#1277355
Hi.

IMHO, this sort of defect shouldn't be fixed like this. It should be
fixed with other bugs, if necessary.

Once this patch is applied, it will break up the 'git blame'.

Thanks
Minfei

On 11/25/15 at 08:45pm, Geliang Tang wrote:
> Change 4-characters indentations to 8-characters.
> 
> Signed-off-by: Geliang Tang <geliangtang@163.com>
> ---
>  drivers/md/dm-ioctl.c | 58 +++++++++++++++++++++++++--------------------------
>  1 file changed, 29 insertions(+), 29 deletions(-)
> 
> diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
> index 80a4395..39aae6b 100644
> --- a/drivers/md/dm-ioctl.c
> +++ b/drivers/md/dm-ioctl.c
> @@ -45,10 +45,10 @@ struct dm_table {
>  };
>  
>  struct vers_iter {
> -    size_t param_size;
> -    struct dm_target_versions *vers, *old_vers;
> -    char *end;
> -    uint32_t flags;
> +	size_t param_size;
> +	struct dm_target_versions *vers, *old_vers;
> +	char *end;
> +	uint32_t flags;
>  };
>  
>  
> @@ -557,36 +557,36 @@ static int list_devices(struct dm_ioctl *param, size_t param_size)
>  
>  static void list_version_get_needed(struct target_type *tt, void *needed_param)
>  {
> -    size_t *needed = needed_param;
> +	size_t *needed = needed_param;
>  
> -    *needed += sizeof(struct dm_target_versions);
> -    *needed += strlen(tt->name);
> -    *needed += ALIGN_MASK;
> +	*needed += sizeof(struct dm_target_versions);
> +	*needed += strlen(tt->name);
> +	*needed += ALIGN_MASK;
>  }
>  
>  static void list_version_get_info(struct target_type *tt, void *param)
>  {
> -    struct vers_iter *info = param;
> -
> -    /* Check space - it might have changed since the first iteration */
> -    if ((char *)info->vers + sizeof(tt->version) + strlen(tt->name) + 1 >
> -	info->end) {
> -
> -	info->flags = DM_BUFFER_FULL_FLAG;
> -	return;
> -    }
> -
> -    if (info->old_vers)
> -	info->old_vers->next = (uint32_t) ((void *)info->vers -
> -					   (void *)info->old_vers);
> -    info->vers->version[0] = tt->version[0];
> -    info->vers->version[1] = tt->version[1];
> -    info->vers->version[2] = tt->version[2];
> -    info->vers->next = 0;
> -    strcpy(info->vers->name, tt->name);
> -
> -    info->old_vers = info->vers;
> -    info->vers = align_ptr(((void *) ++info->vers) + strlen(tt->name) + 1);
> +	struct vers_iter *info = param;
> +
> +	/* Check space - it might have changed since the first iteration */
> +	if ((char *)info->vers + sizeof(tt->version) + strlen(tt->name) + 1 >
> +		info->end) {
> +
> +		info->flags = DM_BUFFER_FULL_FLAG;
> +		return;
> +	}
> +
> +	if (info->old_vers)
> +		info->old_vers->next = (uint32_t) ((void *)info->vers -
> +						   (void *)info->old_vers);
> +	info->vers->version[0] = tt->version[0];
> +	info->vers->version[1] = tt->version[1];
> +	info->vers->version[2] = tt->version[2];
> +	info->vers->next = 0;
> +	strcpy(info->vers->name, tt->name);
> +
> +	info->old_vers = info->vers;
> +	info->vers = align_ptr(((void *) ++info->vers) + strlen(tt->name) + 1);
>  }
>  
>  static int list_versions(struct dm_ioctl *param, size_t param_size)
> -- 
> 2.5.0
> 
> 
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web