public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Parri <parri.andrea@gmail.com>
To: "Michael Kelley (LINUX)" <mikelley@microsoft.com>
Cc: KY Srinivasan <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	Wei Liu <wei.liu@kernel.org>, Dexuan Cui <decui@microsoft.com>,
	Tianyu Lan <Tianyu.Lan@microsoft.com>,
	Long Li <longli@microsoft.com>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Drivers: hv: vmbus: Fix initialization of device object in vmbus_device_register()
Date: Fri, 11 Mar 2022 16:19:57 +0100	[thread overview]
Message-ID: <20220311151957.GA39518@anparri> (raw)
In-Reply-To: <BY3PR21MB303347BCA5C489AC8C5ABEF7D70C9@BY3PR21MB3033.namprd21.prod.outlook.com>

> > ---
> >  drivers/hv/vmbus_drv.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> > index 12a2b37e87f30..65db5048b1763 100644
> > --- a/drivers/hv/vmbus_drv.c
> > +++ b/drivers/hv/vmbus_drv.c
> > @@ -2097,6 +2097,9 @@ int vmbus_device_register(struct hv_device
> > *child_device_obj)
> >  	child_device_obj->device.parent = &hv_acpi_dev->dev;
> >  	child_device_obj->device.release = vmbus_device_release;
> > 
> > +	child_device_obj->device.dma_parms = &child_device_obj->dma_parms;
> > +	child_device_obj->device.dma_mask = &child_device_obj->dma_mask;
> > +
> >  	/*
> >  	 * Register with the LDM. This will kick off the driver/device
> >  	 * binding...which will eventually call vmbus_match() and vmbus_probe()
> > @@ -2122,8 +2125,6 @@ int vmbus_device_register(struct hv_device
> > *child_device_obj)
> >  	}
> >  	hv_debug_add_dev_dir(child_device_obj);
> > 
> > -	child_device_obj->device.dma_parms = &child_device_obj->dma_parms;
> > -	child_device_obj->device.dma_mask = &child_device_obj->dma_mask;
> >  	dma_set_mask(&child_device_obj->device, DMA_BIT_MASK(64));
> 
> Is there any reason to not move dma_set_mask() as well?  That call is
> closely related to the previous two lines, so it is unexpected to have
> them separated.

The only reason was "minimize diff"; sounds like I'll move it in v2.  ;-)

Thanks,
  Andrea 

      reply	other threads:[~2022-03-11 15:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-11 13:37 [PATCH] Drivers: hv: vmbus: Fix initialization of device object in vmbus_device_register() Andrea Parri (Microsoft)
2022-03-11 15:06 ` Michael Kelley (LINUX)
2022-03-11 15:19   ` Andrea Parri [this message]

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=20220311151957.GA39518@anparri \
    --to=parri.andrea@gmail.com \
    --cc=Tianyu.Lan@microsoft.com \
    --cc=decui@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longli@microsoft.com \
    --cc=mikelley@microsoft.com \
    --cc=sthemmin@microsoft.com \
    --cc=wei.liu@kernel.org \
    /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