Thread (4 messages) 4 messages, 3 authors, 2022-07-25

Re: [hid:for-next 11/27] drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.c:48:9: error: implicit declaration of function 'writeq'; did you mean 'writeb'?

From: Basavaraj Natikar <hidden>
Date: 2022-07-25 15:44:28
Also in: oe-kbuild-all

On 7/25/2022 3:10 PM, Jiri Kosina wrote:
On Mon, 25 Jul 2022, kernel test robot wrote:
quoted
tree:   https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.kernel.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Fhid%2Fhid.git&amp;data=05%7C01%7CBasavaraj.Natikar%40amd.com%7C998f7294bb914743e98908da6e21a832%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637943388080227109%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=%2FPabO720i7GSUkRHzNtWpUpKo2vzoDskyg5D%2BPcfv5g%3D&amp;reserved=0 for-next
head:   9c9914cc509bccd7b134d33594e19b9411c12d4b
commit: 93ce5e0231d79189be4d9e5f9295807b18941419 [11/27] HID: amd_sfh: Implement SFH1.1 functionality
config: arc-allyesconfig (https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdownload.01.org%2F0day-ci%2Farchive%2F20220725%2F202207250836.cwfTgngV-lkp%40intel.com%2Fconfig&amp;data=05%7C01%7CBasavaraj.Natikar%40amd.com%7C998f7294bb914743e98908da6e21a832%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637943388080227109%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=wUiF3lD%2BzugnBwoIbc%2Frmv%2FQgbZxTfb%2FuMjvjUzsOp0%3D&amp;reserved=0)
compiler: arceb-elf-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fraw.githubusercontent.com%2Fintel%2Flkp-tests%2Fmaster%2Fsbin%2Fmake.cross&amp;data=05%7C01%7CBasavaraj.Natikar%40amd.com%7C998f7294bb914743e98908da6e21a832%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637943388080227109%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=pcU0nQ%2Fc7FAKNP0Gej8VG%2BfHmb1g3ZSkXrZdHJk%2F6D4%3D&amp;reserved=0 -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.kernel.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Fhid%2Fhid.git%2Fcommit%2F%3Fid%3D93ce5e0231d79189be4d9e5f9295807b18941419&amp;data=05%7C01%7CBasavaraj.Natikar%40amd.com%7C998f7294bb914743e98908da6e21a832%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637943388080227109%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=8mdjArHzn%2BTYn9Cypx3GUO3PakmUi9wLMtjVsCnZYbQ%3D&amp;reserved=0
        git remote add hid https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.kernel.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Fhid%2Fhid.git&amp;data=05%7C01%7CBasavaraj.Natikar%40amd.com%7C998f7294bb914743e98908da6e21a832%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637943388080227109%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=%2FPabO720i7GSUkRHzNtWpUpKo2vzoDskyg5D%2BPcfv5g%3D&amp;reserved=0
        git fetch --no-tags hid for-next
        git checkout 93ce5e0231d79189be4d9e5f9295807b18941419
HEAD position is 93ce5e0231d7 HID: amd_sfh: Implement SFH1.1 functionality
build issue on non-64 build is present in Re: [PATCH 00/11] Fixes and implementation of AMD SFH 1.1 functionality
- Jiri Kosina (kernel.org) <https://lore.kernel.org/all/nycvar.YFH.7.76.2207211344360.19850@cbobk.fhfr.pm/ (local)> 
above git checkout 93ce5e0231d79189be4d9e5f9295807b18941419 leads to Re: [PATCH 00/11] Fixes and implementation of AMD SFH 1.1 functionality
- Jiri Kosina (kernel.org) <https://lore.kernel.org/all/nycvar.YFH.7.76.2207211344360.19850@cbobk.fhfr.pm/ (local)>

Already fixed for all builds with patches Re: [PATCH for-next 0/2] Fixes to amd_sfh driver - Jiri Kosina (kernel.org) <https://lore.kernel.org/all/nycvar.YFH.7.76.2207232011090.19850@cbobk.fhfr.pm/ (local)>
HEAD position is 5d4d0f156575 HID: amd_sfh: Handle condition of "no sensors"
quoted
        # 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=arc SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <redacted>

Note: the hid/for-next HEAD 9c9914cc509bccd7b134d33594e19b9411c12d4b builds fine.
Yes correct builds fine since issue is fixed in Re: [PATCH for-next 0/2] Fixes to amd_sfh driver - Jiri Kosina (kernel.org) <https://lore.kernel.org/all/nycvar.YFH.7.76.2207232011090.19850@cbobk.fhfr.pm/ (local)>
since HEAD-9c9914cc509bccd7b134d33594e19b9411c12d4b is after build fixed HEAD position 5d4d0f156575
HID: amd_sfh: Handle condition of "no sensors"
 
quoted
      It only hurts bisectability.

All errors (new ones prefixed by >>):

   drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.c: In function 'amd_stop_sensor':
quoted
quoted
drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.c:48:9: error: implicit declaration of function 'writeq'; did you mean 'writeb'? [-Werror=implicit-function-declaration]
      48 |         writeq(0x0, privdata->mmio + AMD_C2P_MSG(1));
         |         ^~~~~~
         |         writeb
   cc1: some warnings being treated as errors


