Re: [PATCH 2/4] drivers/misc: add Goodix GXFP5130 eSPI fingerprint sensor driver

From: Greg KH

Date: Sat Jul 18 2026 - 05:14:18 EST


On Sat, Jul 18, 2026 at 11:14:29AM +0300, Metehan Günen wrote:
> + gxfp_trace.dir = debugfs_create_dir("gxfp", NULL);
> + if (!IS_ERR_OR_NULL(gxfp_trace.dir)) {

This is not how you use debugfs.

Also, this implements a custom trace function, again, use the built-in
kernel functions for this.

This implies that the driver came from an external company that does not
have much kernel development experience, or a LLM wrote this. As there
is no copyright information on the code, which is it?

> +void gxfp_trace_exit(void)
> +{
> + if (!READ_ONCE(gxfp_trace.inited))

That's an abuse of READ_ONCE() :(

thanks,

greg k-h