All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] devcoredump: cleanup and typo fix
@ 2019-07-27 15:59 Akinobu Mita
  2019-07-27 15:59 ` [PATCH 1/2] devcoredump: use memory_read_from_buffer Akinobu Mita
  2019-07-27 15:59 ` [PATCH 2/2] devcoredump: fix typo in comment Akinobu Mita
  0 siblings, 2 replies; 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

These two patches are cleanup and typo fix for device coredump subsystem,
and these were originally a part of nvme device coredump series.  However
the series requires an overhaul because it makes nvme-pci driver
compilcated, so these two independent patches are extracted from the
series.

Akinobu Mita (2):
  devcoredump: use memory_read_from_buffer
  devcoredump: fix typo in comment

 drivers/base/devcoredump.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

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>
-- 
2.7.4


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/2] devcoredump: use memory_read_from_buffer
  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 15:59 ` [PATCH 2/2] devcoredump: fix typo in comment Akinobu Mita
  1 sibling, 0 replies; 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

Use memory_read_from_buffer() to simplify devcd_readv().

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>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.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 f1a3353..3c960a6 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.7.4


^ permalink raw reply related	[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 ` [PATCH 1/2] devcoredump: use memory_read_from_buffer Akinobu Mita
@ 2019-07-27 15:59 ` Akinobu Mita
  2019-07-27 18:43   ` Johannes Berg
  1 sibling, 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 related	[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

* 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-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-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: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: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 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

end of thread, other threads:[~2019-07-30 17:14 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-27 15:59 [PATCH 0/2] devcoredump: cleanup and typo fix Akinobu Mita
2019-07-27 15:59 ` [PATCH 1/2] devcoredump: use memory_read_from_buffer 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.