mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Weiyi Lu <weiyi.lu@mediatek.com>
Cc: kbuild-all@lists.01.org, Nicolas Boichat <drinkcat@chromium.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Rob Herring <robh@kernel.org>,
	James Liao <jamesjj.liao@mediatek.com>,
	Fan Chen <fan.chen@mediatek.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
	srv_heupstream@mediatek.com, Weiyi Lu <weiyi.lu@mediatek.com>,
	Yong Wu <yong.wu@mediatek.com>
Subject: Re: [PATCH v8 09/14] soc: mediatek: Add multiple step bus protection control
Date: Wed, 30 Oct 2019 07:19:13 +0800	[thread overview]
Message-ID: <201910300739.XPqsX21Y%lkp@intel.com> (raw)
In-Reply-To: <1572230898-7860-10-git-send-email-weiyi.lu@mediatek.com>

[-- Attachment #1: Type: text/plain, Size: 10866 bytes --]

Hi Weiyi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.4-rc5 next-20191029]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Weiyi-Lu/Mediatek-MT8183-scpsys-support/20191030-060526
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 23fdb198ae81f47a574296dab5167c5e136a02ba
config: mips-allmodconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=mips 

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

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   In file included from drivers/soc/mediatek/mtk-scpsys-ext.c:9:0:
   drivers/soc/mediatek/mtk-scpsys-ext.c: In function 'mtk_scpsys_ext_set_bus_protection':
>> include/linux/regmap.h:131:9: warning: 'map' may be used uninitialized in this function [-Wmaybe-uninitialized]
      __ret = regmap_read((map), (addr), &(val)); \
            ^
   drivers/soc/mediatek/mtk-scpsys-ext.c:51:18: note: 'map' was declared here
      struct regmap *map;
                     ^~~
   In file included from drivers/soc/mediatek/mtk-scpsys-ext.c:9:0:
   drivers/soc/mediatek/mtk-scpsys-ext.c: In function 'mtk_scpsys_ext_clear_bus_protection':
>> include/linux/regmap.h:131:9: warning: 'map' may be used uninitialized in this function [-Wmaybe-uninitialized]
      __ret = regmap_read((map), (addr), &(val)); \
            ^
   drivers/soc/mediatek/mtk-scpsys-ext.c:79:18: note: 'map' was declared here
      struct regmap *map;
                     ^~~
--
   In file included from drivers/soc//mediatek/mtk-scpsys-ext.c:9:0:
   drivers/soc//mediatek/mtk-scpsys-ext.c: In function 'mtk_scpsys_ext_set_bus_protection':
>> include/linux/regmap.h:131:9: warning: 'map' may be used uninitialized in this function [-Wmaybe-uninitialized]
      __ret = regmap_read((map), (addr), &(val)); \
            ^
   drivers/soc//mediatek/mtk-scpsys-ext.c:51:18: note: 'map' was declared here
      struct regmap *map;
                     ^~~
   In file included from drivers/soc//mediatek/mtk-scpsys-ext.c:9:0:
   drivers/soc//mediatek/mtk-scpsys-ext.c: In function 'mtk_scpsys_ext_clear_bus_protection':
>> include/linux/regmap.h:131:9: warning: 'map' may be used uninitialized in this function [-Wmaybe-uninitialized]
      __ret = regmap_read((map), (addr), &(val)); \
            ^
   drivers/soc//mediatek/mtk-scpsys-ext.c:79:18: note: 'map' was declared here
      struct regmap *map;
                     ^~~

vim +/map +131 include/linux/regmap.h

