@@ -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 */
@@ -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)
@@ -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
@@ -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>
@@ -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;
@@ -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",
@@ -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);
@@ -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);
@@ -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);
@@ -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
@@ -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);
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(-)