All of lore.kernel.org
 help / color / mirror / Atom feed
* arch/arm/mach-ep93xx/clock.c:210:35: sparse: sparse: Using plain integer as NULL pointer
@ 2022-01-16 17:50 ` kernel test robot
  0 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2022-01-16 17:50 UTC (permalink / raw)
  To: Nikita Shubin; +Cc: kbuild-all, linux-kernel, Arnd Bergmann, Alexander Sverdlin

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   4d66020dcef83314092f2c8c89152a8d122627e2
commit: 9645ccc7bd7a16cd73c3be9dee70cd702b03be37 ep93xx: clock: convert in-place to COMMON_CLK
date:   3 months ago
config: arm-randconfig-s031-20220116 (https://download.01.org/0day-ci/archive/20220117/202201170148.vIvPQRko-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9645ccc7bd7a16cd73c3be9dee70cd702b03be37
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 9645ccc7bd7a16cd73c3be9dee70cd702b03be37
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash

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


sparse warnings: (new ones prefixed by >>)
>> arch/arm/mach-ep93xx/clock.c:210:35: sparse: sparse: Using plain integer as NULL pointer
   arch/arm/mach-ep93xx/clock.c:99:9: sparse: sparse: context imbalance in 'ep93xx_clk_enable' - different lock contexts for basic block
   arch/arm/mach-ep93xx/clock.c:116:9: sparse: sparse: context imbalance in 'ep93xx_clk_disable' - different lock contexts for basic block
   arch/arm/mach-ep93xx/clock.c:197:9: sparse: sparse: context imbalance in 'ep93xx_mux_set_parent_lock' - different lock contexts for basic block

vim +210 arch/arm/mach-ep93xx/clock.c

   205	
   206	static int ep93xx_mux_determine_rate(struct clk_hw *hw,
   207					struct clk_rate_request *req)
   208	{
   209		unsigned long rate = req->rate;
 > 210		struct clk *best_parent = 0;
   211		unsigned long __parent_rate;
   212		unsigned long best_rate = 0, actual_rate, mclk_rate;
   213		unsigned long best_parent_rate;
   214		int __div = 0, __pdiv = 0;
   215		int i;
   216	
   217		/*
   218		 * Try the two pll's and the external clock
   219		 * Because the valid predividers are 2, 2.5 and 3, we multiply
   220		 * all the clocks by 2 to avoid floating point math.
   221		 *
   222		 * This is based on the algorithm in the ep93xx raster guide:
   223		 * http://be-a-maverick.com/en/pubs/appNote/AN269REV1.pdf
   224		 *
   225		 */
   226		for (i = 0; i < ARRAY_SIZE(mux_parents); i++) {
   227			struct clk *parent = clk_get_sys(mux_parents[i], NULL);
   228	
   229			__parent_rate = clk_get_rate(parent);
   230			mclk_rate = __parent_rate * 2;
   231	
   232			/* Try each predivider value */
   233			for (__pdiv = 4; __pdiv <= 6; __pdiv++) {
   234				__div = mclk_rate / (rate * __pdiv);
   235				if (__div < 2 || __div > 127)
   236					continue;
   237	
   238				actual_rate = mclk_rate / (__pdiv * __div);
   239				if (is_best(rate, actual_rate, best_rate)) {
   240					best_rate = actual_rate;
   241					best_parent_rate = __parent_rate;
   242					best_parent = parent;
   243				}
   244			}
   245		}
   246	
   247		if (!best_parent)
   248			return -EINVAL;
   249	
   250		req->best_parent_rate = best_parent_rate;
   251		req->best_parent_hw = __clk_get_hw(best_parent);
   252		req->rate = best_rate;
   253	
   254		return 0;
   255	}
   256	

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* arch/arm/mach-ep93xx/clock.c:210:35: sparse: sparse: Using plain integer as NULL pointer
@ 2022-01-16 17:50 ` kernel test robot
  0 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2022-01-16 17:50 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   4d66020dcef83314092f2c8c89152a8d122627e2
