All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	linux-arm-kernel@lists.infradead.org, arm@kernel.org,
	Dinh Nguyen <dinguyen@kernel.org>
Subject: [soc:socfpga/drivers-2 10/16] drivers/clk/socfpga/clk-gate.c:102:7: warning: cast to smaller integer type 'int' from 'void *'
Date: Fri, 9 Apr 2021 06:25:47 +0800	[thread overview]
Message-ID: <202104090637.L7vdvTaA-lkp@intel.com> (raw)

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

Hi Krzysztof,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git socfpga/drivers-2
head:   38ad957b04c5c2c9effc6336365187dae1301051
commit: 552418658acd6302e971c7137cb7d3108e464829 [10/16] clk: socfpga: use ARCH_INTEL_SOCFPGA also for 32-bit ARM SoCs (and compile test)
config: arm64-randconfig-r016-20210408 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 56ea2e2fdd691136d5e6631fa0e447173694b82c)
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
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git/commit/?id=552418658acd6302e971c7137cb7d3108e464829
        git remote add soc https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git
        git fetch --no-tags soc socfpga/drivers-2
        git checkout 552418658acd6302e971c7137cb7d3108e464829
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

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

All warnings (new ones prefixed by >>):

>> drivers/clk/socfpga/clk-gate.c:102:7: warning: cast to smaller integer type 'int' from 'void *' [-Wvoid-pointer-to-int-cast]
                   if ((int) socfpgaclk->div_reg & SOCFPGA_GPIO_DB_CLK_OFFSET)
                       ^~~~~~~~~~~~~~~~~~~~~~~~~
   1 warning generated.


vim +102 drivers/clk/socfpga/clk-gate.c

97259e99bdc914 Steffen Trumtrar 2014-01-06   89  
97259e99bdc914 Steffen Trumtrar 2014-01-06   90  static unsigned long socfpga_clk_recalc_rate(struct clk_hw *hwclk,
97259e99bdc914 Steffen Trumtrar 2014-01-06   91  	unsigned long parent_rate)
97259e99bdc914 Steffen Trumtrar 2014-01-06   92  {
97259e99bdc914 Steffen Trumtrar 2014-01-06   93  	struct socfpga_gate_clk *socfpgaclk = to_socfpga_gate_clk(hwclk);
97259e99bdc914 Steffen Trumtrar 2014-01-06   94  	u32 div = 1, val;
97259e99bdc914 Steffen Trumtrar 2014-01-06   95  
97259e99bdc914 Steffen Trumtrar 2014-01-06   96  	if (socfpgaclk->fixed_div)
97259e99bdc914 Steffen Trumtrar 2014-01-06   97  		div = socfpgaclk->fixed_div;
97259e99bdc914 Steffen Trumtrar 2014-01-06   98  	else if (socfpgaclk->div_reg) {
97259e99bdc914 Steffen Trumtrar 2014-01-06   99  		val = readl(socfpgaclk->div_reg) >> socfpgaclk->shift;
25d4d341d31b34 Andy Shevchenko  2015-07-13  100  		val &= GENMASK(socfpgaclk->width - 1, 0);
97259e99bdc914 Steffen Trumtrar 2014-01-06  101  		/* Check for GPIO_DB_CLK by its offset */
97259e99bdc914 Steffen Trumtrar 2014-01-06 @102  		if ((int) socfpgaclk->div_reg & SOCFPGA_GPIO_DB_CLK_OFFSET)
97259e99bdc914 Steffen Trumtrar 2014-01-06  103  			div = val + 1;
97259e99bdc914 Steffen Trumtrar 2014-01-06  104  		else
97259e99bdc914 Steffen Trumtrar 2014-01-06  105  			div = (1 << val);
97259e99bdc914 Steffen Trumtrar 2014-01-06  106  	}
97259e99bdc914 Steffen Trumtrar 2014-01-06  107  
97259e99bdc914 Steffen Trumtrar 2014-01-06  108  	return parent_rate / div;
97259e99bdc914 Steffen Trumtrar 2014-01-06  109  }
97259e99bdc914 Steffen Trumtrar 2014-01-06  110  

:::::: The code at line 102 was first introduced by commit
:::::: 97259e99bdc9144d071815536f1dbc2e41c6b5a8 clk: socfpga: split clk code

:::::: TO: Steffen Trumtrar <s.trumtrar@pengutronix.de>
:::::: CC: Mike Turquette <mturquette@linaro.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

