Re: [PATCH 18/27] drm/i915/pxp: Implement funcs to create the TEE channel (fwd)

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

 



See line 81.

julia

---------- Forwarded message ----------
Date: Sun, 15 Nov 2020 06:48:16 +0800
From: kernel test robot <lkp@xxxxxxxxx>
To: kbuild@xxxxxxxxxxxx
Cc: lkp@xxxxxxxxx, Julia Lawall <julia.lawall@xxxxxxx>
Subject: Re:  [PATCH 18/27] drm/i915/pxp: Implement funcs to create
    the TEE channel

CC: kbuild-all@xxxxxxxxxxxx
In-Reply-To: <20201114014537.25495-18-sean.z.huang@xxxxxxxxx>
References: <20201114014537.25495-18-sean.z.huang@xxxxxxxxx>
TO: Sean Z Huang <sean.z.huang@xxxxxxxxx>
TO: Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
CC: "Huang, Sean Z" <sean.z.huang@xxxxxxxxx>

Hi Sean,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on next-20201113]
[also build test WARNING on v5.10-rc3]
[cannot apply to drm-intel/for-linux-next char-misc/char-misc-testing v5.10-rc3 v5.10-rc2 v5.10-rc1]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Sean-Z-Huang/drm-i915-pxp-Introduce-Intel-PXP-component/20201114-094926
base:    92edc4aef86780a8ad01b092c6d6630bb3cb423d
:::::: branch date: 21 hours ago
:::::: commit date: 21 hours ago
config: i386-randconfig-c001-20201113 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Reported-by: Julia Lawall <julia.lawall@xxxxxxx>


"coccinelle warnings: (new ones prefixed by >>)"
>> drivers/gpu/drm/i915/pxp/intel_pxp_tee.c:81:17-20: ERROR: i915 is NULL but dereferenced.
   drivers/gpu/drm/i915/pxp/intel_pxp_tee.c:101:17-20: ERROR: i915 is NULL but dereferenced.

vim +81 drivers/gpu/drm/i915/pxp/intel_pxp_tee.c

8f42c11ed5aac66 Huang, Sean Z 2020-11-13  62
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  63  /**
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  64   * i915_pxp_tee_component_bind - bind funciton to pass the function pointers to pxp_tee
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  65   * @i915_kdev: pointer to i915 kernel device
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  66   * @tee_kdev: pointer to tee kernel device
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  67   * @data: pointer to pxp_tee_master containing the function pointers
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  68   *
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  69   * This bind function is called during the system boot or resume from system sleep.
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  70   *
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  71   * Return: return 0 if successful.
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  72   */
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  73  static int i915_pxp_tee_component_bind(struct device *i915_kdev,
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  74  				       struct device *tee_kdev, void *data)
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  75  {
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  76  	struct drm_i915_private *i915 = kdev_to_i915(i915_kdev);
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  77
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  78  	drm_dbg(&i915->drm, "i915 PXP TEE component bind\n");
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  79
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  80  	if (!i915 || !tee_kdev || !data) {
8f42c11ed5aac66 Huang, Sean Z 2020-11-13 @81  		drm_dbg(&i915->drm, "Failed to bind for i915 PXP TEE component, invalid params\n");
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  82  		return -EPERM;
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  83  	}
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  84
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  85  	mutex_lock(&i915->pxp_tee_comp_mutex);
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  86  	i915->pxp_tee_master = (struct i915_pxp_comp_master *)data;
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  87  	i915->pxp_tee_master->tee_dev = tee_kdev;
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  88  	mutex_unlock(&i915->pxp_tee_comp_mutex);
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  89
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  90  	return 0;
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  91  }
8f42c11ed5aac66 Huang, Sean Z 2020-11-13  92

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux