All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
	Richard Weinberger <richard@nod.at>,
	Jeff Dike <jdike@addtoit.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"axboe@fb.com" <axboe@fb.com>, "hch@lst.de" <hch@lst.de>
Subject: Re: [PATCH v4 3/5] um: track 'parent' device in a local variable
Date: Wed, 22 Jun 2016 07:32:26 -0700	[thread overview]
Message-ID: <CAPcyv4gmNtnS47YDOCw6EjQ4Kz7OF8TN+j95cQxU4ZWmTUXZyw@mail.gmail.com> (raw)
In-Reply-To: <a5024a02-adfb-c027-7a40-417cc10911af@sandisk.com>

On Tue, Jun 21, 2016 at 11:20 PM, Bart Van Assche
<bart.vanassche@sandisk.com> wrote:
> On 06/21/2016 10:47 PM, Dan Williams wrote:
>>
>> In preparation for the removal of 'driverfs_dev' from 'struct gendisk'
>> use a local variable to track the parented vs un-parented case in
>> ubd_disk_register().
>>
>> Cc: Jeff Dike <jdike@addtoit.com>
>> Cc: Richard Weinberger <richard@nod.at>
>> Reported-by: Bart Van Assche <bart.vanassche@sandisk.com>
>> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
>> ---
>>  arch/um/drivers/ubd_kern.c |    5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
>> index ef6b4d960bad..8ec7b4112f55 100644
>> --- a/arch/um/drivers/ubd_kern.c
>> +++ b/arch/um/drivers/ubd_kern.c
>> @@ -801,6 +801,7 @@ static void ubd_device_release(struct device *dev)
>>  static int ubd_disk_register(int major, u64 size, int unit,
>>                              struct gendisk **disk_out)
>>  {
>> +       struct device *dev = NULL;
>>         struct gendisk *disk;
>>
>>         disk = alloc_disk(1 << UBD_SHIFT);
>> @@ -823,12 +824,12 @@ static int ubd_disk_register(int major, u64 size,
>> int unit,
>>                 ubd_devs[unit].pdev.dev.release = ubd_device_release;
>>                 dev_set_drvdata(&ubd_devs[unit].pdev.dev,
>> &ubd_devs[unit]);
>>                 platform_device_register(&ubd_devs[unit].pdev);
>> -               disk->driverfs_dev = &ubd_devs[unit].pdev.dev;
>> +               dev = &ubd_devs[unit].pdev.dev;
>>         }
>>
>>         disk->private_data = &ubd_devs[unit];
>>         disk->queue = ubd_devs[unit].queue;
>> -       add_disk(disk);
>> +       device_add_disk(dev, disk);
>>
>>         *disk_out = disk;
>>         return 0;
>
>
> Hello Dan,
>
> The Reported-by tag is intended to give people credit who find bugs in the
> upstream kernel. What I reported was a bug not in the upstream kernel but in
> a previous version of this patch series so I think the "Reported-by" tag can
> be left out from this patch.

I see nothing wrong with using it to give credit to patches during
review, I also do this when static analysis finds a problem in a patch
before it gets upstream.  If the report fixes upstream code then I
additionally add a "Fixes" tag.  If you'd rather I don't list you as
reported-by that's fine, but there's nothing in the definition of
Reported-by in Documentation/SubmittingPatches that requires the bug
to be upstream first.

> Additionally, please consider to use a more descriptive name instead of
> "dev", e.g. "parent".

Sure, will do.
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

WARNING: multiple messages have this Message-ID (diff)
From: Dan Williams <dan.j.williams@intel.com>
To: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: "axboe@fb.com" <axboe@fb.com>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
	Richard Weinberger <richard@nod.at>,
	Jeff Dike <jdike@addtoit.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"hch@lst.de" <hch@lst.de>
Subject: Re: [PATCH v4 3/5] um: track 'parent' device in a local variable
Date: Wed, 22 Jun 2016 07:32:26 -0700	[thread overview]
Message-ID: <CAPcyv4gmNtnS47YDOCw6EjQ4Kz7OF8TN+j95cQxU4ZWmTUXZyw@mail.gmail.com> (raw)
In-Reply-To: <a5024a02-adfb-c027-7a40-417cc10911af@sandisk.com>

On Tue, Jun 21, 2016 at 11:20 PM, Bart Van Assche
<bart.vanassche@sandisk.com> wrote:
> On 06/21/2016 10:47 PM, Dan Williams wrote:
>>
>> In preparation for the removal of 'driverfs_dev' from 'struct gendisk'
>> use a local variable to track the parented vs un-parented case in
>> ubd_disk_register().
>>
>> Cc: Jeff Dike <jdike@addtoit.com>
>> Cc: Richard Weinberger <richard@nod.at>
>> Reported-by: Bart Van Assche <bart.vanassche@sandisk.com>
>> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
>> ---
>>  arch/um/drivers/ubd_kern.c |    5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
>> index ef6b4d960bad..8ec7b4112f55 100644
>> --- a/arch/um/drivers/ubd_kern.c
>> +++ b/arch/um/drivers/ubd_kern.c
>> @@ -801,6 +801,7 @@ static void ubd_device_release(struct device *dev)
>>  static int ubd_disk_register(int major, u64 size, int unit,
>>                              struct gendisk **disk_out)
>>  {
>> +       struct device *dev = NULL;
>>         struct gendisk *disk;
>>
>>         disk = alloc_disk(1 << UBD_SHIFT);
>> @@ -823,12 +824,12 @@ static int ubd_disk_register(int major, u64 size,
>> int unit,
>>                 ubd_devs[unit].pdev.dev.release = ubd_device_release;
>>                 dev_set_drvdata(&ubd_devs[unit].pdev.dev,
>> &ubd_devs[unit]);
>>                 platform_device_register(&ubd_devs[unit].pdev);
>> -               disk->driverfs_dev = &ubd_devs[unit].pdev.dev;
>> +               dev = &ubd_devs[unit].pdev.dev;
>>         }
>>
>>         disk->private_data = &ubd_devs[unit];
>>         disk->queue = ubd_devs[unit].queue;
>> -       add_disk(disk);
>> +       device_add_disk(dev, disk);
>>
>>         *disk_out = disk;
>>         return 0;
>
>
> Hello Dan,
>
> The Reported-by tag is intended to give people credit who find bugs in the
> upstream kernel. What I reported was a bug not in the upstream kernel but in
> a previous version of this patch series so I think the "Reported-by" tag can
> be left out from this patch.

I see nothing wrong with using it to give credit to patches during
review, I also do this when static analysis finds a problem in a patch
before it gets upstream.  If the report fixes upstream code then I
additionally add a "Fixes" tag.  If you'd rather I don't list you as
reported-by that's fine, but there's nothing in the definition of
Reported-by in Documentation/SubmittingPatches that requires the bug
to be upstream first.

> Additionally, please consider to use a more descriptive name instead of
> "dev", e.g. "parent".

Sure, will do.

WARNING: multiple messages have this Message-ID (diff)
From: Dan Williams <dan.j.williams@intel.com>
To: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: "axboe@fb.com" <axboe@fb.com>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@ml01.01.org>,
	Richard Weinberger <richard@nod.at>,
	Jeff Dike <jdike@addtoit.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"hch@lst.de" <hch@lst.de>
Subject: Re: [PATCH v4 3/5] um: track 'parent' device in a local variable
Date: Wed, 22 Jun 2016 07:32:26 -0700	[thread overview]
Message-ID: <CAPcyv4gmNtnS47YDOCw6EjQ4Kz7OF8TN+j95cQxU4ZWmTUXZyw@mail.gmail.com> (raw)
In-Reply-To: <a5024a02-adfb-c027-7a40-417cc10911af@sandisk.com>

On Tue, Jun 21, 2016 at 11:20 PM, Bart Van Assche
<bart.vanassche@sandisk.com> wrote:
> On 06/21/2016 10:47 PM, Dan Williams wrote:
>>
>> In preparation for the removal of 'driverfs_dev' from 'struct gendisk'
>> use a local variable to track the parented vs un-parented case in
>> ubd_disk_register().
>>
>> Cc: Jeff Dike <jdike@addtoit.com>
>> Cc: Richard Weinberger <richard@nod.at>
>> Reported-by: Bart Van Assche <bart.vanassche@sandisk.com>
>> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
>> ---
>>  arch/um/drivers/ubd_kern.c |    5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
>> index ef6b4d960bad..8ec7b4112f55 100644
>> --- a/arch/um/drivers/ubd_kern.c
>> +++ b/arch/um/drivers/ubd_kern.c
>> @@ -801,6 +801,7 @@ static void ubd_device_release(struct device *dev)
>>  static int ubd_disk_register(int major, u64 size, int unit,
>>                              struct gendisk **disk_out)
>>  {
>> +       struct device *dev = NULL;
>>         struct gendisk *disk;
>>
>>         disk = alloc_disk(1 << UBD_SHIFT);
>> @@ -823,12 +824,12 @@ static int ubd_disk_register(int major, u64 size,
>> int unit,
>>                 ubd_devs[unit].pdev.dev.release = ubd_device_release;
>>                 dev_set_drvdata(&ubd_devs[unit].pdev.dev,
>> &ubd_devs[unit]);
>>                 platform_device_register(&ubd_devs[unit].pdev);
>> -               disk->driverfs_dev = &ubd_devs[unit].pdev.dev;
>> +               dev = &ubd_devs[unit].pdev.dev;
>>         }
>>
>>         disk->private_data = &ubd_devs[unit];
>>         disk->queue = ubd_devs[unit].queue;
>> -       add_disk(disk);
>> +       device_add_disk(dev, disk);
>>
>>         *disk_out = disk;
>>         return 0;
>
>
> Hello Dan,
>
> The Reported-by tag is intended to give people credit who find bugs in the
> upstream kernel. What I reported was a bug not in the upstream kernel but in
> a previous version of this patch series so I think the "Reported-by" tag can
> be left out from this patch.

I see nothing wrong with using it to give credit to patches during
review, I also do this when static analysis finds a problem in a patch
before it gets upstream.  If the report fixes upstream code then I
additionally add a "Fixes" tag.  If you'd rather I don't list you as
reported-by that's fine, but there's nothing in the definition of
Reported-by in Documentation/SubmittingPatches that requires the bug
to be upstream first.

> Additionally, please consider to use a more descriptive name instead of
> "dev", e.g. "parent".

Sure, will do.

  reply	other threads:[~2016-06-22 14:32 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-21 20:46 [PATCH v4 0/5] Introduce device_add_disk() to kill gendisk.driverfs_dev Dan Williams
2016-06-21 20:46 ` Dan Williams
2016-06-21 20:46 ` [PATCH v4 1/5] block: introduce device_add_disk() Dan Williams
2016-06-21 20:46   ` Dan Williams
2016-06-21 20:46   ` Dan Williams
2016-06-21 20:46 ` [PATCH v4 2/5] mmc: move 'parent' tracking to mmc_blk_data Dan Williams
2016-06-21 20:46   ` Dan Williams
2016-06-21 20:46   ` Dan Williams
2016-06-22  6:38   ` Bart Van Assche
2016-06-22  6:38     ` Bart Van Assche
2016-06-22  6:38     ` Bart Van Assche
2016-06-22 17:03     ` Dan Williams
2016-06-22 17:03       ` Dan Williams
2016-06-22 17:03       ` Dan Williams
2016-06-21 20:46 ` [PATCH v4 3/5] um: track 'parent' device in a local variable Dan Williams
2016-06-21 20:46   ` Dan Williams
2016-06-21 20:46   ` Dan Williams
2016-06-22  6:20   ` Bart Van Assche
2016-06-22  6:20     ` Bart Van Assche
2016-06-22  6:20     ` Bart Van Assche
2016-06-22 14:32     ` Dan Williams [this message]
2016-06-22 14:32       ` Dan Williams
2016-06-22 14:32       ` Dan Williams
2016-06-21 20:46 ` [PATCH v4 4/5] block: convert to device_add_disk() Dan Williams
2016-06-21 20:46   ` Dan Williams
2016-06-21 20:46   ` Dan Williams
2016-06-21 20:46 ` [PATCH v4 5/5] block: remove ->driverfs_dev Dan Williams
2016-06-21 20:46   ` Dan Williams
2016-06-21 20:46   ` Dan Williams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPcyv4gmNtnS47YDOCw6EjQ4Kz7OF8TN+j95cQxU4ZWmTUXZyw@mail.gmail.com \
    --to=dan.j.williams@intel.com \
    --cc=axboe@fb.com \
    --cc=bart.vanassche@sandisk.com \
    --cc=hch@lst.de \
    --cc=jdike@addtoit.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=richard@nod.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.