All of lore.kernel.org
 help / color / mirror / Atom feed
* [chrome-os:chromeos-4.19 27/50] drivers/gpu/drm/drm_hdcp.c:235:6: warning: no previous prototype for function 'drm_hdcp_request_srm'
@ 2020-11-13 13:48 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-11-13 13:48 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 5796 bytes --]

tree:   https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.19
head:   b9a3f5405fb3783912a70780b9f51b8942feed91
commit: 9602e2b071719b0f1e22a3a9ea2f5f3a6ba8f272 [27/50] UPSTREAM: drm: revocation check at drm subsystem
config: x86_64-randconfig-a005-20201113 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 9e0c35655b6e8186baef8840b26ba4090503b554)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
        git fetch --no-tags chrome-os chromeos-4.19
        git checkout 9602e2b071719b0f1e22a3a9ea2f5f3a6ba8f272
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/drm_hdcp.c:235:6: warning: no previous prototype for function 'drm_hdcp_request_srm' [-Wmissing-prototypes]
   void drm_hdcp_request_srm(struct drm_device *drm_dev)
        ^
   drivers/gpu/drm/drm_hdcp.c:235:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void drm_hdcp_request_srm(struct drm_device *drm_dev)
   ^
   static 
>> drivers/gpu/drm/drm_hdcp.c:317:5: warning: no previous prototype for function 'drm_setup_hdcp_srm' [-Wmissing-prototypes]
   int drm_setup_hdcp_srm(struct class *drm_class)
       ^
   drivers/gpu/drm/drm_hdcp.c:317:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int drm_setup_hdcp_srm(struct class *drm_class)
   ^
   static 
>> drivers/gpu/drm/drm_hdcp.c:327:6: warning: no previous prototype for function 'drm_teardown_hdcp_srm' [-Wmissing-prototypes]
   void drm_teardown_hdcp_srm(struct class *drm_class)
        ^
   drivers/gpu/drm/drm_hdcp.c:327:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void drm_teardown_hdcp_srm(struct class *drm_class)
   ^
   static 
   3 warnings generated.

vim +/drm_hdcp_request_srm +235 drivers/gpu/drm/drm_hdcp.c

   234	
 > 235	void drm_hdcp_request_srm(struct drm_device *drm_dev)
   236	{
   237		char fw_name[36] = "display_hdcp_srm.bin";
   238		const struct firmware *fw;
   239	
   240		int ret;
   241	
   242		ret = request_firmware_direct(&fw, (const char *)fw_name,
   243					      drm_dev->dev);
   244		if (ret < 0)
   245			goto exit;
   246	
   247		if (fw->size && fw->data)
   248			drm_hdcp_srm_update(fw->data, fw->size);
   249	
   250	exit:
   251		release_firmware(fw);
   252	}
   253	
   254	/**
   255	 * drm_hdcp_check_ksvs_revoked - Check the revoked status of the IDs
   256	 *
   257	 * @drm_dev: drm_device for which HDCP revocation check is requested
   258	 * @ksvs: List of KSVs (HDCP receiver IDs)
   259	 * @ksv_count: KSV count passed in through @ksvs
   260	 *
   261	 * This function reads the HDCP System renewability Message(SRM Table)
   262	 * from userspace as a firmware and parses it for the revoked HDCP
   263	 * KSVs(Receiver IDs) detected by DCP LLC. Once the revoked KSVs are known,
   264	 * revoked state of the KSVs in the list passed in by display drivers are
   265	 * decided and response is sent.
   266	 *
   267	 * SRM should be presented in the name of "display_hdcp_srm.bin".
   268	 *
   269	 * Returns:
   270	 * TRUE on any of the KSV is revoked, else FALSE.
   271	 */
   272	bool drm_hdcp_check_ksvs_revoked(struct drm_device *drm_dev, u8 *ksvs,
   273					 u32 ksv_count)
   274	{
   275		u32 rev_ksv_cnt, cnt, i, j;
   276		u8 *rev_ksv_list;
   277	
   278		if (!srm_data)
   279			return false;
   280	
   281		mutex_lock(&srm_data->mutex);
   282		drm_hdcp_request_srm(drm_dev);
   283	
   284		rev_ksv_cnt = srm_data->revoked_ksv_cnt;
   285		rev_ksv_list = srm_data->revoked_ksv_list;
   286	
   287		/* If the Revoked ksv list is empty */
   288		if (!rev_ksv_cnt || !rev_ksv_list) {
   289			mutex_unlock(&srm_data->mutex);
   290			return false;
   291		}
   292	
   293		for  (cnt = 0; cnt < ksv_count; cnt++) {
   294			rev_ksv_list = srm_data->revoked_ksv_list;
   295			for (i = 0; i < rev_ksv_cnt; i++) {
   296				for (j = 0; j < DRM_HDCP_KSV_LEN; j++)
   297					if (ksvs[j] != rev_ksv_list[j]) {
   298						break;
   299					} else if (j == (DRM_HDCP_KSV_LEN - 1)) {
   300						DRM_DEBUG("Revoked KSV is ");
   301						drm_hdcp_print_ksv(ksvs);
   302						mutex_unlock(&srm_data->mutex);
   303						return true;
   304					}
   305				/* Move the offset to next KSV in the revoked list */
   306				rev_ksv_list += DRM_HDCP_KSV_LEN;
   307			}
   308	
   309			/* Iterate to next ksv_offset */
   310			ksvs += DRM_HDCP_KSV_LEN;
   311		}
   312		mutex_unlock(&srm_data->mutex);
   313		return false;
   314	}
   315	EXPORT_SYMBOL_GPL(drm_hdcp_check_ksvs_revoked);
   316	
 > 317	int drm_setup_hdcp_srm(struct class *drm_class)
   318	{
   319		srm_data = kzalloc(sizeof(*srm_data), GFP_KERNEL);
   320		if (!srm_data)
   321			return -ENOMEM;
   322		mutex_init(&srm_data->mutex);
   323	
   324		return 0;
   325	}
   326	
 > 327	void drm_teardown_hdcp_srm(struct class *drm_class)

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 30382 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-13 13:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-13 13:48 [chrome-os:chromeos-4.19 27/50] drivers/gpu/drm/drm_hdcp.c:235:6: warning: no previous prototype for function 'drm_hdcp_request_srm' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.