8019ff6cfc0440 Nariman Poushin         2015-07-16   73  
ca7a94464b5457 Kuninori Morimoto       2016-02-15   74  #define	regmap_update_bits(map, reg, mask, val) \
ca7a94464b5457 Kuninori Morimoto       2016-02-15   75  	regmap_update_bits_base(map, reg, mask, val, NULL, false, false)
30ed9cb7a49b49 Kuninori Morimoto       2016-02-15   76  #define	regmap_update_bits_async(map, reg, mask, val)\
30ed9cb7a49b49 Kuninori Morimoto       2016-02-15   77  	regmap_update_bits_base(map, reg, mask, val, NULL, true, false)
98c2dc48694a47 Kuninori Morimoto       2016-02-15   78  #define	regmap_update_bits_check(map, reg, mask, val, change)\
98c2dc48694a47 Kuninori Morimoto       2016-02-15   79  	regmap_update_bits_base(map, reg, mask, val, change, false, false)
89d8d4b833b0b2 Kuninori Morimoto       2016-02-15   80  #define	regmap_update_bits_check_async(map, reg, mask, val, change)\
89d8d4b833b0b2 Kuninori Morimoto       2016-02-15   81  	regmap_update_bits_base(map, reg, mask, val, change, true, false)
ca7a94464b5457 Kuninori Morimoto       2016-02-15   82  
b821957a5ae769 Kuninori Morimoto       2016-03-03   83  #define	regmap_write_bits(map, reg, mask, val) \
b821957a5ae769 Kuninori Morimoto       2016-03-03   84  	regmap_update_bits_base(map, reg, mask, val, NULL, false, true)
b821957a5ae769 Kuninori Morimoto       2016-03-03   85  
3674124b358946 Kuninori Morimoto       2016-02-15   86  #define	regmap_field_write(field, val) \
3674124b358946 Kuninori Morimoto       2016-02-15   87  	regmap_field_update_bits_base(field, ~0, val, NULL, false, false)
489061bba6c655 Kuninori Morimoto       2016-02-15   88  #define	regmap_field_force_write(field, val) \
489061bba6c655 Kuninori Morimoto       2016-02-15   89  	regmap_field_update_bits_base(field, ~0, val, NULL, false, true)
721ed64dda3774 Kuninori Morimoto       2016-02-15   90  #define	regmap_field_update_bits(field, mask, val)\
721ed64dda3774 Kuninori Morimoto       2016-02-15   91  	regmap_field_update_bits_base(field, mask, val, NULL, false, false)
489061bba6c655 Kuninori Morimoto       2016-02-15   92  #define	regmap_field_force_update_bits(field, mask, val) \
489061bba6c655 Kuninori Morimoto       2016-02-15   93  	regmap_field_update_bits_base(field, mask, val, NULL, false, true)
3674124b358946 Kuninori Morimoto       2016-02-15   94  
bbf2c46f46e23a Kuninori Morimoto       2016-02-15   95  #define	regmap_fields_write(field, id, val) \
bbf2c46f46e23a Kuninori Morimoto       2016-02-15   96  	regmap_fields_update_bits_base(field, id, ~0, val, NULL, false, false)
e6ef243fa4660f Kuninori Morimoto       2016-02-15   97  #define	regmap_fields_force_write(field, id, val) \
e6ef243fa4660f Kuninori Morimoto       2016-02-15   98  	regmap_fields_update_bits_base(field, id, ~0, val, NULL, false, true)
48138609135fc9 Kuninori Morimoto       2016-02-15   99  #define	regmap_fields_update_bits(field, id, mask, val)\
48138609135fc9 Kuninori Morimoto       2016-02-15  100  	regmap_fields_update_bits_base(field, id, mask, val, NULL, false, false)
e6ef243fa4660f Kuninori Morimoto       2016-02-15  101  #define	regmap_fields_force_update_bits(field, id, mask, val) \
e6ef243fa4660f Kuninori Morimoto       2016-02-15  102  	regmap_fields_update_bits_base(field, id, mask, val, NULL, false, true)
bbf2c46f46e23a Kuninori Morimoto       2016-02-15  103  
08188ba8822163 Philipp Zabel           2016-07-06  104  /**
08188ba8822163 Philipp Zabel           2016-07-06  105   * regmap_read_poll_timeout - Poll until a condition is met or a timeout occurs
2cf8e2dfdf8836 Charles Keepax          2017-01-12  106   *
08188ba8822163 Philipp Zabel           2016-07-06  107   * @map: Regmap to read from
08188ba8822163 Philipp Zabel           2016-07-06  108   * @addr: Address to poll
08188ba8822163 Philipp Zabel           2016-07-06  109   * @val: Unsigned integer variable to read the value into
08188ba8822163 Philipp Zabel           2016-07-06  110   * @cond: Break condition (usually involving @val)
08188ba8822163 Philipp Zabel           2016-07-06  111   * @sleep_us: Maximum time to sleep between reads in us (0
08188ba8822163 Philipp Zabel           2016-07-06  112   *            tight-loops).  Should be less than ~20ms since usleep_range
458f69ef36656d Mauro Carvalho Chehab   2019-06-12  113   *            is used (see Documentation/timers/timers-howto.rst).
08188ba8822163 Philipp Zabel           2016-07-06  114   * @timeout_us: Timeout in us, 0 means never timeout
08188ba8822163 Philipp Zabel           2016-07-06  115   *
08188ba8822163 Philipp Zabel           2016-07-06  116   * Returns 0 on success and -ETIMEDOUT upon a timeout or the regmap_read
08188ba8822163 Philipp Zabel           2016-07-06  117   * error return value in case of a error read. In the two former cases,
08188ba8822163 Philipp Zabel           2016-07-06  118   * the last read value at @addr is stored in @val. Must not be called
08188ba8822163 Philipp Zabel           2016-07-06  119   * from atomic context if sleep_us or timeout_us are used.
08188ba8822163 Philipp Zabel           2016-07-06  120   *
08188ba8822163 Philipp Zabel           2016-07-06  121   * This is modelled after the readx_poll_timeout macros in linux/iopoll.h.
08188ba8822163 Philipp Zabel           2016-07-06  122   */
08188ba8822163 Philipp Zabel           2016-07-06  123  #define regmap_read_poll_timeout(map, addr, val, cond, sleep_us, timeout_us) \
08188ba8822163 Philipp Zabel           2016-07-06  124  ({ \
1b0c22e45508ff Arnd Bergmann           2017-10-13  125  	u64 __timeout_us = (timeout_us); \
1b0c22e45508ff Arnd Bergmann           2017-10-13  126  	unsigned long __sleep_us = (sleep_us); \
1b0c22e45508ff Arnd Bergmann           2017-10-13  127  	ktime_t __timeout = ktime_add_us(ktime_get(), __timeout_us); \
780b1350d316fd Ramesh Shanmugasundaram 2017-07-03  128  	int __ret; \
1b0c22e45508ff Arnd Bergmann           2017-10-13  129  	might_sleep_if(__sleep_us); \
08188ba8822163 Philipp Zabel           2016-07-06  130  	for (;;) { \
780b1350d316fd Ramesh Shanmugasundaram 2017-07-03 @131  		__ret = regmap_read((map), (addr), &(val)); \
780b1350d316fd Ramesh Shanmugasundaram 2017-07-03  132  		if (__ret) \
08188ba8822163 Philipp Zabel           2016-07-06  133  			break; \
08188ba8822163 Philipp Zabel           2016-07-06  134  		if (cond) \
08188ba8822163 Philipp Zabel           2016-07-06  135  			break; \
1b0c22e45508ff Arnd Bergmann           2017-10-13  136  		if ((__timeout_us) && \
780b1350d316fd Ramesh Shanmugasundaram 2017-07-03  137  		    ktime_compare(ktime_get(), __timeout) > 0) { \
780b1350d316fd Ramesh Shanmugasundaram 2017-07-03  138  			__ret = regmap_read((map), (addr), &(val)); \
08188ba8822163 Philipp Zabel           2016-07-06  139  			break; \
08188ba8822163 Philipp Zabel           2016-07-06  140  		} \
1b0c22e45508ff Arnd Bergmann           2017-10-13  141  		if (__sleep_us) \
1b0c22e45508ff Arnd Bergmann           2017-10-13  142  			usleep_range((__sleep_us >> 2) + 1, __sleep_us); \
08188ba8822163 Philipp Zabel           2016-07-06  143  	} \
780b1350d316fd Ramesh Shanmugasundaram 2017-07-03  144  	__ret ?: ((cond) ? 0 : -ETIMEDOUT); \
08188ba8822163 Philipp Zabel           2016-07-06  145  })
08188ba8822163 Philipp Zabel           2016-07-06  146  

