mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Yang Li <yang.lee@linux.alibaba.com>, damien.lemoal@opensource.wdc.com
Cc: oe-kbuild-all@lists.linux.dev, s.shtylyov@omp.ru,
	linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
	Yang Li <yang.lee@linux.alibaba.com>
Subject: Re: [PATCH -next] ata: pata_macio: Use of_property_present() helper
Date: Tue, 21 Feb 2023 14:31:36 +0800	[thread overview]
Message-ID: <202302211458.tgO9izcv-lkp@intel.com> (raw)
In-Reply-To: <20230221023634.87925-1-yang.lee@linux.alibaba.com>

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@intel.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

  reply	other threads:[~2023-02-21  6:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-21  2:36 Yang Li
2023-02-21  6:31 ` kernel test robot [this message]
2023-02-21 10:03 ` Sergey Shtylyov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202302211458.tgO9izcv-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=s.shtylyov@omp.ru \
    --cc=yang.lee@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®