* [PATCH 1/2] devcoredump: use memory_read_from_buffer
@ 2019-07-31 10:00 Johannes Berg
2019-07-31 10:00 ` [PATCH 2/2] devcoredump: fix typo in comment Johannes Berg
0 siblings, 1 reply; 10+ messages in thread
From: Johannes Berg @ 2019-07-31 10:00 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Akinobu Mita, Chaitanya Kulkarni
From: Akinobu Mita <akinobu.mita@gmail.com>
Use memory_read_from_buffer() to simplify devcd_readv().
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Link: https://lore.kernel.org/r/1564243146-5681-2-git-send-email-akinobu.mita@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
drivers/base/devcoredump.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/base/devcoredump.c b/drivers/base/devcoredump.c
index f1a3353f3494..3c960a63062f 100644
--- a/drivers/base/devcoredump.c
+++ b/drivers/base/devcoredump.c
@@ -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)
--
2.20.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 2/2] devcoredump: fix typo in comment
2019-07-31 10:00 [PATCH 1/2] devcoredump: use memory_read_from_buffer Johannes Berg
@ 2019-07-31 10:00 ` Johannes Berg
0 siblings, 0 replies; 10+ messages in thread
From: Johannes Berg @ 2019-07-31 10:00 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, Akinobu Mita, Chaitanya Kulkarni
From: Akinobu Mita <akinobu.mita@gmail.com>
s/dev_coredumpmsg/dev_coredumpsg/ in the kernel-doc
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Link: https://lore.kernel.org/r/1564243146-5681-3-git-send-email-akinobu.mita@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
drivers/base/devcoredump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/devcoredump.c b/drivers/base/devcoredump.c
index 3c960a63062f..e42d0b514384 100644
--- a/drivers/base/devcoredump.c
+++ b/drivers/base/devcoredump.c
@@ -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
--
2.20.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] devcoredump: fix typo in comment
2019-07-30 17:11 ` Greg KH
@ 2019-07-30 17:14 ` Johannes Berg
0 siblings, 0 replies; 10+ messages in thread
From: Johannes Berg @ 2019-07-30 17:14 UTC (permalink / raw)
To: Greg KH
Cc: Akinobu Mita, akpm, linux-kernel, Keith Busch, Jens Axboe,
Christoph Hellwig, Sagi Grimberg, Minwoo Im, Kenneth Heitke,
Chaitanya Kulkarni
On Tue, 2019-07-30 at 19:11 +0200, Greg KH wrote:
> On Tue, Jul 30, 2019 at 06:49:12PM +0200, Johannes Berg wrote:
> > On Tue, 2019-07-30 at 18:45 +0200, Greg KH wrote:
> >
> > > > I mean, you take patches to devcoredump in general?
> > >
> > > I have no idea, run 'scripts/get_maintainer.pl' to be sure :)
> >
> > That actually points to me :-)
> >
> > So really I guess the question is how I should send these upstream? It's
> > to drivers/base/devcoredump.c and include/linux/devcoredump.h and I
> > kinda figured you wanted to see these things.
>
> Ah, sure, I can take them, I had no idea what devcoredump was. Remember
> my patch workload :)
:-)
> So send them on please.
Will do. Thanks Greg.
johannes
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] devcoredump: fix typo in comment
2019-07-30 16:49 ` Johannes Berg
@ 2019-07-30 17:11 ` Greg KH
2019-07-30 17:14 ` Johannes Berg
0 siblings, 1 reply; 10+ messages in thread
From: Greg KH @ 2019-07-30 17:11 UTC (permalink / raw)
To: Johannes Berg
Cc: Akinobu Mita, akpm, linux-kernel, Keith Busch, Jens Axboe,
Christoph Hellwig, Sagi Grimberg, Minwoo Im, Kenneth Heitke,
Chaitanya Kulkarni
On Tue, Jul 30, 2019 at 06:49:12PM +0200, Johannes Berg wrote:
> On Tue, 2019-07-30 at 18:45 +0200, Greg KH wrote:
>
> > > I mean, you take patches to devcoredump in general?
> >
> > I have no idea, run 'scripts/get_maintainer.pl' to be sure :)
>
> That actually points to me :-)
>
> So really I guess the question is how I should send these upstream? It's
> to drivers/base/devcoredump.c and include/linux/devcoredump.h and I
> kinda figured you wanted to see these things.
Ah, sure, I can take them, I had no idea what devcoredump was. Remember
my patch workload :)
So send them on please.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] devcoredump: fix typo in comment
2019-07-30 16:45 ` Greg KH
@ 2019-07-30 16:49 ` Johannes Berg
2019-07-30 17:11 ` Greg KH
0 siblings, 1 reply; 10+ messages in thread
From: Johannes Berg @ 2019-07-30 16:49 UTC (permalink / raw)
To: Greg KH
Cc: Akinobu Mita, akpm, linux-kernel, Keith Busch, Jens Axboe,
Christoph Hellwig, Sagi Grimberg, Minwoo Im, Kenneth Heitke,
Chaitanya Kulkarni
On Tue, 2019-07-30 at 18:45 +0200, Greg KH wrote:
> > I mean, you take patches to devcoredump in general?
>
> I have no idea, run 'scripts/get_maintainer.pl' to be sure :)
That actually points to me :-)
So really I guess the question is how I should send these upstream? It's
to drivers/base/devcoredump.c and include/linux/devcoredump.h and I
kinda figured you wanted to see these things.
johannes
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] devcoredump: fix typo in comment
2019-07-30 16:37 ` Johannes Berg
@ 2019-07-30 16:45 ` Greg KH
2019-07-30 16:49 ` Johannes Berg
0 siblings, 1 reply; 10+ messages in thread
From: Greg KH @ 2019-07-30 16:45 UTC (permalink / raw)
To: Johannes Berg
Cc: Akinobu Mita, akpm, linux-kernel, Keith Busch, Jens Axboe,
Christoph Hellwig, Sagi Grimberg, Minwoo Im, Kenneth Heitke,
Chaitanya Kulkarni
On Tue, Jul 30, 2019 at 06:37:56PM +0200, Johannes Berg wrote:
> On Tue, 2019-07-30 at 18:23 +0200, Greg KH wrote:
> > On Sat, Jul 27, 2019 at 08:43:21PM +0200, Johannes Berg wrote:
> > > On Sun, 2019-07-28 at 00:59 +0900, Akinobu Mita wrote:
> > > > s/dev_coredumpmsg/dev_coredumpsg/
> > >
> > > Oops, thanks
> > >
> > > Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
> > >
> > > Greg, I think before you took these patches?
> >
> > Took what patches? I don't see anything here :(
>
> I mean, you take patches to devcoredump in general?
I have no idea, run 'scripts/get_maintainer.pl' to be sure :)
> So need to resend with you included, I guess.
Please do so.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] devcoredump: fix typo in comment
2019-07-30 16:23 ` Greg KH
@ 2019-07-30 16:37 ` Johannes Berg
2019-07-30 16:45 ` Greg KH
0 siblings, 1 reply; 10+ messages in thread
From: Johannes Berg @ 2019-07-30 16:37 UTC (permalink / raw)
To: Greg KH
Cc: Akinobu Mita, akpm, linux-kernel, Keith Busch, Jens Axboe,
Christoph Hellwig, Sagi Grimberg, Minwoo Im, Kenneth Heitke,
Chaitanya Kulkarni
On Tue, 2019-07-30 at 18:23 +0200, Greg KH wrote:
> On Sat, Jul 27, 2019 at 08:43:21PM +0200, Johannes Berg wrote:
> > On Sun, 2019-07-28 at 00:59 +0900, Akinobu Mita wrote:
> > > s/dev_coredumpmsg/dev_coredumpsg/
> >
> > Oops, thanks
> >
> > Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
> >
> > Greg, I think before you took these patches?
>
> Took what patches? I don't see anything here :(
I mean, you take patches to devcoredump in general?
So need to resend with you included, I guess.
johannes
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] devcoredump: fix typo in comment
2019-07-27 18:43 ` Johannes Berg
@ 2019-07-30 16:23 ` Greg KH
2019-07-30 16:37 ` Johannes Berg
0 siblings, 1 reply; 10+ messages in thread
From: Greg KH @ 2019-07-30 16:23 UTC (permalink / raw)
To: Johannes Berg
Cc: Akinobu Mita, akpm, linux-kernel, Keith Busch, Jens Axboe,
Christoph Hellwig, Sagi Grimberg, Minwoo Im, Kenneth Heitke,
Chaitanya Kulkarni
On Sat, Jul 27, 2019 at 08:43:21PM +0200, Johannes Berg wrote:
> On Sun, 2019-07-28 at 00:59 +0900, Akinobu Mita wrote:
> > s/dev_coredumpmsg/dev_coredumpsg/
>
> Oops, thanks
>
> Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
>
> Greg, I think before you took these patches?
Took what patches? I don't see anything here :(
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] devcoredump: fix typo in comment
2019-07-27 15:59 ` [PATCH 2/2] devcoredump: fix typo in comment Akinobu Mita
@ 2019-07-27 18:43 ` Johannes Berg
2019-07-30 16:23 ` Greg KH
0 siblings, 1 reply; 10+ messages in thread
From: Johannes Berg @ 2019-07-27 18:43 UTC (permalink / raw)
To: Akinobu Mita, akpm, linux-kernel, gregkh
Cc: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg,
Minwoo Im, Kenneth Heitke, Chaitanya Kulkarni
On Sun, 2019-07-28 at 00:59 +0900, Akinobu Mita wrote:
> s/dev_coredumpmsg/dev_coredumpsg/
Oops, thanks
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Greg, I think before you took these patches?
Thanks,
johannes
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 2/2] devcoredump: fix typo in comment
2019-07-27 15:59 [PATCH 0/2] devcoredump: cleanup and typo fix Akinobu Mita
@ 2019-07-27 15:59 ` Akinobu Mita
2019-07-27 18:43 ` Johannes Berg
0 siblings, 1 reply; 10+ messages in thread
From: Akinobu Mita @ 2019-07-27 15:59 UTC (permalink / raw)
To: akpm, linux-kernel
Cc: Akinobu Mita, Johannes Berg, Keith Busch, Jens Axboe,
Christoph Hellwig, Sagi Grimberg, Minwoo Im, Kenneth Heitke,
Chaitanya Kulkarni
s/dev_coredumpmsg/dev_coredumpsg/
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Keith Busch <keith.busch@intel.com>
Cc: Jens Axboe <axboe@fb.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: Minwoo Im <minwoo.im.dev@gmail.com>
Cc: Kenneth Heitke <kenneth.heitke@intel.com>
Cc: Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
---
drivers/base/devcoredump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/devcoredump.c b/drivers/base/devcoredump.c
index 3c960a6..e42d0b5 100644
--- a/drivers/base/devcoredump.c
+++ b/drivers/base/devcoredump.c
@@ -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
--
2.7.4
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2019-07-31 10:00 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-31 10:00 [PATCH 1/2] devcoredump: use memory_read_from_buffer Johannes Berg
2019-07-31 10:00 ` [PATCH 2/2] devcoredump: fix typo in comment Johannes Berg
-- strict thread matches above, loose matches on Subject: below --
2019-07-27 15:59 [PATCH 0/2] devcoredump: cleanup and typo fix Akinobu Mita
2019-07-27 15:59 ` [PATCH 2/2] devcoredump: fix typo in comment Akinobu Mita
2019-07-27 18:43 ` Johannes Berg
2019-07-30 16:23 ` Greg KH
2019-07-30 16:37 ` Johannes Berg
2019-07-30 16:45 ` Greg KH
2019-07-30 16:49 ` Johannes Berg
2019-07-30 17:11 ` Greg KH
2019-07-30 17:14 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®