Thread (13 messages) 13 messages, 4 authors, 2023-09-28

Re: [PATCH v3 15/15] Drivers: hv: Add modules to expose /dev/mshv to VMMs running on Hyper-V

From: Greg KH <gregkh@linuxfoundation.org>
Date: 2023-09-26 06:31:15
Also in: linux-arch, linux-hyperv, linux-patches, lkml

On Tue, Sep 26, 2023 at 05:54:34AM +0000, Wei Liu wrote:
On Tue, Sep 26, 2023 at 06:52:46AM +0200, Greg KH wrote:
quoted
On Mon, Sep 25, 2023 at 05:07:24PM -0700, Nuno Das Neves wrote:
quoted
On 9/23/2023 12:58 AM, Greg KH wrote:
quoted
Also, drivers should never call pr_*() calls, always use the proper
dev_*() calls instead.
We only use struct device in one place in this driver, I think that is the
only place it makes sense to use dev_*() over pr_*() calls.
Then the driver needs to be fixed to use struct device properly so that
you do have access to it when you want to print messages.  That's a
valid reason to pass around your device structure when needed.
Greg, ACRN and Nitro drivers do not pass around the device structure.
Instead, they rely on a global struct device. We can follow the same.
A single global struct device is wrong, please don't do that.

Don't copy bad design patterns from other drivers, be better :)

thanks,

greg k-h

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help