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


Groups > linux.kernel > #1494375 > unrolled thread

[PATCH 0/9] md/dm-table: Fine-tuning for several function implementations

Started bySF Markus Elfring <elfring@users.sourceforge.net>
First post2016-10-01 09:50 +0200
Last post2016-10-01 10:00 +0200
Articles 4 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/9] md/dm-table: Fine-tuning for several function  implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-01 09:50 +0200
    [PATCH 9/9] md/dm-table: Delete an unwanted space in  dm_table_get_integrity_disk() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-01 10:00 +0200
    [PATCH 7/9] md/dm-table: Adjust one function call together with a  variable assignment SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-01 10:00 +0200
    [PATCH 8/9] md/dm-table: Delete an unwanted space in high() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-01 10:00 +0200

#1494375 — [PATCH 0/9] md/dm-table: Fine-tuning for several function implementations

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2016-10-01 09:50 +0200
Subject[PATCH 0/9] md/dm-table: Fine-tuning for several function implementations
Message-ID<snndv-5fs-3@gated-at.bofh.it>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 1 Oct 2016 09:35:43 +0200

Some update suggestions were taken into account
from static source code analysis.

Markus Elfring (9):
  Use kmalloc_array() in realloc_argv()
  Reduce the scope for a variable in dm_table_verify_integrity()
  Delete an unnecessary variable initialisation in dm_table_register_integrity()
  Delete an unnecessary variable initialisation in dm_split_args()
  Move an assignment for the variable "end" in dm_split_args()
  Combine substrings for ten messages
  Adjust one function call together with a variable assignment
  Delete an unwanted space in high()
  Delete an unwanted space in dm_table_get_integrity_disk()

 drivers/md/dm-table.c | 51 ++++++++++++++++++++-------------------------------
 1 file changed, 20 insertions(+), 31 deletions(-)

-- 
2.10.0

[toc] | [next] | [standalone]


#1494376 — [PATCH 9/9] md/dm-table: Delete an unwanted space in dm_table_get_integrity_disk()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2016-10-01 10:00 +0200
Subject[PATCH 9/9] md/dm-table: Delete an unwanted space in dm_table_get_integrity_disk()
Message-ID<snnnb-5jc-1@gated-at.bofh.it>
In reply to#1494375
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 1 Oct 2016 09:24:56 +0200

The script "checkpatch.pl" pointed information out like the following.

ERROR: "foo * bar" should be "foo *bar"

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/md/dm-table.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index a948ffb..3ad1b1a 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -1117,7 +1117,7 @@ static bool integrity_profile_exists(struct gendisk *disk)
  * Get a disk whose integrity profile reflects the table's profile.
  * Returns NULL if integrity support was inconsistent or unavailable.
  */
-static struct gendisk * dm_table_get_integrity_disk(struct dm_table *t)
+static struct gendisk *dm_table_get_integrity_disk(struct dm_table *t)
 {
 	struct list_head *devices = dm_table_get_devices(t);
 	struct dm_dev_internal *dd = NULL;
-- 
2.10.0

[toc] | [prev] | [next] | [standalone]


#1494377 — [PATCH 7/9] md/dm-table: Adjust one function call together with a variable assignment

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2016-10-01 10:00 +0200
Subject[PATCH 7/9] md/dm-table: Adjust one function call together with a variable assignment
Message-ID<snnnb-5jc-3@gated-at.bofh.it>
In reply to#1494375
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 1 Oct 2016 08:53:37 +0200

The script "checkpatch.pl" pointed information out like the following.

ERROR: do not use assignment in if condition

Thus fix the affected source code place.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/md/dm-table.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index 9b7d8b7..40dde87 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -407,7 +407,8 @@ int dm_get_device(struct dm_target *ti, const char *path, fmode_t mode,
 		if (!dd)
 			return -ENOMEM;
 
-		if ((r = dm_get_table_device(t->md, dev, mode, &dd->dm_dev))) {
+		r = dm_get_table_device(t->md, dev, mode, &dd->dm_dev);
+		if (r) {
 			kfree(dd);
 			return r;
 		}
-- 
2.10.0

[toc] | [prev] | [next] | [standalone]


#1494378 — [PATCH 8/9] md/dm-table: Delete an unwanted space in high()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2016-10-01 10:00 +0200
Subject[PATCH 8/9] md/dm-table: Delete an unwanted space in high()
Message-ID<snnnb-5jc-5@gated-at.bofh.it>
In reply to#1494375
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 1 Oct 2016 09:04:06 +0200

The script "checkpatch.pl" pointed information out like the following.

ERROR: space prohibited after that '-' (ctx:WxW)

Thus fix the affected source code place.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/md/dm-table.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index 40dde87..a948ffb 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -109,7 +109,7 @@ static sector_t high(struct dm_table *t, unsigned int l, unsigned int n)
 		n = get_child(n, CHILDREN_PER_NODE - 1);
 
 	if (n >= t->counts[l])
-		return (sector_t) - 1;
+		return (sector_t) -1;
 
 	return get_node(t, l, n)[KEYS_PER_NODE - 1];
 }
-- 
2.10.0

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web