[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202302211458.tgO9izcv-lkp@intel.com>
Date: Tue, 21 Feb 2023 14:31:36 +0800
From: kernel test robot <lkp@...el.com>
To: Yang Li <yang.lee@...ux.alibaba.com>,
damien.lemoal@...nsource.wdc.com
Cc: oe-kbuild-all@...ts.linux.dev, s.shtylyov@....ru,
linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org,
Yang Li <yang.lee@...ux.alibaba.com>
Subject: Re: [PATCH -next] ata: pata_macio: Use of_property_present() helper
Hi Yang,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on next-20230220]
url: https://github.com/intel-lab-lkp/linux/commits/Yang-Li/ata-pata_macio-Use-of_property_present-helper/20230221-103834
patch link: https://lore.kernel.org/r/20230221023634.87925-1-yang.lee%40linux.alibaba.com
patch subject: [PATCH -next] ata: pata_macio: Use of_property_present() helper
config: powerpc-allyesconfig (https://download.01.org/0day-ci/archive/20230221/202302211458.tgO9izcv-lkp@intel.com/config)
compiler: powerpc-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/257ef88e819f378a5925cd9a44857f4591d860e9
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Yang-Li/ata-pata_macio-Use-of_property_present-helper/20230221-103834
git checkout 257ef88e819f378a5925cd9a44857f4591d860e9
# 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=powerpc olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202302211458.tgO9izcv-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/ata/pata_macio.c: In function 'pata_macio_cable_detect':
>> drivers/ata/pata_macio.c:482:37: error: incompatible types when initializing type 'const char *' using type 'bool' {aka '_Bool'}
482 | const char *cable = of_property_present(priv->node, "cable-type");
| ^~~~~~~~~~~~~~~~~~~
drivers/ata/pata_macio.c:484:37: error: incompatible types when initializing type 'const char *' using type 'bool' {aka '_Bool'}
484 | const char *model = of_property_present(root, "model");
| ^~~~~~~~~~~~~~~~~~~
drivers/ata/pata_macio.c: In function 'pata_macio_invariants':
>> drivers/ata/pata_macio.c:975:16: error: incompatible types when assigning to type 'const int *' from type 'bool' {aka '_Bool'}
975 | bidp = of_property_present(priv->node, "AAPL,bus-id");
| ^~~~~~~~~~~~~~~~~~~
vim +482 drivers/ata/pata_macio.c
472
473 static int pata_macio_cable_detect(struct ata_port *ap)
474 {
475 struct pata_macio_priv *priv = ap->private_data;
476
477 /* Get cable type from device-tree */
478 if (priv->kind == controller_kl_ata4 ||
479 priv->kind == controller_un_ata6 ||
480 priv->kind == controller_k2_ata6 ||
481 priv->kind == controller_sh_ata6) {
> 482 const char *cable = of_property_present(priv->node, "cable-type");
483 struct device_node *root = of_find_node_by_path("/");
484 const char *model = of_property_present(root, "model");
485
486 of_node_put(root);
487
488 if (cable && !strncmp(cable, "80-", 3)) {
489 /* Some drives fail to detect 80c cable in PowerBook
490 * These machine use proprietary short IDE cable
491 * anyway
492 */
493 if (!strncmp(model, "PowerBook", 9))
494 return ATA_CBL_PATA40_SHORT;
495 else
496 return ATA_CBL_PATA80;
497 }
498 }
499
500 /* G5's seem to have incorrect cable type in device-tree.
501 * Let's assume they always have a 80 conductor cable, this seem to
502 * be always the case unless the user mucked around
503 */
504 if (of_device_is_compatible(priv->node, "K2-UATA") ||
505 of_device_is_compatible(priv->node, "shasta-ata"))
506 return ATA_CBL_PATA80;
507
508 /* Anything else is 40 connectors */
509 return ATA_CBL_PATA40;
510 }
511
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
Powered by blists - more mailing lists