mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <bart.vanassche@sandisk.com>
To: Dan Williams <dan.j.williams@intel.com>, "axboe@fb.com" <axboe@fb.com>
Cc: "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 08:20:04 +0200	[thread overview]
Message-ID: <a5024a02-adfb-c027-7a40-417cc10911af@sandisk.com> (raw)
In-Reply-To: <146654197737.34694.9376917839573236856.stgit@dwillia2-desk3.amr.corp.intel.com>

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.

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

Thanks,

Bart.

  reply	other threads:[~2016-06-22  6:20 UTC|newest]

Thread overview: 10+ 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 ` [PATCH v4 1/5] block: introduce device_add_disk() Dan Williams
2016-06-21 20:46 ` [PATCH v4 2/5] mmc: move 'parent' tracking to mmc_blk_data Dan Williams
2016-06-22  6:38   ` Bart Van Assche
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-22  6:20   ` Bart Van Assche [this message]
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 ` [PATCH v4 5/5] block: remove ->driverfs_dev 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=a5024a02-adfb-c027-7a40-417cc10911af@sandisk.com \
    --to=bart.vanassche@sandisk.com \
    --cc=axboe@fb.com \
    --cc=dan.j.williams@intel.com \
    --cc=hch@lst.de \
    --cc=jdike@addtoit.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@ml01.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 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®