linux-nvdimm.lists.01.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Dan Williams <dan.j.williams@intel.com>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Dave Jiang <dave.jiang@intel.com>,
	Keith Busch <keith.busch@intel.com>,
	Ira Weiny <ira.weiny@intel.com>
Cc: linux-kernel@vger.kernel.org,
	Dan Carpenter <dan.carpenter@oracle.com>,
	linux-nvdimm@lists.01.org
Subject: [PATCH 06/13] nvdimm: Add and remove blank lines
Date: Wed, 11 Sep 2019 19:54:36 -0700	[thread overview]
Message-ID: <025c3fdcb7c6a23f73486d5c7cd515a7bda37a04.1568256707.git.joe@perches.com> (raw)
In-Reply-To: <cover.1568256705.git.joe@perches.com>

Use a more common kernel style.

Remove unnecessary multiple blank lines.
Remove blank lines before and after braces.
Add blank lines after functions definitions and enums.
Add blank lines around #define pr_fmt.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/nvdimm/btt.c            | 2 --
 drivers/nvdimm/bus.c            | 5 ++---
 drivers/nvdimm/dimm.c           | 1 -
 drivers/nvdimm/dimm_devs.c      | 2 ++
 drivers/nvdimm/label.c          | 1 -
 drivers/nvdimm/namespace_devs.c | 5 -----
 drivers/nvdimm/nd-core.h        | 4 ++++
 drivers/nvdimm/nd.h             | 6 ++++++
 drivers/nvdimm/nd_virtio.c      | 1 -
 drivers/nvdimm/region_devs.c    | 1 +
 drivers/nvdimm/security.c       | 2 --
 11 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c
index 28b65413abd8..0927cbdc5cc6 100644
--- a/drivers/nvdimm/btt.c
+++ b/drivers/nvdimm/btt.c
@@ -1354,7 +1354,6 @@ static int btt_write_pg(struct btt *btt, struct bio_integrity_payload *bip,
 			while (arena->rtt[i] == (RTT_VALID | new_postmap))
 				cpu_relax();
 
-
 		if (new_postmap >= arena->internal_nlba) {
 			ret = -EIO;
 			goto out_lane;
@@ -1496,7 +1495,6 @@ static int btt_rw_page(struct block_device *bdev, sector_t sector,
 	return rc;
 }
 
-
 static int btt_getgeo(struct block_device *bd, struct hd_geometry *geo)
 {
 	/* some standard values */
diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c
index 35591f492d27..5ffd61c9c4b7 100644
--- a/drivers/nvdimm/bus.c
+++ b/drivers/nvdimm/bus.c
@@ -2,7 +2,9 @@
 /*
  * Copyright(c) 2013-2015 Intel Corporation. All rights reserved.
  */
+
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/libnvdimm.h>
 #include <linux/sched/mm.h>
 #include <linux/vmalloc.h>
@@ -643,7 +645,6 @@ int nvdimm_revalidate_disk(struct gendisk *disk)
 	set_disk_ro(disk, 1);
 
 	return 0;
-
 }
 EXPORT_SYMBOL(nvdimm_revalidate_disk);
 
@@ -881,7 +882,6 @@ u32 nd_cmd_out_size(struct nvdimm *nvdimm, int cmd,
 		return pkg->nd_size_out;
 	}
 
-
 	return UINT_MAX;
 }
 EXPORT_SYMBOL_GPL(nd_cmd_out_size);
@@ -940,7 +940,6 @@ static int nd_pmem_forget_poison_check(struct device *dev, void *data)
 		return -EBUSY;
 
 	return 0;
-
 }
 
 static int nd_ns_forget_poison_check(struct device *dev, void *data)
diff --git a/drivers/nvdimm/dimm.c b/drivers/nvdimm/dimm.c
index 916710ae647f..5783c6d6dbdc 100644
--- a/drivers/nvdimm/dimm.c
+++ b/drivers/nvdimm/dimm.c
@@ -62,7 +62,6 @@ static int nvdimm_probe(struct device *dev)
 	if (rc < 0)
 		dev_dbg(dev, "failed to unlock dimm: %d\n", rc);
 
