Re: [PATCH v3 02/30] drivers: hv: dxgkrnl: Driver initialization and loading

From: Iouri Tarassov
Date: Wed Mar 02 2022 - 18:52:21 EST



On 3/1/2022 12:45 PM, Greg KH wrote:
> On Tue, Mar 01, 2022 at 11:45:49AM -0800, Iouri Tarassov wrote:
> > - Create skeleton and add basic functionality for the
> > hyper-v compute device driver (dxgkrnl).
> >
> > +
> > +#undef pr_fmt
> > +#define pr_fmt(fmt) "dxgk: " fmt
>
> Use the dev_*() print functions, you are a driver, and you always have a
> pointer to a struct device. There's no need to ever call pr_*().
>

There is no struct device during module initialization until the
/dev/dxg device is created. Is it ok to use pr_* functions in this case?
Should dev_*(NULL,...) be used? I see other drivers use the pr_*
functions in this case (mips.c as an example).


Thanks

Iouri

> thanks,
>
> greg k-h