drm/xe: Cleanup COMPLEX_MACRO style issues
authorFrancois Dugast <francois.dugast@intel.com>
Thu, 13 Jul 2023 14:20:20 +0000 (16:20 +0200)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 16:37:30 +0000 (11:37 -0500)
Remove some style issues of type COMPLEX_MACRO reported by checkpatch.

Signed-off-by: Francois Dugast <francois.dugast@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_gt_debugfs.c
drivers/gpu/drm/xe/xe_guc_debugfs.c
drivers/gpu/drm/xe/xe_huc_debugfs.c
drivers/gpu/drm/xe/xe_lrc.c

index b5a5538ae6306aaf6f6fde199f8c8bf0c3844b31..d0092d714ffe881ed980848848ac5c5a439ea6d4 100644 (file)
@@ -171,7 +171,7 @@ void xe_gt_debugfs_register(struct xe_gt *gt)
         * entry and drm_debugfs_create_files just references the drm_info_list
         * passed in (e.g. can't define this on the stack).
         */
-#define DEBUGFS_SIZE   ARRAY_SIZE(debugfs_list) * sizeof(struct drm_info_list)
+#define DEBUGFS_SIZE   (ARRAY_SIZE(debugfs_list) * sizeof(struct drm_info_list))
        local = drmm_kmalloc(&gt_to_xe(gt)->drm, DEBUGFS_SIZE, GFP_KERNEL);
        if (!local) {
                XE_WARN_ON("Couldn't allocate memory");
index 6b72db4d5bb23557ee1f7dba8bf9f6cee22449d5..0178b1a2d367f08f7f786191cb98a22aad0982c8 100644 (file)
@@ -87,7 +87,7 @@ void xe_guc_debugfs_register(struct xe_guc *guc, struct dentry *parent)
        struct drm_info_list *local;
        int i;
 
-#define DEBUGFS_SIZE   ARRAY_SIZE(debugfs_list) * sizeof(struct drm_info_list)
+#define DEBUGFS_SIZE   (ARRAY_SIZE(debugfs_list) * sizeof(struct drm_info_list))
        local = drmm_kmalloc(&guc_to_xe(guc)->drm, DEBUGFS_SIZE, GFP_KERNEL);
        if (!local) {
                XE_WARN_ON("Couldn't allocate memory");
index ee3d8315036a0949efd09ba9a43d5e0209e44f07..ae3c21315d59489b13dbea461a5b7ce69d4efec2 100644 (file)
@@ -53,7 +53,7 @@ void xe_huc_debugfs_register(struct xe_huc *huc, struct dentry *parent)
        struct drm_info_list *local;
        int i;
 
-#define DEBUGFS_SIZE   ARRAY_SIZE(debugfs_list) * sizeof(struct drm_info_list)
+#define DEBUGFS_SIZE   (ARRAY_SIZE(debugfs_list) * sizeof(struct drm_info_list))
        local = drmm_kmalloc(&huc_to_xe(huc)->drm, DEBUGFS_SIZE, GFP_KERNEL);
        if (!local) {
                XE_WARN_ON("Couldn't allocate memory");
index ddb1b1d6d00d802548717e7264d69f7b7ff04966..d5f782f8d2a6c012225969836a9741302c2152d8 100644 (file)
@@ -483,7 +483,7 @@ u32 xe_lrc_pphwsp_offset(struct xe_lrc *lrc)
 #define __xe_lrc_pphwsp_offset xe_lrc_pphwsp_offset
 
 #define LRC_SEQNO_PPHWSP_OFFSET 512
-#define LRC_START_SEQNO_PPHWSP_OFFSET LRC_SEQNO_PPHWSP_OFFSET + 8
+#define LRC_START_SEQNO_PPHWSP_OFFSET (LRC_SEQNO_PPHWSP_OFFSET + 8)
 #define LRC_PARALLEL_PPHWSP_OFFSET 2048
 #define LRC_PPHWSP_SIZE SZ_4K