-
 	/*
 	 * EACCES failures reading the namespace label-area-properties
 	 * are interpreted as the DIMM capacity being locked but the
diff --git a/drivers/nvdimm/dimm_devs.c b/drivers/nvdimm/dimm_devs.c
index cb5598b3c389..873df96795b0 100644
--- a/drivers/nvdimm/dimm_devs.c
+++ b/drivers/nvdimm/dimm_devs.c
@@ -2,7 +2,9 @@
 /*
  * Copyright(c) 2013-2015 Intel Corporation. All rights reserved.
  */
+
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/moduleparam.h>
 #include <linux/vmalloc.h>
 #include <linux/device.h>
diff --git a/drivers/nvdimm/label.c b/drivers/nvdimm/label.c
index 5700d9b35b8f..bf58357927c4 100644
--- a/drivers/nvdimm/label.c
+++ b/drivers/nvdimm/label.c
@@ -972,7 +972,6 @@ static int __blk_label_update(struct nd_region *nd_region,
 	}
 	/* from here on we need to abort on error */
 
-
 	/* assign all resources to the namespace before writing the labels */
 	nsblk->res = NULL;
 	nsblk->num_resources = 0;
diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/namespace_devs.c
index 2bf4b6344926..600df84b4d2d 100644
--- a/drivers/nvdimm/namespace_devs.c
+++ b/drivers/nvdimm/namespace_devs.c
@@ -367,7 +367,6 @@ resource_size_t nd_namespace_blk_validate(struct nd_namespace_blk *nsblk)
 }
 EXPORT_SYMBOL(nd_namespace_blk_validate);
 
