All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, "Rafael J. Wysocki" <rafael@kernel.org>,
	Len Brown <lenb@kernel.org>,
	Mika Westerberg <mika.westerberg@linux.intel.com>
Subject: Re: [PATCH v1 2/2] ACPI: PMIC: Replace open coded be16_to_cpu()
Date: Wed, 31 Aug 2022 00:10:41 +0800	[thread overview]
Message-ID: <202208310028.KhBuk6ZD-lkp@intel.com> (raw)
In-Reply-To: <20220830135532.28992-2-andriy.shevchenko@linux.intel.com>

Hi Andy,

I love your patch! Perhaps something to improve:

[auto build test WARNING on rafael-pm/linux-next]
[also build test WARNING on linus/master v6.0-rc3 next-20220830]
[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/ACPI-PMIC-Use-sizeof-instead-of-hard-coded-value/20220830-215815
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20220831/202208310028.KhBuk6ZD-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/2ca842435092e0995ac8c691cfdc7971ab091d78
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Andy-Shevchenko/ACPI-PMIC-Use-sizeof-instead-of-hard-coded-value/20220830-215815
        git checkout 2ca842435092e0995ac8c691cfdc7971ab091d78
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/acpi/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/acpi/pmic/intel_pmic_chtdc_ti.c: In function 'chtdc_ti_pmic_get_raw_temp':
>> drivers/acpi/pmic/intel_pmic_chtdc_ti.c:96:43: warning: passing argument 3 of 'regmap_bulk_read' makes pointer from integer without a cast [-Wint-conversion]
      96 |         if (regmap_bulk_read(regmap, reg, buf, sizeof(buf)))
         |                                           ^~~
         |                                           |
         |                                           __be16 {aka short unsigned int}
   In file included from include/linux/mfd/intel_soc_pmic.h:14,
                    from drivers/acpi/pmic/intel_pmic_chtdc_ti.c:13:
   include/linux/regmap.h:1167:66: note: expected 'void *' but argument is of type '__be16' {aka 'short unsigned int'}
    1167 | int regmap_bulk_read(struct regmap *map, unsigned int reg, void *val,
         |                                                            ~~~~~~^~~
   drivers/acpi/pmic/intel_pmic_chtdc_ti.c:99:35: error: macro "GENMASK" requires 2 arguments, but only 1 given
      99 |         return be16_to_cpu(buf) & PMIC_REG_MASK;
         |                                   ^~~~~~~~~~~~~
   In file included from include/linux/ioport.h:13,
                    from include/linux/acpi.h:12,
                    from drivers/acpi/pmic/intel_pmic_chtdc_ti.c:10:
   include/linux/bits.h:37: note: macro "GENMASK" defined here
      37 | #define GENMASK(h, l) \
         | 
   drivers/acpi/pmic/intel_pmic_chtdc_ti.c:21:33: error: 'GENMASK' undeclared (first use in this function)
      21 | #define PMIC_REG_MASK           GENMASK(9. 0)
         |                                 ^~~~~~~
   drivers/acpi/pmic/intel_pmic_chtdc_ti.c:99:35: note: in expansion of macro 'PMIC_REG_MASK'
      99 |         return be16_to_cpu(buf) & PMIC_REG_MASK;
         |                                   ^~~~~~~~~~~~~
   drivers/acpi/pmic/intel_pmic_chtdc_ti.c:21:33: note: each undeclared identifier is reported only once for each function it appears in
      21 | #define PMIC_REG_MASK           GENMASK(9. 0)
         |                                 ^~~~~~~
   drivers/acpi/pmic/intel_pmic_chtdc_ti.c:99:35: note: in expansion of macro 'PMIC_REG_MASK'
      99 |         return be16_to_cpu(buf) & PMIC_REG_MASK;
         |                                   ^~~~~~~~~~~~~
   drivers/acpi/pmic/intel_pmic_chtdc_ti.c:100:1: error: control reaches end of non-void function [-Werror=return-type]
     100 | }
         | ^
   cc1: some warnings being treated as errors


vim +/regmap_bulk_read +96 drivers/acpi/pmic/intel_pmic_chtdc_ti.c

31374972321d16 Takashi Iwai    2017-09-04   91  
31374972321d16 Takashi Iwai    2017-09-04   92  static int chtdc_ti_pmic_get_raw_temp(struct regmap *regmap, int reg)
31374972321d16 Takashi Iwai    2017-09-04   93  {
2ca842435092e0 Andy Shevchenko 2022-08-30   94  	__be16 buf;
31374972321d16 Takashi Iwai    2017-09-04   95  
20ea3e58eac77b Andy Shevchenko 2022-08-30  @96  	if (regmap_bulk_read(regmap, reg, buf, sizeof(buf)))
31374972321d16 Takashi Iwai    2017-09-04   97  		return -EIO;
31374972321d16 Takashi Iwai    2017-09-04   98  
2ca842435092e0 Andy Shevchenko 2022-08-30   99  	return be16_to_cpu(buf) & PMIC_REG_MASK;
31374972321d16 Takashi Iwai    2017-09-04  100  }
31374972321d16 Takashi Iwai    2017-09-04  101  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

  parent reply	other threads:[~2022-08-30 16:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-30 13:55 [PATCH v1 1/2] ACPI: PMIC: Use sizeof() instead of hard coded value Andy Shevchenko
2022-08-30 13:55 ` [PATCH v1 2/2] ACPI: PMIC: Replace open coded be16_to_cpu() Andy Shevchenko
2022-08-30 16:06   ` Mika Westerberg
2022-08-30 16:37     ` Andy Shevchenko
2022-08-30 16:10   ` kernel test robot [this message]
2022-08-30 15:14 ` [PATCH v1 1/2] ACPI: PMIC: Use sizeof() instead of hard coded value Andy Shevchenko
2022-08-30 15:57 ` Mika Westerberg
2022-08-30 16:10   ` Andy Shevchenko

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=202208310028.KhBuk6ZD-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rafael@kernel.org \
    /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 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.