…
> loose coupling, but still be able to works togather to provide a unified

  use loose?          should?          work together?            an?


…
> Add a dummy driver for the GPU, it functional as a subcomponent as well.

                                     is?


Please improve your change descriptions considerably.


…
> +++ b/drivers/gpu/drm/loongson/loongson_module.c
> @@ -29,8 +29,15 @@ static int __init loongson_module_init(void)
>       if (ret)
>               return ret;
>
> +     ret = pci_register_driver(&loong_gpu_pci_driver);
> +     if (ret) {
> +             platform_driver_unregister(&lsdc_output_port_platform_driver);
> +             return ret;
> +     }
> +
>       ret = pci_register_driver(&lsdc_pci_driver);
>       if (ret) {
> +             pci_unregister_driver(&loong_gpu_pci_driver);
>               platform_driver_unregister(&lsdc_output_port_platform_driver);
>               return ret;
>       }

How do you think about to use another goto chain for common exception handling?
https://wiki.sei.cmu.edu/confluence/display/c/MEM12-C.+Consider+using+a+goto+chain+when+leaving+a+function+on+error+when+using+and+releasing+resources

Would you become interested in the application of scope-based resource 
management here?


> @@ -43,6 +50,8 @@ static void __exit loongson_module_exit(void)
>  {
>       pci_unregister_driver(&lsdc_pci_driver);
>
> +     pci_unregister_driver(&loong_gpu_pci_driver);
> +
>       platform_driver_unregister(&lsdc_output_port_platform_driver);
>  }

I suggest to avoid blank lines for this function implementation.

Regards,
Markus

Reply via email to