vim +48 drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.c

    38	
    39	static void amd_stop_sensor(struct amd_mp2_dev *privdata, u16 sensor_idx)
    40	{
    41		struct sfh_cmd_base cmd_base;
    42	
    43		cmd_base.ul = 0;
    44		cmd_base.cmd.cmd_id = DISABLE_SENSOR;
    45		cmd_base.cmd.intr_disable = 0;
    46		cmd_base.cmd.sensor_id = sensor_idx;
    47	
  > 48		writeq(0x0, privdata->mmio + AMD_C2P_MSG(1));
    49		writel(cmd_base.ul, privdata->mmio + AMD_C2P_MSG(0));
    50	}
    51	

-- 
0-DAY CI Kernel Test Service
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2F01.org%2Flkp&amp;data=05%7C01%7CBasavaraj.Natikar%40amd.com%7C998f7294bb914743e98908da6e21a832%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637943388080227109%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=v18RWurFcm8DwHK949WLjQrGt%2FHlYrTdnovdHxS59Zo%3D&amp;reserved=0
Basavaraj,

could you please fix that up so the we can have a fixed version in -next 
at least for a couple days before the merge window opens?
Hi Jiri,

As per above mail issue is already fixed for 32 builds Re: [PATCH for-next 0/2] Fixes to amd_sfh driver - Jiri Kosina (kernel.org) <https://lore.kernel.org/all/nycvar.YFH.7.76.2207232011090.19850@cbobk.fhfr.pm/ (local)>

And I also cross verified as below builds fine with 5d4d0f15657535f6a122ab26d47230b5c2b944af and
9c9914cc509bccd7b134d33594e19b9411c12d4b.

'''
root@amd-Cloudripper:/home/amd/hhh/hid# git show
commit 5d4d0f15657535f6a122ab26d47230b5c2b944af (HEAD, origin/for-5.20/amd-sfh)
Author: Basavaraj Natikar [off-list ref]
Date:   Sat Jul 23 11:40:33 2022 +0530

    HID: amd_sfh: Handle condition of "no sensors"

    Add a check for num_hid_devices to handle special case the situation
    of "no sensors".

    Fixes: 4b2c53d93a4b ("SFH:Transport Driver to add support of AMD Sensor Fusion Hub (SFH)")
    Signed-off-by: Basavaraj Natikar [off-list ref]
    Signed-off-by: Jiri Kosina [off-list ref]

20895:  CC      drivers/hid/amd-sfh-hid/amd_sfh_hid.o
20976:  CC      drivers/hid/amd-sfh-hid/amd_sfh_client.o
21117:  CC      drivers/hid/amd-sfh-hid/amd_sfh_pcie.o
21279:  CC      drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.o
21361:  CC      drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.o
21449:  CC      drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.o
21499:  CC      drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_desc.o
21588:  AR      drivers/hid/amd-sfh-hid/built-in.a


root@amd-Cloudripper:/home/amd/hhh/hid# git checkout 93ce5e0231d79189be4d9e5f9295807b18941419
Previous HEAD position was 5d4d0f156575 HID: amd_sfh: Handle condition of "no sensors"
HEAD is now at 93ce5e0231d7 HID: amd_sfh: Implement SFH1.1 functionality

21635:  CC      drivers/hid/amd-sfh-hid/amd_sfh_hid.o
21649:  CC      drivers/hid/amd-sfh-hid/amd_sfh_client.o
21661:  CC      drivers/hid/amd-sfh-hid/amd_sfh_pcie.o
21742:  CC      drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.o
21785:  CC      drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.o
21887:  CC      drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.o
21941:drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.c: In function 'amd_stop_sensor':
21942:drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.c:48:9: error: implicit declaration of function 'writeq'; did you mean 'writeb'? [-Werror=implicit-function-declaration]
21951:  CC      drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_desc.o
21956:make[3]: *** [scripts/Makefile.build:292: drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.o] Error 1
22068:make[2]: *** [scripts/Makefile.build:555: drivers/hid/amd-sfh-hid] Error 2

root@amd-Cloudripper:/home/amd/hhh/hid# git checkout for-next
Previous HEAD position was 93ce5e0231d7 HID: amd_sfh: Implement SFH1.1 functionality
Switched to branch 'for-next'
Your branch is up to date with 'origin/for-next'.
root@amd-Cloudripper:/home/amd/hhh/hid#
'''

(FIXED) newer HEAD patch :5d4d0f156575 
(Build ERROR shown by kernel test robot) is older HEAD Patch :93ce5e0231d7 

Works good for 32 and 64 builds on newer or latest patches: HEAD position - 5d4d0f156575 HID: amd_sfh: Handle condition of "no sensors"
Build error for 32 builds observed on older patch HEAD - 93ce5e0231d7 HID: amd_sfh: Implement SFH1.1 functionality

Please queue for 5.20 and let me know if any changes required.

Thanks,
--
Basavaraj

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help