commit: 9645ccc7bd7a16cd73c3be9dee70cd702b03be37 ep93xx: clock: convert in-place to COMMON_CLK
date:   3 months ago
config: arm-randconfig-s031-20220116 (https://download.01.org/0day-ci/archive/20220117/202201170148.vIvPQRko-lkp(a)intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9645ccc7bd7a16cd73c3be9dee70cd702b03be37
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 9645ccc7bd7a16cd73c3be9dee70cd702b03be37
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash

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


sparse warnings: (new ones prefixed by >>)
>> arch/arm/mach-ep93xx/clock.c:210:35: sparse: sparse: Using plain integer as NULL pointer
   arch/arm/mach-ep93xx/clock.c:99:9: sparse: sparse: context imbalance in 'ep93xx_clk_enable' - different lock contexts for basic block
   arch/arm/mach-ep93xx/clock.c:116:9: sparse: sparse: context imbalance in 'ep93xx_clk_disable' - different lock contexts for basic block
   arch/arm/mach-ep93xx/clock.c:197:9: sparse: sparse: context imbalance in 'ep93xx_mux_set_parent_lock' - different lock contexts for basic block

vim +210 arch/arm/mach-ep93xx/clock.c

   205	
   206	static int ep93xx_mux_determine_rate(struct clk_hw *hw,
   207					struct clk_rate_request *req)
   208	{
   209		unsigned long rate = req->rate;
 > 210		struct clk *best_parent = 0;
   211		unsigned long __parent_rate;
   212		unsigned long best_rate = 0, actual_rate, mclk_rate;
   213		unsigned long best_parent_rate;
   214		int __div = 0, __pdiv = 0;
   215		int i;
   216	
   217		/*
   218		 * Try the two pll's and the external clock
   219		 * Because the valid predividers are 2, 2.5 and 3, we multiply
   220		 * all the clocks by 2 to avoid floating point math.
   221		 *
   222		 * This is based on the algorithm in the ep93xx raster guide:
   223		 * http://be-a-maverick.com/en/pubs/appNote/AN269REV1.pdf
   224		 *
   225		 */
   226		for (i = 0; i < ARRAY_SIZE(mux_parents); i++) {
   227			struct clk *parent = clk_get_sys(mux_parents[i], NULL);
   228	
   229			__parent_rate = clk_get_rate(parent);
   230			mclk_rate = __parent_rate * 2;
   231	
   232			/* Try each predivider value */
   233			for (__pdiv = 4; __pdiv <= 6; __pdiv++) {
   234				__div = mclk_rate / (rate * __pdiv);
   235				if (__div < 2 || __div > 127)
   236					continue;
   237	
   238				actual_rate = mclk_rate / (__pdiv * __div);
   239				if (is_best(rate, actual_rate, best_rate)) {
   240					best_rate = actual_rate;
   241					best_parent_rate = __parent_rate;
   242					best_parent = parent;
   243				}
   244			}
   245		}
   246	
   247		if (!best_parent)
   248			return -EINVAL;
   249	
   250		req->best_parent_rate = best_parent_rate;
   251		req->best_parent_hw = __clk_get_hw(best_parent);
   252		req->rate = best_rate;
   253	
   254		return 0;
   255	}
   256	

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* arch/arm/mach-ep93xx/clock.c:210:35: sparse: sparse: Using plain integer as NULL pointer
@ 2022-03-18  1:55 kernel test robot
  0 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2022-03-18  1:55 UTC (permalink / raw)
  To: Nikita Shubin; +Cc: kbuild-all, linux-kernel, Arnd Bergmann, Alexander Sverdlin

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   56e337f2cf1326323844927a04e9dbce9a244835
commit: 9645ccc7bd7a16cd73c3be9dee70cd702b03be37 ep93xx: clock: convert in-place to COMMON_CLK
date:   5 months ago
config: arm-randconfig-s031-20220317 (https://download.01.org/0day-ci/archive/20220318/202203180941.DKQMpy5R-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9645ccc7bd7a16cd73c3be9dee70cd702b03be37
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 9645ccc7bd7a16cd73c3be9dee70cd702b03be37
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash

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


sparse warnings: (new ones prefixed by >>)
>> arch/arm/mach-ep93xx/clock.c:210:35: sparse: sparse: Using plain integer as NULL pointer
   arch/arm/mach-ep93xx/clock.c:99:9: sparse: sparse: context imbalance in 'ep93xx_clk_enable' - different lock contexts for basic block
   arch/arm/mach-ep93xx/clock.c:116:9: sparse: sparse: context imbalance in 'ep93xx_clk_disable' - different lock contexts for basic block
   arch/arm/mach-ep93xx/clock.c:197:9: sparse: sparse: context imbalance in 'ep93xx_mux_set_parent_lock' - different lock contexts for basic block

vim +210 arch/arm/mach-ep93xx/clock.c

   205	
   206	static int ep93xx_mux_determine_rate(struct clk_hw *hw,
   207					struct clk_rate_request *req)
   208	{
   209		unsigned long rate = req->rate;
 > 210		struct clk *best_parent = 0;
   211		unsigned long __parent_rate;
   212		unsigned long best_rate = 0, actual_rate, mclk_rate;
   213		unsigned long best_parent_rate;
   214		int __div = 0, __pdiv = 0;
   215		int i;
   216	
   217		/*
   218		 * Try the two pll's and the external clock
   219		 * Because the valid predividers are 2, 2.5 and 3, we multiply
   220		 * all the clocks by 2 to avoid floating point math.
   221		 *
   222		 * This is based on the algorithm in the ep93xx raster guide:
   223		 * http://be-a-maverick.com/en/pubs/appNote/AN269REV1.pdf
   224		 *
   225		 */
   226		for (i = 0; i < ARRAY_SIZE(mux_parents); i++) {
   227			struct clk *parent = clk_get_sys(mux_parents[i], NULL);
   228	
   229			__parent_rate = clk_get_rate(parent);
   230			mclk_rate = __parent_rate * 2;
   231	
   232			/* Try each predivider value */
   233			for (__pdiv = 4; __pdiv <= 6; __pdiv++) {
   234				__div = mclk_rate / (rate * __pdiv);
   235				if (__div < 2 || __div > 127)
   236					continue;
   237	
   238				actual_rate = mclk_rate / (__pdiv * __div);
   239				if (is_best(rate, actual_rate, best_rate)) {
   240					best_rate = actual_rate;
   241					best_parent_rate = __parent_rate;
   242					best_parent = parent;
   243				}
   244			}
   245		}
   246	
   247		if (!best_parent)
   248			return -EINVAL;
   249	
   250		req->best_parent_rate = best_parent_rate;
   251		req->best_parent_hw = __clk_get_hw(best_parent);
   252		req->rate = best_rate;
   253	
   254		return 0;
   255	}
   256	

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* arch/arm/mach-ep93xx/clock.c:210:35: sparse: sparse: Using plain integer as NULL pointer
@ 2022-02-17 13:45 ` kernel test robot
  0 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2022-02-17 13:45 UTC (permalink / raw)
  To: Nikita Shubin; +Cc: kbuild-all, linux-kernel, Arnd Bergmann, Alexander Sverdlin

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f71077a4d84bbe8c7b91b7db7c4ef815755ac5e3
commit: 9645ccc7bd7a16cd73c3be9dee70cd702b03be37 ep93xx: clock: convert in-place to COMMON_CLK
date:   4 months ago
config: arm-randconfig-s032-20220217 (https://download.01.org/0day-ci/archive/20220217/202202172100.TE6YfATQ-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9645ccc7bd7a16cd73c3be9dee70cd702b03be37
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 9645ccc7bd7a16cd73c3be9dee70cd702b03be37
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash

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


sparse warnings: (new ones prefixed by >>)
>> arch/arm/mach-ep93xx/clock.c:210:35: sparse: sparse: Using plain integer as NULL pointer
   arch/arm/mach-ep93xx/clock.c:99:9: sparse: sparse: context imbalance in 'ep93xx_clk_enable' - different lock contexts for basic block
   arch/arm/mach-ep93xx/clock.c:116:9: sparse: sparse: context imbalance in 'ep93xx_clk_disable' - different lock contexts for basic block
   arch/arm/mach-ep93xx/clock.c:197:9: sparse: sparse: context imbalance in 'ep93xx_mux_set_parent_lock' - different lock contexts for basic block

vim +210 arch/arm/mach-ep93xx/clock.c

   205	
   206	static int ep93xx_mux_determine_rate(struct clk_hw *hw,
   207					struct clk_rate_request *req)
   208	{
   209		unsigned long rate = req->rate;
 > 210		struct clk *best_parent = 0;
   211		unsigned long __parent_rate;
   212		unsigned long best_rate = 0, actual_rate, mclk_rate;
   213		unsigned long best_parent_rate;
   214		int __div = 0, __pdiv = 0;
   215		int i;
   216	
   217		/*
   218		 * Try the two pll's and the external clock
   219		 * Because the valid predividers are 2, 2.5 and 3, we multiply
   220		 * all the clocks by 2 to avoid floating point math.
   221		 *
   222		 * This is based on the algorithm in the ep93xx raster guide:
   223		 * http://be-a-maverick.com/en/pubs/appNote/AN269REV1.pdf
   224		 *
   225		 */
   226		for (i = 0; i < ARRAY_SIZE(mux_parents); i++) {
   227			struct clk *parent = clk_get_sys(mux_parents[i], NULL);
   228	
   229			__parent_rate = clk_get_rate(parent);
   230			mclk_rate = __parent_rate * 2;
   231	
   232			/* Try each predivider value */
   233			for (__pdiv = 4; __pdiv <= 6; __pdiv++) {
   234				__div = mclk_rate / (rate * __pdiv);
   235				if (__div < 2 || __div > 127)
   236					continue;
   237	
   238				actual_rate = mclk_rate / (__pdiv * __div);
   239				if (is_best(rate, actual_rate, best_rate)) {
   240					best_rate = actual_rate;
   241					best_parent_rate = __parent_rate;
   242					best_parent = parent;
   243				}
   244			}
   245		}
   246	
   247		if (!best_parent)
   248			return -EINVAL;
   249	
   250		req->best_parent_rate = best_parent_rate;
   251		req->best_parent_hw = __clk_get_hw(best_parent);
   252		req->rate = best_rate;
   253	
   254		return 0;
   255	}
   256	

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* arch/arm/mach-ep93xx/clock.c:210:35: sparse: sparse: Using plain integer as NULL pointer
@ 2022-02-17 13:45 ` kernel test robot
  0 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2022-02-17 13:45 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f71077a4d84bbe8c7b91b7db7c4ef815755ac5e3
commit: 9645ccc7bd7a16cd73c3be9dee70cd702b03be37 ep93xx: clock: convert in-place to COMMON_CLK
date:   4 months ago
config: arm-randconfig-s032-20220217 (https://download.01.org/0day-ci/archive/20220217/202202172100.TE6YfATQ-lkp(a)intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9645ccc7bd7a16cd73c3be9dee70cd702b03be37
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 9645ccc7bd7a16cd73c3be9dee70cd702b03be37
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash

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


sparse warnings: (new ones prefixed by >>)
>> arch/arm/mach-ep93xx/clock.c:210:35: sparse: sparse: Using plain integer as NULL pointer
   arch/arm/mach-ep93xx/clock.c:99:9: sparse: sparse: context imbalance in 'ep93xx_clk_enable' - different lock contexts for basic block
   arch/arm/mach-ep93xx/clock.c:116:9: sparse: sparse: context imbalance in 'ep93xx_clk_disable' - different lock contexts for basic block
   arch/arm/mach-ep93xx/clock.c:197:9: sparse: sparse: context imbalance in 'ep93xx_mux_set_parent_lock' - different lock contexts for basic block

vim +210 arch/arm/mach-ep93xx/clock.c

   205	
   206	static int ep93xx_mux_determine_rate(struct clk_hw *hw,
   207					struct clk_rate_request *req)
   208	{
   209		unsigned long rate = req->rate;
 > 210		struct clk *best_parent = 0;
   211		unsigned long __parent_rate;
   212		unsigned long best_rate = 0, actual_rate, mclk_rate;
   213		unsigned long best_parent_rate;
   214		int __div = 0, __pdiv = 0;
   215		int i;
   216	
   217		/*
   218		 * Try the two pll's and the external clock
   219		 * Because the valid predividers are 2, 2.5 and 3, we multiply
   220		 * all the clocks by 2 to avoid floating point math.
   221		 *
   222		 * This is based on the algorithm in the ep93xx raster guide:
   223		 * http://be-a-maverick.com/en/pubs/appNote/AN269REV1.pdf
   224		 *
   225		 */
   226		for (i = 0; i < ARRAY_SIZE(mux_parents); i++) {
   227			struct clk *parent = clk_get_sys(mux_parents[i], NULL);
   228	
   229			__parent_rate = clk_get_rate(parent);
   230			mclk_rate = __parent_rate * 2;
   231	
   232			/* Try each predivider value */
   233			for (__pdiv = 4; __pdiv <= 6; __pdiv++) {
   234				__div = mclk_rate / (rate * __pdiv);
   235				if (__div < 2 || __div > 127)
   236					continue;
   237	
   238				actual_rate = mclk_rate / (__pdiv * __div);
   239				if (is_best(rate, actual_rate, best_rate)) {
   240					best_rate = actual_rate;
   241					best_parent_rate = __parent_rate;
   242					best_parent = parent;
   243				}
   244			}
   245		}
   246	
   247		if (!best_parent)
   248			return -EINVAL;
   249	
   250		req->best_parent_rate = best_parent_rate;
   251		req->best_parent_hw = __clk_get_hw(best_parent);
   252		req->rate = best_rate;
   253	
   254		return 0;
   255	}
   256	

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* arch/arm/mach-ep93xx/clock.c:210:35: sparse: sparse: Using plain integer as NULL pointer
@ 2021-12-07 19:03 ` kernel test robot
  0 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2021-12-07 19:03 UTC (permalink / raw)
  To: Nikita Shubin; +Cc: kbuild-all, linux-kernel, Arnd Bergmann, Alexander Sverdlin

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   cd8c917a56f20f48748dd43d9ae3caff51d5b987
commit: 9645ccc7bd7a16cd73c3be9dee70cd702b03be37 ep93xx: clock: convert in-place to COMMON_CLK
date:   7 weeks ago
config: arm-randconfig-s031-20211207 (https://download.01.org/0day-ci/archive/20211208/202112080347.ZNyya0DH-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9645ccc7bd7a16cd73c3be9dee70cd702b03be37
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 9645ccc7bd7a16cd73c3be9dee70cd702b03be37
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash

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


sparse warnings: (new ones prefixed by >>)
>> arch/arm/mach-ep93xx/clock.c:210:35: sparse: sparse: Using plain integer as NULL pointer
   arch/arm/mach-ep93xx/clock.c:99:9: sparse: sparse: context imbalance in 'ep93xx_clk_enable' - different lock contexts for basic block
   arch/arm/mach-ep93xx/clock.c:116:9: sparse: sparse: context imbalance in 'ep93xx_clk_disable' - different lock contexts for basic block
   arch/arm/mach-ep93xx/clock.c:197:9: sparse: sparse: context imbalance in 'ep93xx_mux_set_parent_lock' - different lock contexts for basic block

vim +210 arch/arm/mach-ep93xx/clock.c

   205	
   206	static int ep93xx_mux_determine_rate(struct clk_hw *hw,
   207					struct clk_rate_request *req)
   208	{
   209		unsigned long rate = req->rate;
 > 210		struct clk *best_parent = 0;
   211		unsigned long __parent_rate;
   212		unsigned long best_rate = 0, actual_rate, mclk_rate;
   213		unsigned long best_parent_rate;
   214		int __div = 0, __pdiv = 0;
   215		int i;
   216	
   217		/*
   218		 * Try the two pll's and the external clock
   219		 * Because the valid predividers are 2, 2.5 and 3, we multiply
   220		 * all the clocks by 2 to avoid floating point math.
   221		 *
   222		 * This is based on the algorithm in the ep93xx raster guide:
   223		 * http://be-a-maverick.com/en/pubs/appNote/AN269REV1.pdf
   224		 *
   225		 */
   226		for (i = 0; i < ARRAY_SIZE(mux_parents); i++) {
   227			struct clk *parent = clk_get_sys(mux_parents[i], NULL);
   228	
   229			__parent_rate = clk_get_rate(parent);
   230			mclk_rate = __parent_rate * 2;
   231	
   232			/* Try each predivider value */
   233			for (__pdiv = 4; __pdiv <= 6; __pdiv++) {
   234				__div = mclk_rate / (rate * __pdiv);
   235				if (__div < 2 || __div > 127)
   236					continue;
   237	
   238				actual_rate = mclk_rate / (__pdiv * __div);
   239				if (is_best(rate, actual_rate, best_rate)) {
   240					best_rate = actual_rate;
   241					best_parent_rate = __parent_rate;
   242					best_parent = parent;
   243				}
   244			}
   245		}
   246	
   247		if (!best_parent)
   248			return -EINVAL;
   249	
   250		req->best_parent_rate = best_parent_rate;
   251		req->best_parent_hw = __clk_get_hw(best_parent);
   252		req->rate = best_rate;
   253	
   254		return 0;
   255	}
   256	

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* arch/arm/mach-ep93xx/clock.c:210:35: sparse: sparse: Using plain integer as NULL pointer
@ 2021-12-07 19:03 ` kernel test robot
  0 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2021-12-07 19:03 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   cd8c917a56f20f48748dd43d9ae3caff51d5b987
commit: 9645ccc7bd7a16cd73c3be9dee70cd702b03be37 ep93xx: clock: convert in-place to COMMON_CLK
date:   7 weeks ago
config: arm-randconfig-s031-20211207 (https://download.01.org/0day-ci/archive/20211208/202112080347.ZNyya0DH-lkp(a)intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9645ccc7bd7a16cd73c3be9dee70cd702b03be37
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 9645ccc7bd7a16cd73c3be9dee70cd702b03be37
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash

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


sparse warnings: (new ones prefixed by >>)
>> arch/arm/mach-ep93xx/clock.c:210:35: sparse: sparse: Using plain integer as NULL pointer
   arch/arm/mach-ep93xx/clock.c:99:9: sparse: sparse: context imbalance in 'ep93xx_clk_enable' - different lock contexts for basic block
   arch/arm/mach-ep93xx/clock.c:116:9: sparse: sparse: context imbalance in 'ep93xx_clk_disable' - different lock contexts for basic block
   arch/arm/mach-ep93xx/clock.c:197:9: sparse: sparse: context imbalance in 'ep93xx_mux_set_parent_lock' - different lock contexts for basic block

vim +210 arch/arm/mach-ep93xx/clock.c

   205	
   206	static int ep93xx_mux_determine_rate(struct clk_hw *hw,
   207					struct clk_rate_request *req)
   208	{
   209		unsigned long rate = req->rate;
 > 210		struct clk *best_parent = 0;
   211		unsigned long __parent_rate;
   212		unsigned long best_rate = 0, actual_rate, mclk_rate;
   213		unsigned long best_parent_rate;
   214		int __div = 0, __pdiv = 0;
   215		int i;
   216	
   217		/*
   218		 * Try the two pll's and the external clock
   219		 * Because the valid predividers are 2, 2.5 and 3, we multiply
   220		 * all the clocks by 2 to avoid floating point math.
   221		 *
   222		 * This is based on the algorithm in the ep93xx raster guide:
   223		 * http://be-a-maverick.com/en/pubs/appNote/AN269REV1.pdf
   224		 *
   225		 */
   226		for (i = 0; i < ARRAY_SIZE(mux_parents); i++) {
   227			struct clk *parent = clk_get_sys(mux_parents[i], NULL);
   228	
   229			__parent_rate = clk_get_rate(parent);
   230			mclk_rate = __parent_rate * 2;
   231	
   232			/* Try each predivider value */
   233			for (__pdiv = 4; __pdiv <= 6; __pdiv++) {
   234				__div = mclk_rate / (rate * __pdiv);
   235				if (__div < 2 || __div > 127)
   236					continue;
   237	
   238				actual_rate = mclk_rate / (__pdiv * __div);
   239				if (is_best(rate, actual_rate, best_rate)) {
   240					best_rate = actual_rate;
   241					best_parent_rate = __parent_rate;
   242					best_parent = parent;
   243				}
   244			}
   245		}
   246	
   247		if (!best_parent)
   248			return -EINVAL;
   249	
   250		req->best_parent_rate = best_parent_rate;
   251		req->best_parent_hw = __clk_get_hw(best_parent);
   252		req->rate = best_rate;
   253	
   254		return 0;
   255	}
   256	

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* arch/arm/mach-ep93xx/clock.c:210:35: sparse: sparse: Using plain integer as NULL pointer
@ 2021-12-07 13:58 ` kernel test robot
  0 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2021-12-07 13:58 UTC (permalink / raw)
  To: Nikita Shubin; +Cc: kbuild-all, linux-kernel, Arnd Bergmann, Alexander Sverdlin

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   cd8c917a56f20f48748dd43d9ae3caff51d5b987
commit: 9645ccc7bd7a16cd73c3be9dee70cd702b03be37 ep93xx: clock: convert in-place to COMMON_CLK
date:   7 weeks ago
config: arm-randconfig-s031-20211207 (https://download.01.org/0day-ci/archive/20211207/202112072152.F1lbyFcy-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9645ccc7bd7a16cd73c3be9dee70cd702b03be37
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 9645ccc7bd7a16cd73c3be9dee70cd702b03be37
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash

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


sparse warnings: (new ones prefixed by >>)
>> arch/arm/mach-ep93xx/clock.c:210:35: sparse: sparse: Using plain integer as NULL pointer
   arch/arm/mach-ep93xx/clock.c:99:9: sparse: sparse: context imbalance in 'ep93xx_clk_enable' - different lock contexts for basic block
   arch/arm/mach-ep93xx/clock.c:116:9: sparse: sparse: context imbalance in 'ep93xx_clk_disable' - different lock contexts for basic block
   arch/arm/mach-ep93xx/clock.c:197:9: sparse: sparse: context imbalance in 'ep93xx_mux_set_parent_lock' - different lock contexts for basic block

vim +210 arch/arm/mach-ep93xx/clock.c

   205	
   206	static int ep93xx_mux_determine_rate(struct clk_hw *hw,
   207					struct clk_rate_request *req)
   208	{
   209		unsigned long rate = req->rate;
 > 210		struct clk *best_parent = 0;
   211		unsigned long __parent_rate;
   212		unsigned long best_rate = 0, actual_rate, mclk_rate;
   213		unsigned long best_parent_rate;
   214		int __div = 0, __pdiv = 0;
   215		int i;
   216	
   217		/*
   218		 * Try the two pll's and the external clock
   219		 * Because the valid predividers are 2, 2.5 and 3, we multiply
   220		 * all the clocks by 2 to avoid floating point math.
   221		 *
   222		 * This is based on the algorithm in the ep93xx raster guide:
   223		 * http://be-a-maverick.com/en/pubs/appNote/AN269REV1.pdf
   224		 *
   225		 */
   226		for (i = 0; i < ARRAY_SIZE(mux_parents); i++) {
   227			struct clk *parent = clk_get_sys(mux_parents[i], NULL);
   228	
   229			__parent_rate = clk_get_rate(parent);
   230			mclk_rate = __parent_rate * 2;
   231	
   232			/* Try each predivider value */
   233			for (__pdiv = 4; __pdiv <= 6; __pdiv++) {
   234				__div = mclk_rate / (rate * __pdiv);
   235				if (__div < 2 || __div > 127)
   236					continue;
   237	
   238				actual_rate = mclk_rate / (__pdiv * __div);
   239				if (is_best(rate, actual_rate, best_rate)) {
   240					best_rate = actual_rate;
   241					best_parent_rate = __parent_rate;
   242					best_parent = parent;
   243				}
   244			}
   245		}
   246	
   247		if (!best_parent)
   248			return -EINVAL;
   249	
   250		req->best_parent_rate = best_parent_rate;
   251		req->best_parent_hw = __clk_get_hw(best_parent);
   252		req->rate = best_rate;
   253	
   254		return 0;
   255	}
   256	

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* arch/arm/mach-ep93xx/clock.c:210:35: sparse: sparse: Using plain integer as NULL pointer
@ 2021-12-07 13:58 ` kernel test robot
  0 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2021-12-07 13:58 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   cd8c917a56f20f48748dd43d9ae3caff51d5b987
commit: 9645ccc7bd7a16cd73c3be9dee70cd702b03be37 ep93xx: clock: convert in-place to COMMON_CLK
date:   7 weeks ago
config: arm-randconfig-s031-20211207 (https://download.01.org/0day-ci/archive/20211207/202112072152.F1lbyFcy-lkp(a)intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9645ccc7bd7a16cd73c3be9dee70cd702b03be37
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 9645ccc7bd7a16cd73c3be9dee70cd702b03be37
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash

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


sparse warnings: (new ones prefixed by >>)
>> arch/arm/mach-ep93xx/clock.c:210:35: sparse: sparse: Using plain integer as NULL pointer
   arch/arm/mach-ep93xx/clock.c:99:9: sparse: sparse: context imbalance in 'ep93xx_clk_enable' - different lock contexts for basic block
   arch/arm/mach-ep93xx/clock.c:116:9: sparse: sparse: context imbalance in 'ep93xx_clk_disable' - different lock contexts for basic block
   arch/arm/mach-ep93xx/clock.c:197:9: sparse: sparse: context imbalance in 'ep93xx_mux_set_parent_lock' - different lock contexts for basic block

vim +210 arch/arm/mach-ep93xx/clock.c

   205	
   206	static int ep93xx_mux_determine_rate(struct clk_hw *hw,
   207					struct clk_rate_request *req)
   208	{
   209		unsigned long rate = req->rate;
 > 210		struct clk *best_parent = 0;
   211		unsigned long __parent_rate;
   212		unsigned long best_rate = 0, actual_rate, mclk_rate;
   213		unsigned long best_parent_rate;
   214		int __div = 0, __pdiv = 0;
   215		int i;
   216	
   217		/*
   218		 * Try the two pll's and the external clock
   219		 * Because the valid predividers are 2, 2.5 and 3, we multiply
   220		 * all the clocks by 2 to avoid floating point math.
   221		 *
   222		 * This is based on the algorithm in the ep93xx raster guide:
   223		 * http://be-a-maverick.com/en/pubs/appNote/AN269REV1.pdf
   224		 *
   225		 */
   226		for (i = 0; i < ARRAY_SIZE(mux_parents); i++) {
   227			struct clk *parent = clk_get_sys(mux_parents[i], NULL);
   228	
   229			__parent_rate = clk_get_rate(parent);
   230			mclk_rate = __parent_rate * 2;
   231	
   232			/* Try each predivider value */
   233			for (__pdiv = 4; __pdiv <= 6; __pdiv++) {
   234				__div = mclk_rate / (rate * __pdiv);
   235				if (__div < 2 || __div > 127)
   236					continue;
   237	
   238				actual_rate = mclk_rate / (__pdiv * __div);
   239				if (is_best(rate, actual_rate, best_rate)) {
   240					best_rate = actual_rate;
   241					best_parent_rate = __parent_rate;
   242					best_parent = parent;
   243				}
   244			}
   245		}
   246	
   247		if (!best_parent)
   248			return -EINVAL;
   249	
   250		req->best_parent_rate = best_parent_rate;
   251		req->best_parent_hw = __clk_get_hw(best_parent);
   252		req->rate = best_rate;
   253	
   254		return 0;
   255	}
   256	

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* arch/arm/mach-ep93xx/clock.c:210:35: sparse: sparse: Using plain integer as NULL pointer
@ 2021-12-07 10:20 ` kernel test robot
  0 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2021-12-07 10:20 UTC (permalink / raw)
  To: Nikita Shubin; +Cc: kbuild-all, linux-kernel, Arnd Bergmann, Alexander Sverdlin

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   cd8c917a56f20f48748dd43d9ae3caff51d5b987
commit: 9645ccc7bd7a16cd73c3be9dee70cd702b03be37 ep93xx: clock: convert in-place to COMMON_CLK
date:   7 weeks ago
config: arm-randconfig-s031-20211207 (https://download.01.org/0day-ci/archive/20211207/202112071840.2bl34nL3-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9645ccc7bd7a16cd73c3be9dee70cd702b03be37
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 9645ccc7bd7a16cd73c3be9dee70cd702b03be37
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash

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


sparse warnings: (new ones prefixed by >>)
>> arch/arm/mach-ep93xx/clock.c:210:35: sparse: sparse: Using plain integer as NULL pointer
   arch/arm/mach-ep93xx/clock.c:99:9: sparse: sparse: context imbalance in 'ep93xx_clk_enable' - different lock contexts for basic block
   arch/arm/mach-ep93xx/clock.c:116:9: sparse: sparse: context imbalance in 'ep93xx_clk_disable' - different lock contexts for basic block
   arch/arm/mach-ep93xx/clock.c:197:9: sparse: sparse: context imbalance in 'ep93xx_mux_set_parent_lock' - different lock contexts for basic block

vim +210 arch/arm/mach-ep93xx/clock.c

   205	
   206	static int ep93xx_mux_determine_rate(struct clk_hw *hw,
   207					struct clk_rate_request *req)
   208	{
   209		unsigned long rate = req->rate;
 > 210		struct clk *best_parent = 0;
   211		unsigned long __parent_rate;
   212		unsigned long best_rate = 0, actual_rate, mclk_rate;
   213		unsigned long best_parent_rate;
   214		int __div = 0, __pdiv = 0;
   215		int i;
   216	
   217		/*
   218		 * Try the two pll's and the external clock
   219		 * Because the valid predividers are 2, 2.5 and 3, we multiply
   220		 * all the clocks by 2 to avoid floating point math.
   221		 *
   222		 * This is based on the algorithm in the ep93xx raster guide:
   223		 * http://be-a-maverick.com/en/pubs/appNote/AN269REV1.pdf
   224		 *
   225		 */
   226		for (i = 0; i < ARRAY_SIZE(mux_parents); i++) {
   227			struct clk *parent = clk_get_sys(mux_parents[i], NULL);
   228	
   229			__parent_rate = clk_get_rate(parent);
   230			mclk_rate = __parent_rate * 2;
   231	
   232			/* Try each predivider value */
   233			for (__pdiv = 4; __pdiv <= 6; __pdiv++) {
   234				__div = mclk_rate / (rate * __pdiv);
   235				if (__div < 2 || __div > 127)
   236					continue;
   237	
   238				actual_rate = mclk_rate / (__pdiv * __div);
   239				if (is_best(rate, actual_rate, best_rate)) {
   240					best_rate = actual_rate;
   241					best_parent_rate = __parent_rate;
   242					best_parent = parent;
   243				}
   244			}
   245		}
   246	
   247		if (!best_parent)
   248			return -EINVAL;
   249	
   250		req->best_parent_rate = best_parent_rate;
   251		req->best_parent_hw = __clk_get_hw(best_parent);
   252		req->rate = best_rate;
   253	
   254		return 0;
   255	}
   256	

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* arch/arm/mach-ep93xx/clock.c:210:35: sparse: sparse: Using plain integer as NULL pointer
@ 2021-12-07 10:20 ` kernel test robot
  0 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2021-12-07 10:20 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   cd8c917a56f20f48748dd43d9ae3caff51d5b987
commit: 9645ccc7bd7a16cd73c3be9dee70cd702b03be37 ep93xx: clock: convert in-place to COMMON_CLK
date:   7 weeks ago
config: arm-randconfig-s031-20211207 (https://download.01.org/0day-ci/archive/20211207/202112071840.2bl34nL3-lkp(a)intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9645ccc7bd7a16cd73c3be9dee70cd702b03be37
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 9645ccc7bd7a16cd73c3be9dee70cd702b03be37
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash

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


sparse warnings: (new ones prefixed by >>)
>> arch/arm/mach-ep93xx/clock.c:210:35: sparse: sparse: Using plain integer as NULL pointer
   arch/arm/mach-ep93xx/clock.c:99:9: sparse: sparse: context imbalance in 'ep93xx_clk_enable' - different lock contexts for basic block
   arch/arm/mach-ep93xx/clock.c:116:9: sparse: sparse: context imbalance in 'ep93xx_clk_disable' - different lock contexts for basic block
   arch/arm/mach-ep93xx/clock.c:197:9: sparse: sparse: context imbalance in 'ep93xx_mux_set_parent_lock' - different lock contexts for basic block

vim +210 arch/arm/mach-ep93xx/clock.c

   205	
   206	static int ep93xx_mux_determine_rate(struct clk_hw *hw,
   207					struct clk_rate_request *req)
   208	{
   209		unsigned long rate = req->rate;
 > 210		struct clk *best_parent = 0;
   211		unsigned long __parent_rate;
   212		unsigned long best_rate = 0, actual_rate, mclk_rate;
   213		unsigned long best_parent_rate;
   214		int __div = 0, __pdiv = 0;
   215		int i;
   216	
   217		/*
   218		 * Try the two pll's and the external clock
   219		 * Because the valid predividers are 2, 2.5 and 3, we multiply
   220		 * all the clocks by 2 to avoid floating point math.
   221		 *
   222		 * This is based on the algorithm in the ep93xx raster guide:
   223		 * http://be-a-maverick.com/en/pubs/appNote/AN269REV1.pdf
   224		 *
   225		 */
   226		for (i = 0; i < ARRAY_SIZE(mux_parents); i++) {
   227			struct clk *parent = clk_get_sys(mux_parents[i], NULL);
   228	
   229			__parent_rate = clk_get_rate(parent);
   230			mclk_rate = __parent_rate * 2;
   231	
   232			/* Try each predivider value */
   233			for (__pdiv = 4; __pdiv <= 6; __pdiv++) {
   234				__div = mclk_rate / (rate * __pdiv);
   235				if (__div < 2 || __div > 127)
   236					continue;
   237	
   238				actual_rate = mclk_rate / (__pdiv * __div);
   239				if (is_best(rate, actual_rate, best_rate)) {
   240					best_rate = actual_rate;
   241					best_parent_rate = __parent_rate;
   242					best_parent = parent;
   243				}
   244			}
   245		}
   246	
   247		if (!best_parent)
   248			return -EINVAL;
   249	
   250		req->best_parent_rate = best_parent_rate;
   251		req->best_parent_hw = __clk_get_hw(best_parent);
   252		req->rate = best_rate;
   253	
   254		return 0;
   255	}
   256	

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-03-18  1:55 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-16 17:50 arch/arm/mach-ep93xx/clock.c:210:35: sparse: sparse: Using plain integer as NULL pointer kernel test robot
2022-01-16 17:50 ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2022-03-18  1:55 kernel test robot
2022-02-17 13:45 kernel test robot
2022-02-17 13:45 ` kernel test robot
2021-12-07 19:03 kernel test robot
2021-12-07 19:03 ` kernel test robot
2021-12-07 13:58 kernel test robot
2021-12-07 13:58 ` kernel test robot
2021-12-07 10:20 kernel test robot
2021-12-07 10:20 ` kernel test robot

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.