-
 static int nd_namespace_label_update(struct nd_region *nd_region,
 				     struct device *dev)
 {
@@ -543,7 +542,6 @@ static resource_size_t init_dpa_allocation(struct nd_label_id *label_id,
 	return rc ? n : 0;
 }
 
-
 /**
  * space_valid() - validate free dpa space against constraints
  * @nd_region: hosting region of the free space
@@ -2009,7 +2007,6 @@ static struct device *create_namespace_pmem(struct nd_region *nd_region,
 		if (namespace_label_has(ndd, abstraction_guid))
 			nspm->nsio.common.claim_class
 				= to_nvdimm_cclass(&label0->abstraction_guid);
-
 	}
 
 	if (!nspm->alt_name || !nspm->uuid) {
@@ -2217,7 +2214,6 @@ static int add_namespace_resource(struct nd_region *nd_region,
 static struct device *create_namespace_blk(struct nd_region *nd_region,
 					   struct nd_namespace_label *nd_label, int count)
 {
-
 	struct nd_mapping *nd_mapping = &nd_region->mapping[0];
 	struct nd_interleave_set *nd_set = nd_region->nd_set;
 	struct nvdimm_drvdata *ndd = to_ndd(nd_mapping);
@@ -2362,7 +2358,6 @@ static struct device **scan_labels(struct nd_region *nd_region)
 			}
 		} else
 			devs[count++] = dev;
-
 	}
 
 	dev_dbg(&nd_region->dev, "discovered %d %s namespace%s\n",
diff --git a/drivers/nvdimm/nd-core.h b/drivers/nvdimm/nd-core.h
index b9163fff27b0..3b48fba4629b 100644
--- a/drivers/nvdimm/nd-core.h
+++ b/drivers/nvdimm/nd-core.h
@@ -66,6 +66,7 @@ static inline unsigned long nvdimm_security_flags(
 		      (unsigned long long)flags);
 	return flags;
 }
+
 int nvdimm_security_freeze(struct nvdimm *nvdimm);
 #if IS_ENABLED(CONFIG_NVDIMM_KEYS)
 ssize_t nvdimm_security_store(struct device *dev, const char *buf, size_t len);
@@ -76,6 +77,7 @@ static inline ssize_t nvdimm_security_store(struct device *dev,
 {
 	return -EOPNOTSUPP;
 }
+
 static inline void nvdimm_security_overwrite_query(struct work_struct *work)
 {
 }
@@ -106,10 +108,12 @@ static inline bool is_nd_region(struct device *dev)
 {
 	return is_nd_pmem(dev) || is_nd_blk(dev) || is_nd_volatile(dev);
 }
+
 static inline bool is_memory(struct device *dev)
 {
 	return is_nd_pmem(dev) || is_nd_volatile(dev);
 }
+
 struct nvdimm_bus *walk_to_nvdimm_bus(struct device *nd_dev);
 int __init nvdimm_bus_init(void);
 void nvdimm_bus_exit(void);
diff --git a/drivers/nvdimm/nd.h b/drivers/nvdimm/nd.h
index 1636061b1f93..d434041ca2e5 100644
--- a/drivers/nvdimm/nd.h
+++ b/drivers/nvdimm/nd.h
@@ -108,6 +108,7 @@ struct nd_percpu_lane {
 enum nd_label_flags {
 	ND_LABEL_REAP,
 };
+
 struct nd_label_ent {
 	struct list_head list;
 	unsigned long flags;
@@ -384,11 +385,13 @@ static inline int nvdimm_setup_pfn(struct nd_pfn *nd_pfn,
 {
 	return -ENXIO;
 }
+
 static inline int devm_nsio_enable(struct device *dev,
 				   struct nd_namespace_io *nsio)
 {
 	return -ENXIO;
 }
+
 static inline void devm_nsio_disable(struct device *dev,
 				     struct nd_namespace_io *nsio)
 {
@@ -409,12 +412,14 @@ static inline bool nd_iostat_start(struct bio *bio, unsigned long *start)
 			      &disk->part0);
 	return true;
 }
+
 static inline void nd_iostat_end(struct bio *bio, unsigned long start)
 {
 	struct gendisk *disk = bio->bi_disk;
 
 	generic_end_io_acct(disk->queue, bio_op(bio), &disk->part0, start);
 }
+
 static inline bool is_bad_pmem(struct badblocks *bb, sector_t sector,
 			       unsigned int len)
 {
@@ -428,6 +433,7 @@ static inline bool is_bad_pmem(struct badblocks *bb, sector_t sector,
 
 	return false;
 }
+
 resource_size_t nd_namespace_blk_validate(struct nd_namespace_blk *nsblk);
 const u8 *nd_dev_to_uuid(struct device *dev);
 bool pmem_should_map_pages(struct device *dev);
diff --git a/drivers/nvdimm/nd_virtio.c b/drivers/nvdimm/nd_virtio.c
index e4f553633759..f09541bf3d5d 100644
--- a/drivers/nvdimm/nd_virtio.c
+++ b/drivers/nvdimm/nd_virtio.c
@@ -68,7 +68,6 @@ static int virtio_pmem_flush(struct nd_region *nd_region)
 	 */
 	while ((err = virtqueue_add_sgs(vpmem->req_vq, sgs, 1, 1, req_data,
 					GFP_ATOMIC)) == -ENOSPC) {
-
 		dev_info(&vdev->dev, "failed to send command to virtio pmem device, no free slots in the virtqueue\n");
 		req_data->wq_buf_avail = false;
 		list_add_tail(&req_data->list, &vpmem->req_list);
diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_devs.c
index 9265a2b0018c..76b08b64b0b1 100644
--- a/drivers/nvdimm/region_devs.c
+++ b/drivers/nvdimm/region_devs.c
@@ -1141,6 +1141,7 @@ int nvdimm_flush(struct nd_region *nd_region, struct bio *bio)
 
 	return rc;
 }
+
 /**
  * nvdimm_flush - flush any posted write queues between the cpu and pmem media
  * @nd_region: blk or interleaved pmem region
diff --git a/drivers/nvdimm/security.c b/drivers/nvdimm/security.c
index ac23cd4480bd..13bc5d54f0b6 100644
--- a/drivers/nvdimm/security.c
+++ b/drivers/nvdimm/security.c
@@ -135,7 +135,6 @@ static const void *nvdimm_get_user_key_payload(struct nvdimm *nvdimm,
 	return key_data(*key);
 }
 
-
 static int nvdimm_key_revalidate(struct nvdimm *nvdimm)
 {
 	struct key *key;
@@ -439,7 +438,6 @@ void __nvdimm_security_overwrite_query(struct nvdimm *nvdimm)
 
 	rc = nvdimm->sec.ops->query_overwrite(nvdimm);
 	if (rc == -EBUSY) {
-
 		/* setup delayed work again */
 		tmo += 10;
 		queue_delayed_work(system_wq, &nvdimm->dwork, tmo * HZ);
-- 
2.15.0

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

  parent reply	other threads:[~2019-09-12  2:55 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-12  2:54 [PATCH 00/13] nvdimm: Use more common kernel coding style Joe Perches
2019-09-12  2:54 ` [PATCH 01/13] nvdimm: Use more typical whitespace Joe Perches
2019-09-12 12:17   ` Christoph Hellwig
2019-09-12 15:01     ` Joe Perches
2019-09-16  7:07       ` Christoph Hellwig
2019-09-12  2:54 ` [PATCH 02/13] nvdimm: Move logical continuations to previous line Joe Perches
2019-09-12  2:54 ` [PATCH 03/13] nvdimm: Use octal permissions Joe Perches
2019-09-12  2:54 ` [PATCH 04/13] nvdimm: Use a more common kernel spacing style Joe Perches
2019-09-12  2:54 ` [PATCH 05/13] nvdimm: Use "unsigned int" in preference to "unsigned" Joe Perches
2019-09-12  2:54 ` Joe Perches [this message]
2019-09-12  2:54 ` [PATCH 07/13] nvdimm: Use typical kernel brace styles Joe Perches
2019-09-12  2:54 ` [PATCH 08/13] nvdimm: Use typical kernel style indentation Joe Perches
2019-09-12  2:54 ` [PATCH 09/13] nvdimm: btt.h: Neaten #defines to improve readability Joe Perches
2019-09-12  2:54 ` [PATCH 10/13] nvdimm: namespace_devs: Move assignment operators Joe Perches
2019-09-12  2:54 ` [PATCH 11/13] nvdimm: Use more common logic testing styles and bare ; positions Joe Perches
2019-09-12  3:52   ` Verma, Vishal L
2019-09-12  2:54 ` [PATCH 12/13] nvdimm: namespace_devs: Change progess typo to progress Joe Perches
2019-09-12  2:54 ` [PATCH 13/13] nvdimm: Miscellaneous neatening Joe Perches
2019-09-12  8:00 ` [PATCH 00/13] nvdimm: Use more common kernel coding style Dan Williams
2019-09-12  8:15   ` Joe Perches
2019-09-12  8:42     ` Miguel Ojeda
2019-09-12 14:00 ` Jeff Moyer
2019-09-12 14:06   ` Johannes Thumshirn
2019-09-12 14:35     ` Dan Williams
2019-09-12 14:21   ` Miguel Ojeda
2019-09-12 21:08     ` Joe Perches
2019-09-12 21:58       ` Miguel Ojeda
2019-09-12 22:15         ` Joe Perches
2019-09-12 22:38         ` Joe Perches
2019-09-12 23:00           ` Nick Desaulniers
2019-09-12 23:07             ` Joe Perches
2019-09-12 22:58         ` Nick Desaulniers
2019-09-12 23:26         ` clang-format and 'clang-format on' and 'clang-format off' Joe Perches
2019-09-15 18:25           ` Miguel Ojeda

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=025c3fdcb7c6a23f73486d5c7cd515a7bda37a04.1568256707.git.joe@perches.com \
    --to=joe@perches.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=ira.weiny@intel.com \
    --cc=keith.busch@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=vishal.l.verma@intel.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).