From 1cdcd126a722a13a501c943fb567202286b2620a Mon Sep 17 00:00:00 2001 From: Sui Jingfeng <15330273260@189.cn> Date: Fri, 31 Mar 2023 11:00:19 +0800 Subject: [PATCH] drm/loongson: fix compile warnning LoongArch inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6RRGJ -------------------------------- fix compile warnning by remove unused function and variable. Signed-off-by: Sui Jingfeng <15330273260@189.cn> Change-Id: I45a9adabcadd4f02e69fab44207aef4883e3fdb9 (cherry picked from commit c24ddfb3adbd5fee7a94ec7855cb6089de712f0f) --- drivers/gpu/drm/loongson/lsdc_drv.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/drivers/gpu/drm/loongson/lsdc_drv.c b/drivers/gpu/drm/loongson/lsdc_drv.c index 4fa1d4c3b9f0..d98bcabe66b5 100644 --- a/drivers/gpu/drm/loongson/lsdc_drv.c +++ b/drivers/gpu/drm/loongson/lsdc_drv.c @@ -125,25 +125,6 @@ static const struct drm_mode_config_funcs lsdc_mode_config_funcs = { .mode_valid = lsdc_device_mode_valid, }; -static int lsdc_gem_cma_dumb_create(struct drm_file *file, - struct drm_device *ddev, - struct drm_mode_create_dumb *args) -{ - struct lsdc_device *ldev = to_lsdc(ddev); - const struct lsdc_chip_desc *desc = ldev->desc; - unsigned int bytes_per_pixel = (args->bpp + 7) / 8; - unsigned int pitch = bytes_per_pixel * args->width; - - /* - * The dc in ls7a1000/ls2k1000/ls2k0500 require the stride be a - * multiple of 256 bytes which is for sake of optimize dma data - * transfer. - */ - args->pitch = roundup(pitch, desc->stride_alignment); - - return drm_gem_cma_dumb_create_internal(file, ddev, args); -} - DEFINE_DRM_GEM_FOPS(lsdc_gem_fops); static struct drm_driver lsdc_vram_driver = { @@ -456,7 +437,6 @@ static int lsdc_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) static void lsdc_pci_remove(struct pci_dev *pdev) { struct drm_device *ddev = pci_get_drvdata(pdev); - struct lsdc_device *ldev = to_lsdc(ddev); drm_dev_unregister(ddev); drm_atomic_helper_shutdown(ddev); -- GitLab