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

Julia Lawall julia.lawall at inria.fr
Sun Nov 15 16:33:20 UTC 2020


See line 81.

julia

---------- Forwarded message ----------
Date: Sun, 15 Nov 2020 06:48:16 +0800
From: kernel test robot <lkp at intel.com>
To: kbuild at lists.01.org
Cc: lkp at intel.com, Julia Lawall <julia.lawall at lip6.fr>
Subject: Re: [Intel-gfx] [PATCH 18/27] drm/i915/pxp: Implement funcs to create
    the TEE channel

CC: kbuild-all at lists.01.org
In-Reply-To: <20201114014537.25495-18-sean.z.huang at intel.com>
References: <20201114014537.25495-18-sean.z.huang at intel.com>
TO: Sean Z Huang <sean.z.huang at intel.com>
TO: Intel-gfx at lists.freedesktop.org
CC: "Huang, Sean Z" <sean.z.huang at intel.com>

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 at intel.com>
Reported-by: Julia Lawall <julia.lawall at lip6.fr>


"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@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 36612 bytes
Desc: 
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20201115/94a8adba/attachment-0001.gz>


More information about the Intel-gfx mailing list