:::::: The code at line 131 was first introduced by commit
:::::: 780b1350d316fda28d85fcae17854c778d89cbbe regmap: Avoid namespace collision within macro & tidy up

:::::: TO: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
:::::: CC: Mark Brown <broonie@kernel.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 62069 bytes --]

  reply	other threads:[~2019-10-29 23:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28  2:48 [PATCH v8 00/14] Mediatek MT8183 scpsys support Weiyi Lu
2019-10-28  2:48 ` [PATCH v8 01/14] dt-bindings: mediatek: Add property to mt8183 smi-common Weiyi Lu
2019-10-28  2:48 ` [PATCH v8 02/14] dt-bindings: soc: Add MT8183 power dt-bindings Weiyi Lu
2019-10-28  2:48 ` [PATCH v8 03/14] soc: mediatek: Refactor polling timeout and documentation Weiyi Lu
2019-10-28  2:48 ` [PATCH v8 04/14] soc: mediatek: Refactor regulator control Weiyi Lu
2019-10-28  2:48 ` [PATCH v8 05/14] soc: mediatek: Refactor clock control Weiyi Lu
2019-10-28  2:48 ` [PATCH v8 06/14] soc: mediatek: Refactor sram control Weiyi Lu
2019-10-28  2:48 ` [PATCH v8 07/14] soc: mediatek: Refactor bus protection control Weiyi Lu
2019-10-28  2:48 ` [PATCH v8 08/14] soc: mediatek: Add basic_clk_id to scp_power_data Weiyi Lu
2019-10-28  2:48 ` [PATCH v8 09/14] soc: mediatek: Add multiple step bus protection control Weiyi Lu
2019-10-29 23:19   ` kbuild test robot [this message]
2019-10-30  1:36   ` kbuild test robot
2019-10-28  2:48 ` [PATCH v8 10/14] soc: mediatek: Add subsys clock control for bus protection Weiyi Lu
2019-10-28  2:48 ` [PATCH v8 11/14] soc: mediatek: Add extra sram control Weiyi Lu
2019-10-28  2:48 ` [PATCH v8 12/14] soc: mediatek: Add MT8183 scpsys support Weiyi Lu
2019-10-28  2:48 ` [PATCH v8 13/14] arm64: dts: Add power controller device node of MT8183 Weiyi Lu
2019-10-28  2:48 ` [PATCH v8 14/14] arm64: dts: Add power-domains properity to mfgcfg Weiyi Lu

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=201910300739.XPqsX21Y%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=drinkcat@chromium.org \
    --cc=fan.chen@mediatek.com \
    --cc=jamesjj.liao@mediatek.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=robh@kernel.org \
    --cc=srv_heupstream@mediatek.com \
    --cc=weiyi.lu@mediatek.com \
    --cc=yong.wu@mediatek.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®