Re: [PATCH v2 4/5] drm/msm: move KMS aspace init to the separate helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16/06/2022 05:34, Stephen Boyd wrote:
Quoting Dmitry Baryshkov (2022-05-04 17:16:04)
diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index a37a3bbc04d9..98ae0036ab57 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -262,6 +263,46 @@ static int msm_drm_uninit(struct device *dev)

  #include <linux/of_address.h>

+struct msm_gem_address_space *msm_kms_init_aspace(struct drm_device *dev)
+{
[...]
+       }
+
+       aspace = msm_gem_address_space_create(mmu, "mdp_kms",
+               0x1000, 0x100000000 - 0x1000);
+       if (IS_ERR(aspace)) {
+               mmu->funcs->destroy(mmu);


+               return aspace;
+       }
+
+       return aspace;

This can be 'return aspace' one time instead of two.

Yes. I was just always in favour of explicit error returns rather than falling through. I'll send v2.


+}
+
  bool msm_use_mmu(struct drm_device *dev)
  {
         struct msm_drm_private *priv = dev->dev_private;


--
With best wishes
Dmitry



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux