[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202301182013.GCpIdgaQ-lkp@intel.com>
Date: Wed, 18 Jan 2023 20:19:59 +0800
From: kernel test robot <lkp@...el.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev,
Yisen Zhuang <yisen.zhuang@...wei.com>,
Salil Mehta <salil.mehta@...wei.com>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH v1 1/1] net: hns: Switch to use acpi_evaluate_dsm_typed()
Hi Andy,
I love your patch! Yet something to improve:
[auto build test ERROR on net/master]
[also build test ERROR on net-next/master horms-ipvs/master linus/master v6.2-rc4 next-20230118]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/net-hns-Switch-to-use-acpi_evaluate_dsm_typed/20230118-182559
patch link: https://lore.kernel.org/r/20230118092922.39426-1-andriy.shevchenko%40linux.intel.com
patch subject: [PATCH v1 1/1] net: hns: Switch to use acpi_evaluate_dsm_typed()
config: m68k-allmodconfig
compiler: m68k-linux-gcc (GCC) 12.1.0
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
# https://github.com/intel-lab-lkp/linux/commit/299998ad1587d588587d8bf24e1a1a706256140e
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Andy-Shevchenko/net-hns-Switch-to-use-acpi_evaluate_dsm_typed/20230118-182559
git checkout 299998ad1587d588587d8bf24e1a1a706256140e
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash drivers/net/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All error/warnings (new ones prefixed by >>):
drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c: In function 'hns_mac_get_phy_if_acpi':
>> drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c:557:15: error: implicit declaration of function 'acpi_evaluate_dsm_typed'; did you mean 'acpi_evaluate_dsm'? [-Werror=implicit-function-declaration]
557 | obj = acpi_evaluate_dsm_typed(ACPI_HANDLE(mac_cb->dev),
| ^~~~~~~~~~~~~~~~~~~~~~~
| acpi_evaluate_dsm
>> drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c:557:13: warning: assignment to 'union acpi_object *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
557 | obj = acpi_evaluate_dsm_typed(ACPI_HANDLE(mac_cb->dev),
| ^
drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c: In function 'hns_mac_get_sfp_prsnt_acpi':
>> drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c:604:15: error: too many arguments to function 'acpi_evaluate_dsm'
604 | obj = acpi_evaluate_dsm(ACPI_HANDLE(mac_cb->dev),
| ^~~~~~~~~~~~~~~~~
In file included from drivers/net/ethernet/hisilicon/hns/hnae.h:26,
from drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.h:8,
from drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.h:13,
from drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c:6:
include/linux/acpi.h:953:34: note: declared here
953 | static inline union acpi_object *acpi_evaluate_dsm(acpi_handle handle,
| ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +557 drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c
543
544 static phy_interface_t hns_mac_get_phy_if_acpi(struct hns_mac_cb *mac_cb)
545 {
546 phy_interface_t phy_if = PHY_INTERFACE_MODE_NA;
547 union acpi_object *obj;
548 union acpi_object obj_args, argv4;
549
550 obj_args.integer.type = ACPI_TYPE_INTEGER;
551 obj_args.integer.value = mac_cb->mac_id;
552
553 argv4.type = ACPI_TYPE_PACKAGE;
554 argv4.package.count = 1;
555 argv4.package.elements = &obj_args;
556
> 557 obj = acpi_evaluate_dsm_typed(ACPI_HANDLE(mac_cb->dev),
558 &hns_dsaf_acpi_dsm_guid, 0,
559 HNS_OP_GET_PORT_TYPE_FUNC, &argv4,
560 ACPI_TYPE_INTEGER);
561 if (!obj)
562 return phy_if;
563
564 phy_if = obj->integer.value ?
565 PHY_INTERFACE_MODE_XGMII : PHY_INTERFACE_MODE_SGMII;
566
567 dev_dbg(mac_cb->dev, "mac_id=%d, phy_if=%d\n", mac_cb->mac_id, phy_if);
568
569 ACPI_FREE(obj);
570
571 return phy_if;
572 }
573
574 static int hns_mac_get_sfp_prsnt(struct hns_mac_cb *mac_cb, int *sfp_prsnt)
575 {
576 u32 val = 0;
577 int ret;
578
579 if (!mac_cb->cpld_ctrl)
580 return -ENODEV;
581
582 ret = dsaf_read_syscon(mac_cb->cpld_ctrl,
583 mac_cb->cpld_ctrl_reg + MAC_SFP_PORT_OFFSET,
584 &val);
585 if (ret)
586 return ret;
587
588 *sfp_prsnt = !val;
589 return 0;
590 }
591
592 static int hns_mac_get_sfp_prsnt_acpi(struct hns_mac_cb *mac_cb, int *sfp_prsnt)
593 {
594 union acpi_object *obj;
595 union acpi_object obj_args, argv4;
596
597 obj_args.integer.type = ACPI_TYPE_INTEGER;
598 obj_args.integer.value = mac_cb->mac_id;
599
600 argv4.type = ACPI_TYPE_PACKAGE;
601 argv4.package.count = 1;
602 argv4.package.elements = &obj_args;
603
> 604 obj = acpi_evaluate_dsm(ACPI_HANDLE(mac_cb->dev),
605 &hns_dsaf_acpi_dsm_guid, 0,
606 HNS_OP_GET_SFP_STAT_FUNC, &argv4,
607 ACPI_TYPE_INTEGER);
608 if (!obj)
609 return -ENODEV;
610
611 *sfp_prsnt = obj->integer.value;
612
613 ACPI_FREE(obj);
614
615 return 0;
616 }
617
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
View attachment "config" of type "text/plain" (278833 bytes)
Powered by blists - more mailing lists