diff options
author | Matias Bjørling <mb@lightnvm.io> | 2018-03-30 00:05:24 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-03-29 17:29:09 -0600 |
commit | b65125fa57973baeabc3a6fe2f8c1179bd45fd95 (patch) | |
tree | 7abf3254448518a02982235031e12e32cb631b57 /drivers/nvme/host/lightnvm.c | |
parent | 5565b0ca50b5b82e0439f6e4dc7fbb122cd0b025 (diff) | |
download | lwn-b65125fa57973baeabc3a6fe2f8c1179bd45fd95.tar.gz lwn-b65125fa57973baeabc3a6fe2f8c1179bd45fd95.zip |
lightnvm: remove function name in strings
For the sysfs functions, the function names are embedded into their
error strings. If the function name later changes, the string may
not be updated accordingly. Update the strings to use __func__
to avoid this.
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme/host/lightnvm.c')
-rw-r--r-- | drivers/nvme/host/lightnvm.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c index ffd64a83c8c3..41279da799ed 100644 --- a/drivers/nvme/host/lightnvm.c +++ b/drivers/nvme/host/lightnvm.c @@ -1028,8 +1028,8 @@ static ssize_t nvm_dev_attr_show(struct device *dev, } else { return scnprintf(page, PAGE_SIZE, - "Unhandled attr(%s) in `nvm_dev_attr_show`\n", - attr->name); + "Unhandled attr(%s) in `%s`\n", + attr->name, __func__); } } @@ -1103,8 +1103,8 @@ static ssize_t nvm_dev_attr_show_12(struct device *dev, return scnprintf(page, PAGE_SIZE, "%u\n", NVM_MAX_VLBA); } else { return scnprintf(page, PAGE_SIZE, - "Unhandled attr(%s) in `nvm_dev_attr_show_12`\n", - attr->name); + "Unhandled attr(%s) in `%s`\n", + attr->name, __func__); } } @@ -1149,8 +1149,8 @@ static ssize_t nvm_dev_attr_show_20(struct device *dev, return scnprintf(page, PAGE_SIZE, "%u\n", geo->tbem); } else { return scnprintf(page, PAGE_SIZE, - "Unhandled attr(%s) in `nvm_dev_attr_show_20`\n", - attr->name); + "Unhandled attr(%s) in `%s`\n", + attr->name, __func__); } } |