[RFC PATCH v3 1/3] drivers/accel: define kconfig and register a new major
Oded Gabbay
ogabbay at kernel.org
Mon Nov 7 21:05:34 UTC 2022
On Mon, Nov 7, 2022 at 6:12 PM Jeffrey Hugo <quic_jhugo at quicinc.com> wrote:
>
> On 11/6/2022 2:02 PM, Oded Gabbay wrote:
> > +int __init accel_core_init(void)
> > +{
> > + int ret;
> > +
> > + ret = accel_sysfs_init();
> > + if (ret < 0) {
> > + DRM_ERROR("Cannot create ACCEL class: %d\n", ret);
> > + goto error;
> > + }
> > +
> > + accel_debugfs_root = debugfs_create_dir("accel", NULL);
> > +
> > + ret = register_chrdev(ACCEL_MAJOR, "accel", &accel_stub_fops);
> > + if (ret < 0)
> > + goto error;
>
> We are not jumping over anything here. Seems like this whole if block
> could just be removed.
correct, will be fixed.
>
> > +
> > +error:
> > + /* Any cleanup will be done in drm_core_exit() that will call
> > + * to accel_core_exit()
> > + */
>
> This doesn't look like the standard multi-line comment style. Are we
> going to say that the accel subsystem follows net and differs from the
> kernel standard?
I'll change it to the kernel standard.
Thx,
Oded
>
> > + return ret;
> > +}
More information about the dri-devel
mailing list