All of lore.kernel.org
 help / color / mirror / Atom feed
* [skn:smccc_v1_2_soc_id 7/7] drivers/firmware/smccc/soc_id.c:96:2: note: in expansion of macro 'if'
@ 2020-05-16  4:09 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2020-05-16  4:09 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git smccc_v1_2_soc_id
head:   e5d38d7d28222b9a997e1ec7521493b87d302389
commit: e5d38d7d28222b9a997e1ec7521493b87d302389 [7/7] firmware: smccc: Add ARCH_SOC_ID support
config: arm64-randconfig-r003-20200515 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout e5d38d7d28222b9a997e1ec7521493b87d302389
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=arm64 

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

All warnings (new ones prefixed by >>, old ones prefixed by <<):

In file included from include/linux/export.h:43,
from include/linux/linkage.h:7,
from include/linux/arm-smccc.h:90,
from drivers/firmware/smccc/soc_id.c:8:
drivers/firmware/smccc/soc_id.c: In function 'smccc_soc_init':
drivers/firmware/smccc/soc_id.c:96:6: error: implicit declaration of function 'arm_smccc_version_get' [-Werror=implicit-function-declaration]
96 |  if (arm_smccc_version_get() < ARM_SMCCC_VERSION_1_2)
|      ^~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
|                                                    ^~~~
>> drivers/firmware/smccc/soc_id.c:96:2: note: in expansion of macro 'if'
96 |  if (arm_smccc_version_get() < ARM_SMCCC_VERSION_1_2)
|  ^~
cc1: some warnings being treated as errors

vim +/if +96 drivers/firmware/smccc/soc_id.c

    88	
    89	static int __init smccc_soc_init(void)
    90	{
    91		struct device *dev;
    92		int ret, soc_id_rev;
    93		struct arm_smccc_res res;
    94		static char soc_id_str[8], soc_id_rev_str[12];
    95	
  > 96		if (arm_smccc_version_get() < ARM_SMCCC_VERSION_1_2)
    97			return 0;
    98	
    99		ret = smccc_soc_id_support_check();
   100		if (ret) {
   101			pr_info("Feature not implemented, skipping ....\n");
   102			return 0;
   103		}
   104	
   105		arm_smccc_1_1_invoke(ARM_SMCCC_ARCH_SOC_ID, 0, &res);
   106	
   107		ret = smccc_map_error_codes(res.a0);
   108		if (ret) {
   109			pr_err("Failed to fetch version, Err = %d\n", ret);
   110			return ret;
   111		}
   112	
   113		soc_id_version = res.a0;
   114	
   115		arm_smccc_1_1_invoke(ARM_SMCCC_ARCH_SOC_ID, 1, &res);
   116	
   117		ret = smccc_map_error_codes(res.a0);
   118		if (ret) {
   119			pr_err("Failed to fetch revision, Err = %d\n", ret);
   120			return ret;
   121		}
   122	
   123		soc_id_rev = res.a0;
   124	
   125		soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL);
   126		if (!soc_dev_attr)
   127			return -ENOMEM;
   128	
   129		sprintf(soc_id_str, "0x%04x", IMP_DEF_SOC_ID(soc_id_version));
   130		sprintf(soc_id_rev_str, "0x%08x", soc_id_rev);
   131	
   132		soc_dev_attr->soc_id = soc_id_str;
   133		soc_dev_attr->revision = soc_id_rev_str;
   134	
   135		soc_dev = soc_device_register(soc_dev_attr);
   136		if (IS_ERR(soc_dev)) {
   137			ret = PTR_ERR(soc_dev);
   138			goto free_soc;
   139		}
   140	
   141		dev = soc_device_to_device(soc_dev);
   142	
   143		ret = devm_device_add_groups(dev, jep106_id_groups);
   144		if (ret) {
   145			dev_err(dev, "sysfs create failed: %d\n", ret);
   146			goto unregister_soc;
   147		}
   148	
   149		pr_info("ID = %s Revision = %s\n", soc_dev_attr->soc_id,
   150			soc_dev_attr->revision);
   151	
   152		return 0;
   153	
   154	unregister_soc:
   155		soc_device_unregister(soc_dev);
   156	free_soc:
   157		kfree(soc_dev_attr);
   158		return ret;
   159	}
   160	module_init(smccc_soc_init);
   161	

---
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: 39227 bytes --]

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

only message in thread, other threads:[~2020-05-16  4:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-16  4:09 [skn:smccc_v1_2_soc_id 7/7] drivers/firmware/smccc/soc_id.c:96:2: note: in expansion of macro 'if' kbuild 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.