> -----Original Message-----
> From: Dan Carpenter [mailto:dan.carpen...@oracle.com]
> Sent: Friday, May 19, 2017 04:27
> To: Jork Loeser <jork.loe...@microsoft.com>
> Cc: helg...@kernel.org; linux-...@vger.kernel.org; linux-
> ker...@vger.kernel.org; de...@linuxdriverproject.org; o...@aepfle.de;
> a...@canonical.com; vkuzn...@redhat.com; jasow...@redhat.com;
> leann.ogasaw...@canonical.com; marcelo.ce...@canonical.com; Stephen
> Hemminger <sthem...@microsoft.com>
> Subject: Re: [PATCH 4/4] Hyper-V vPCI: use vPCI protocol version 1.2
> 
> Minor nits only.

> > +#define HV_X64_EX_PROCESSOR_MASKS_RECOMMENDED      (1 << 11)
> 
> Use BIT(11).  I thought checkpatch.pl complains about this but I guess that's 
> only
> with the --strict option.

Not addressing here as per Stephen's comment - this use is prevalent in the 
current code.

> > @@ -900,36 +1074,42 @@ static void hv_compose_msi_msg(struct irq_data
 [...]
> > +   switch (pci_protocol_version) {
> > +   case PCI_PROTOCOL_VERSION_1_1:
[...]
> > +   default:
> > +           /* As we only negotiate protocol versions known to this driver,
> > +            * this path should never hit. However, this is it not a hot
> > +            * path so we print a message to aid future updates.
> > +            */
> > +           dev_err(&hbus->hdev->device,
> > +                   "Unexpected vPCI protocol, update driver.");
> 
> We should check the protocol version in probe() instead of here.

It is checked in probe(). The catch-all is merely a helper in case future 
updates miss adapting. 

Regards,
Jork
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to