[-- Attachment #3: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [soc:socfpga/drivers-2 10/16] drivers/clk/socfpga/clk-gate.c:102:7: warning: cast to smaller integer type 'int' from 'void *'
Date: Fri, 09 Apr 2021 06:25:47 +0800	[thread overview]
Message-ID: <202104090637.L7vdvTaA-lkp@intel.com> (raw)

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

Hi Krzysztof,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git socfpga/drivers-2
head:   38ad957b04c5c2c9effc6336365187dae1301051
commit: 552418658acd6302e971c7137cb7d3108e464829 [10/16] clk: socfpga: use ARCH_INTEL_SOCFPGA also for 32-bit ARM SoCs (and compile test)
config: arm64-randconfig-r016-20210408 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 56ea2e2fdd691136d5e6631fa0e447173694b82c)
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
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git/commit/?id=552418658acd6302e971c7137cb7d3108e464829
        git remote add soc https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git
        git fetch --no-tags soc socfpga/drivers-2
        git checkout 552418658acd6302e971c7137cb7d3108e464829
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

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

All warnings (new ones prefixed by >>):

>> drivers/clk/socfpga/clk-gate.c:102:7: warning: cast to smaller integer type 'int' from 'void *' [-Wvoid-pointer-to-int-cast]
                   if ((int) socfpgaclk->div_reg & SOCFPGA_GPIO_DB_CLK_OFFSET)
                       ^~~~~~~~~~~~~~~~~~~~~~~~~
   1 warning generated.


vim +102 drivers/clk/socfpga/clk-gate.c

97259e99bdc914 Steffen Trumtrar 2014-01-06   89  
97259e99bdc914 Steffen Trumtrar 2014-01-06   90  static unsigned long socfpga_clk_recalc_rate(struct clk_hw *hwclk,
97259e99bdc914 Steffen Trumtrar 2014-01-06   91  	unsigned long parent_rate)
97259e99bdc914 Steffen Trumtrar 2014-01-06   92  {
97259e99bdc914 Steffen Trumtrar 2014-01-06   93  	struct socfpga_gate_clk *socfpgaclk = to_socfpga_gate_clk(hwclk);
97259e99bdc914 Steffen Trumtrar 2014-01-06   94  	u32 div = 1, val;
97259e99bdc914 Steffen Trumtrar 2014-01-06   95  
97259e99bdc914 Steffen Trumtrar 2014-01-06   96  	if (socfpgaclk->fixed_div)
97259e99bdc914 Steffen Trumtrar 2014-01-06   97  		div = socfpgaclk->fixed_div;
97259e99bdc914 Steffen Trumtrar 2014-01-06   98  	else if (socfpgaclk->div_reg) {
97259e99bdc914 Steffen Trumtrar 2014-01-06   99  		val = readl(socfpgaclk->div_reg) >> socfpgaclk->shift;
25d4d341d31b34 Andy Shevchenko  2015-07-13  100  		val &= GENMASK(socfpgaclk->width - 1, 0);
97259e99bdc914 Steffen Trumtrar 2014-01-06  101  		/* Check for GPIO_DB_CLK by its offset */
97259e99bdc914 Steffen Trumtrar 2014-01-06 @102  		if ((int) socfpgaclk->div_reg & SOCFPGA_GPIO_DB_CLK_OFFSET)
97259e99bdc914 Steffen Trumtrar 2014-01-06  103  			div = val + 1;
97259e99bdc914 Steffen Trumtrar 2014-01-06  104  		else
97259e99bdc914 Steffen Trumtrar 2014-01-06  105  			div = (1 << val);
97259e99bdc914 Steffen Trumtrar 2014-01-06  106  	}
97259e99bdc914 Steffen Trumtrar 2014-01-06  107  
97259e99bdc914 Steffen Trumtrar 2014-01-06  108  	return parent_rate / div;
97259e99bdc914 Steffen Trumtrar 2014-01-06  109  }
97259e99bdc914 Steffen Trumtrar 2014-01-06  110  

:::::: The code@line 102 was first introduced by commit
:::::: 97259e99bdc9144d071815536f1dbc2e41c6b5a8 clk: socfpga: split clk code

:::::: TO: Steffen Trumtrar <s.trumtrar@pengutronix.de>
:::::: CC: Mike Turquette <mturquette@linaro.org>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

             reply	other threads:[~2021-04-08 22:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-08 22:25 kernel test robot [this message]
2021-04-08 22:25 ` [soc:socfpga/drivers-2 10/16] drivers/clk/socfpga/clk-gate.c:102:7: warning: cast to smaller integer type 'int' from 'void *' kernel test robot

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=202104090637.L7vdvTaA-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=arm@kernel.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=dinguyen@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.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.