Skip to contentSkip to conversation

drm/msm/dpu: drop unused memory allocation

PATCH In review Dmitry Baryshkov 3 participants 3 messages Aug 22, 2022 – Aug 23, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/msm/dpu: drop unused memory allocation

Drop the dpu_cfg variable and corresponding kzalloc, which became unused after changing hw catalog to static configuration.

Fixes de7d480f5e8c ("drm/msm/dpu: make dpu hardware catalog static const")
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +0 -5
index 0239a811d5ec..50ab17c9afd2 100644
@@ -1939,11 +1939,6 @@ static const struct dpu_mdss_hw_cfg_handler cfg_handler[] = {
 const struct dpu_mdss_cfg *dpu_hw_catalog_init(u32 hw_rev)
 {
 	int i;
-	struct dpu_mdss_cfg *dpu_cfg;
-
-	dpu_cfg = kzalloc(sizeof(*dpu_cfg), GFP_KERNEL);
-	if (!dpu_cfg)
-		return ERR_PTR(-ENOMEM);
 
 	for (i = 0; i < ARRAY_SIZE(cfg_handler); i++) {
 		if (cfg_handler[i].hw_rev == hw_rev)
Signature · 1 line
2.35.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Dmitry Baryshkov

Drop the dpu_cfg variable and corresponding kzalloc, which became unused after changing hw catalog to static configuration.

Fixes de7d480f5e8c ("drm/msm/dpu: make dpu hardware catalog static const")
Quoted 20 lines
---
  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 5 -----
  1 file changed, 5 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +0 -5
index 0239a811d5ec..50ab17c9afd2 100644
@@ -1939,11 +1939,6 @@ static const struct dpu_mdss_hw_cfg_handler cfg_handler[] = {
  const struct dpu_mdss_cfg *dpu_hw_catalog_init(u32 hw_rev)
  {
  	int i;
-	struct dpu_mdss_cfg *dpu_cfg;
-
-	dpu_cfg = kzalloc(sizeof(*dpu_cfg), GFP_KERNEL);
-	if (!dpu_cfg)
-		return ERR_PTR(-ENOMEM);
 
  	for (i = 0; i < ARRAY_SIZE(cfg_handler); i++) {
  		if (cfg_handler[i].hw_rev == hw_rev)
Reviewed-by on v1 1/1
#2 lore raw
In reply to Dmitry Baryshkov

Quoting Dmitry Baryshkov (2022-08-22 10:24:55)

Quoted 8 lines

Drop the dpu_cfg variable and corresponding kzalloc, which became unused after changing hw catalog to static configuration.

Fixes de7d480f5e8c ("drm/msm/dpu: make dpu hardware catalog static const")

---