devcoredump: use memory_read_from_buffer
Subsystems (2)
Johannes Berg
maintainerPATCH 1/2 devcoredump: use memory_read_from_buffer
From: Akinobu Mita <[email protected]>
Use memory_read_from_buffer() to simplify devcd_readv().
Reviewed-by Chaitanya Kulkarni <[email protected]>
Reviewed-by Johannes Berg <[email protected]>
Signed-off-by Akinobu Mita <[email protected]>
Signed-off-by Johannes Berg <[email protected]>
--- drivers/base/devcoredump.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-)
drivers/base/devcoredump.c +1 -10
@@ -164,16 +164,7 @@ static struct class devcd_class = {static ssize_t devcd_readv (char *buffer,loff_t offset,size_t count,void *data,size_t datalen) { -if (offset > datalen) -return -EINVAL ; - -if (offset + count > datalen) - count = datalen - offset; - -if (count) -memcpy (buffer, ((u8 *)data) + offset, count); - -return count; +return memory_read_from_buffer (buffer, count, &offset, data, datalen); }static void devcd_freev (void *data)
Signature · 1 line
2.20.1
Johannes Berg
maintainerPATCH 2/2 devcoredump: fix typo in comment
From: Akinobu Mita <[email protected]>
s/dev_coredumpmsg/dev_coredumpsg/ in the kernel-doc
Reviewed-by Chaitanya Kulkarni <[email protected]>
Signed-off-by Akinobu Mita <[email protected]>
Signed-off-by Johannes Berg <[email protected]>
--- drivers/base/devcoredump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/devcoredump.c +1 -1
@@ -314,7 +314,7 @@ void dev_coredumpm(struct device *dev, struct module *owner,EXPORT_SYMBOL_GPL (dev_coredumpm);/** -* dev_coredumpmsg - create device coredump that uses scatterlist as data +* dev_coredumpsg - create device coredump that uses scatterlist as data * parameter * @dev: the struct device for the crashed device * @table: the dump data
Signature · 1 line
2.20.1