All of lore.kernel.org
 help / color / mirror / Atom feed
* sound/soc/sh/rcar/ssiu.c:112 rsnd_ssiu_busif_err_status_clear() error: uninitialized symbol 'offset'.
@ 2022-04-20 11:28 ` Dan Carpenter
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2022-04-19 16:44 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
CC: Mark Brown <broonie@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b2d229d4ddb17db541098b83524d901257e93845
commit: cfb7b8bf1e2d660583dd91d870cec2f6728cbdbc ASoC: rsnd: tidyup rsnd_ssiu_busif_err_status_clear()
date:   11 months ago
:::::: branch date: 2 days ago
:::::: commit date: 11 months ago
config: h8300-randconfig-m031-20220418 (https://download.01.org/0day-ci/archive/20220420/202204200039.noPcQg3a-lkp(a)intel.com/config)
compiler: h8300-linux-gcc (GCC) 11.2.0

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

smatch warnings:
sound/soc/sh/rcar/ssiu.c:112 rsnd_ssiu_busif_err_status_clear() error: uninitialized symbol 'offset'.
sound/soc/sh/rcar/ssiu.c:114 rsnd_ssiu_busif_err_status_clear() error: uninitialized symbol 'shift'.

vim +/offset +112 sound/soc/sh/rcar/ssiu.c

83b220cf8eb2aa Kuninori Morimoto 2021-05-27   88  
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   89  bool rsnd_ssiu_busif_err_status_clear(struct rsnd_mod *mod)
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   90  {
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   91  	bool error = false;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   92  	int id = rsnd_mod_id(mod);
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27   93  	int shift, offset;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   94  	int i;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   95  
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   96  	switch (id) {
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   97  	case 0:
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   98  	case 1:
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   99  	case 2:
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  100  	case 3:
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  101  	case 4:
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  102  		shift  = id;
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  103  		offset = 0;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  104  		break;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  105  	case 9:
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  106  		shift  = 1;
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  107  		offset = 1;
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  108  		break;
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  109  	}
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  110  
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  111  	for (i = 0; i < 4; i++) {
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27 @112  		u32 reg = SSI_SYS_STATUS(i * 2) + offset;
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  113  		u32 status = rsnd_mod_read(mod, reg);
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27 @114  		u32 val = 0xf << (shift * 4);
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  115  
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  116  		status &= val;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  117  		if (status) {
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  118  			struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  119  			struct device *dev = rsnd_priv_to_dev(priv);
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  120  
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  121  			rsnd_print_irq_status(dev, "%s err status : 0x%08x\n",
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  122  					      rsnd_mod_name(mod), status);
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  123  			error = true;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  124  		}
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  125  		rsnd_mod_write(mod, reg, val);
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  126  	}
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  127  
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  128  	return error;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  129  }
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  130  

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

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

* sound/soc/sh/rcar/ssiu.c:112 rsnd_ssiu_busif_err_status_clear() error: uninitialized symbol 'offset'.
@ 2022-04-20 11:28 ` Dan Carpenter
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2022-04-20 11:28 UTC (permalink / raw)
  To: kbuild, Kuninori Morimoto; +Cc: lkp, kbuild-all, linux-kernel, Mark Brown

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b2d229d4ddb17db541098b83524d901257e93845
commit: cfb7b8bf1e2d660583dd91d870cec2f6728cbdbc ASoC: rsnd: tidyup rsnd_ssiu_busif_err_status_clear()
config: h8300-randconfig-m031-20220418 (https://download.01.org/0day-ci/archive/20220420/202204200039.noPcQg3a-lkp@intel.com/config)
compiler: h8300-linux-gcc (GCC) 11.2.0

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

smatch warnings:
sound/soc/sh/rcar/ssiu.c:112 rsnd_ssiu_busif_err_status_clear() error: uninitialized symbol 'offset'.
sound/soc/sh/rcar/ssiu.c:114 rsnd_ssiu_busif_err_status_clear() error: uninitialized symbol 'shift'.

vim +/offset +112 sound/soc/sh/rcar/ssiu.c

83b220cf8eb2aa Kuninori Morimoto 2021-05-27   89  bool rsnd_ssiu_busif_err_status_clear(struct rsnd_mod *mod)
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   90  {
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   91  	bool error = false;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   92  	int id = rsnd_mod_id(mod);
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27   93  	int shift, offset;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   94  	int i;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   95  
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   96  	switch (id) {
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   97  	case 0:
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   98  	case 1:
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   99  	case 2:
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  100  	case 3:
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  101  	case 4:
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  102  		shift  = id;
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  103  		offset = 0;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  104  		break;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  105  	case 9:
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  106  		shift  = 1;
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  107  		offset = 1;
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  108  		break;

No default case.  The kbuild bot does not build with the cross function
DB, but even if it did, this code is too complicated.  For example,
the rsnd_ssi_probe() function calls rsnd_node_fixed_index() but does not
check for errors so Smatch thinks "id" can be equal to -EINVAL.

cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  109  	}
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  110  
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  111  	for (i = 0; i < 4; i++) {
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27 @112  		u32 reg = SSI_SYS_STATUS(i * 2) + offset;
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  113  		u32 status = rsnd_mod_read(mod, reg);
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27 @114  		u32 val = 0xf << (shift * 4);
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  115  
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  116  		status &= val;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  117  		if (status) {
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  118  			struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  119  			struct device *dev = rsnd_priv_to_dev(priv);
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  120  
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  121  			rsnd_print_irq_status(dev, "%s err status : 0x%08x\n",
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  122  					      rsnd_mod_name(mod), status);
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  123  			error = true;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  124  		}
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  125  		rsnd_mod_write(mod, reg, val);
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  126  	}
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  127  
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  128  	return error;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  129  }

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


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

* sound/soc/sh/rcar/ssiu.c:112 rsnd_ssiu_busif_err_status_clear() error: uninitialized symbol 'offset'.
@ 2022-04-20 11:28 ` Dan Carpenter
  0 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2022-04-20 11:28 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b2d229d4ddb17db541098b83524d901257e93845
commit: cfb7b8bf1e2d660583dd91d870cec2f6728cbdbc ASoC: rsnd: tidyup rsnd_ssiu_busif_err_status_clear()
config: h8300-randconfig-m031-20220418 (https://download.01.org/0day-ci/archive/20220420/202204200039.noPcQg3a-lkp(a)intel.com/config)
compiler: h8300-linux-gcc (GCC) 11.2.0

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

smatch warnings:
sound/soc/sh/rcar/ssiu.c:112 rsnd_ssiu_busif_err_status_clear() error: uninitialized symbol 'offset'.
sound/soc/sh/rcar/ssiu.c:114 rsnd_ssiu_busif_err_status_clear() error: uninitialized symbol 'shift'.

vim +/offset +112 sound/soc/sh/rcar/ssiu.c

83b220cf8eb2aa Kuninori Morimoto 2021-05-27   89  bool rsnd_ssiu_busif_err_status_clear(struct rsnd_mod *mod)
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   90  {
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   91  	bool error = false;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   92  	int id = rsnd_mod_id(mod);
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27   93  	int shift, offset;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   94  	int i;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   95  
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   96  	switch (id) {
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   97  	case 0:
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   98  	case 1:
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   99  	case 2:
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  100  	case 3:
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  101  	case 4:
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  102  		shift  = id;
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  103  		offset = 0;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  104  		break;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  105  	case 9:
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  106  		shift  = 1;
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  107  		offset = 1;
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  108  		break;

No default case.  The kbuild bot does not build with the cross function
DB, but even if it did, this code is too complicated.  For example,
the rsnd_ssi_probe() function calls rsnd_node_fixed_index() but does not
check for errors so Smatch thinks "id" can be equal to -EINVAL.

cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  109  	}
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  110  
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  111  	for (i = 0; i < 4; i++) {
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27 @112  		u32 reg = SSI_SYS_STATUS(i * 2) + offset;
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  113  		u32 status = rsnd_mod_read(mod, reg);
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27 @114  		u32 val = 0xf << (shift * 4);
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  115  
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  116  		status &= val;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  117  		if (status) {
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  118  			struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  119  			struct device *dev = rsnd_priv_to_dev(priv);
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  120  
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  121  			rsnd_print_irq_status(dev, "%s err status : 0x%08x\n",
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  122  					      rsnd_mod_name(mod), status);
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  123  			error = true;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  124  		}
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  125  		rsnd_mod_write(mod, reg, val);
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  126  	}
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  127  
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  128  	return error;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  129  }

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

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

* sound/soc/sh/rcar/ssiu.c:112 rsnd_ssiu_busif_err_status_clear() error: uninitialized symbol 'offset'.
@ 2022-04-21  6:44 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2022-04-21  6:44 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
CC: Mark Brown <broonie@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b253435746d9a4a701b5f09211b9c14d3370d0da
commit: cfb7b8bf1e2d660583dd91d870cec2f6728cbdbc ASoC: rsnd: tidyup rsnd_ssiu_busif_err_status_clear()
date:   11 months ago
:::::: branch date: 8 hours ago
:::::: commit date: 11 months ago
config: h8300-randconfig-m031-20220418 (https://download.01.org/0day-ci/archive/20220421/202204211144.34NRIRGS-lkp(a)intel.com/config)
compiler: h8300-linux-gcc (GCC) 11.2.0

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

smatch warnings:
sound/soc/sh/rcar/ssiu.c:112 rsnd_ssiu_busif_err_status_clear() error: uninitialized symbol 'offset'.
sound/soc/sh/rcar/ssiu.c:114 rsnd_ssiu_busif_err_status_clear() error: uninitialized symbol 'shift'.

vim +/offset +112 sound/soc/sh/rcar/ssiu.c

83b220cf8eb2aa9 Kuninori Morimoto 2021-05-27   88  
83b220cf8eb2aa9 Kuninori Morimoto 2021-05-27   89  bool rsnd_ssiu_busif_err_status_clear(struct rsnd_mod *mod)
83b220cf8eb2aa9 Kuninori Morimoto 2021-05-27   90  {
83b220cf8eb2aa9 Kuninori Morimoto 2021-05-27   91  	bool error = false;
83b220cf8eb2aa9 Kuninori Morimoto 2021-05-27   92  	int id = rsnd_mod_id(mod);
cfb7b8bf1e2d660 Kuninori Morimoto 2021-05-27   93  	int shift, offset;
83b220cf8eb2aa9 Kuninori Morimoto 2021-05-27   94  	int i;
83b220cf8eb2aa9 Kuninori Morimoto 2021-05-27   95  
83b220cf8eb2aa9 Kuninori Morimoto 2021-05-27   96  	switch (id) {
83b220cf8eb2aa9 Kuninori Morimoto 2021-05-27   97  	case 0:
83b220cf8eb2aa9 Kuninori Morimoto 2021-05-27   98  	case 1:
83b220cf8eb2aa9 Kuninori Morimoto 2021-05-27   99  	case 2:
83b220cf8eb2aa9 Kuninori Morimoto 2021-05-27  100  	case 3:
83b220cf8eb2aa9 Kuninori Morimoto 2021-05-27  101  	case 4:
cfb7b8bf1e2d660 Kuninori Morimoto 2021-05-27  102  		shift  = id;
cfb7b8bf1e2d660 Kuninori Morimoto 2021-05-27  103  		offset = 0;
83b220cf8eb2aa9 Kuninori Morimoto 2021-05-27  104  		break;
83b220cf8eb2aa9 Kuninori Morimoto 2021-05-27  105  	case 9:
cfb7b8bf1e2d660 Kuninori Morimoto 2021-05-27  106  		shift  = 1;
cfb7b8bf1e2d660 Kuninori Morimoto 2021-05-27  107  		offset = 1;
cfb7b8bf1e2d660 Kuninori Morimoto 2021-05-27  108  		break;
cfb7b8bf1e2d660 Kuninori Morimoto 2021-05-27  109  	}
cfb7b8bf1e2d660 Kuninori Morimoto 2021-05-27  110  
83b220cf8eb2aa9 Kuninori Morimoto 2021-05-27  111  	for (i = 0; i < 4; i++) {
cfb7b8bf1e2d660 Kuninori Morimoto 2021-05-27 @112  		u32 reg = SSI_SYS_STATUS(i * 2) + offset;
cfb7b8bf1e2d660 Kuninori Morimoto 2021-05-27  113  		u32 status = rsnd_mod_read(mod, reg);
cfb7b8bf1e2d660 Kuninori Morimoto 2021-05-27 @114  		u32 val = 0xf << (shift * 4);
83b220cf8eb2aa9 Kuninori Morimoto 2021-05-27  115  
cfb7b8bf1e2d660 Kuninori Morimoto 2021-05-27  116  		status &= val;
83b220cf8eb2aa9 Kuninori Morimoto 2021-05-27  117  		if (status) {
cfb7b8bf1e2d660 Kuninori Morimoto 2021-05-27  118  			struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
cfb7b8bf1e2d660 Kuninori Morimoto 2021-05-27  119  			struct device *dev = rsnd_priv_to_dev(priv);
cfb7b8bf1e2d660 Kuninori Morimoto 2021-05-27  120  
83b220cf8eb2aa9 Kuninori Morimoto 2021-05-27  121  			rsnd_print_irq_status(dev, "%s err status : 0x%08x\n",
83b220cf8eb2aa9 Kuninori Morimoto 2021-05-27  122  					      rsnd_mod_name(mod), status);
83b220cf8eb2aa9 Kuninori Morimoto 2021-05-27  123  			error = true;
83b220cf8eb2aa9 Kuninori Morimoto 2021-05-27  124  		}
cfb7b8bf1e2d660 Kuninori Morimoto 2021-05-27  125  		rsnd_mod_write(mod, reg, val);
83b220cf8eb2aa9 Kuninori Morimoto 2021-05-27  126  	}
83b220cf8eb2aa9 Kuninori Morimoto 2021-05-27  127  
83b220cf8eb2aa9 Kuninori Morimoto 2021-05-27  128  	return error;
83b220cf8eb2aa9 Kuninori Morimoto 2021-05-27  129  }
83b220cf8eb2aa9 Kuninori Morimoto 2021-05-27  130  

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

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

* sound/soc/sh/rcar/ssiu.c:112 rsnd_ssiu_busif_err_status_clear() error: uninitialized symbol 'offset'.
@ 2022-04-18 14:07 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2022-04-18 14:07 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
CC: Mark Brown <broonie@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   b2d229d4ddb17db541098b83524d901257e93845
commit: cfb7b8bf1e2d660583dd91d870cec2f6728cbdbc ASoC: rsnd: tidyup rsnd_ssiu_busif_err_status_clear()
date:   11 months ago
:::::: branch date: 17 hours ago
:::::: commit date: 11 months ago
config: h8300-randconfig-m031-20220418 (https://download.01.org/0day-ci/archive/20220418/202204182245.aZyKqEzi-lkp(a)intel.com/config)
compiler: h8300-linux-gcc (GCC) 11.2.0

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

smatch warnings:
sound/soc/sh/rcar/ssiu.c:112 rsnd_ssiu_busif_err_status_clear() error: uninitialized symbol 'offset'.
sound/soc/sh/rcar/ssiu.c:114 rsnd_ssiu_busif_err_status_clear() error: uninitialized symbol 'shift'.

vim +/offset +112 sound/soc/sh/rcar/ssiu.c

83b220cf8eb2aa Kuninori Morimoto 2021-05-27   88  
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   89  bool rsnd_ssiu_busif_err_status_clear(struct rsnd_mod *mod)
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   90  {
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   91  	bool error = false;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   92  	int id = rsnd_mod_id(mod);
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27   93  	int shift, offset;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   94  	int i;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   95  
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   96  	switch (id) {
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   97  	case 0:
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   98  	case 1:
83b220cf8eb2aa Kuninori Morimoto 2021-05-27   99  	case 2:
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  100  	case 3:
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  101  	case 4:
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  102  		shift  = id;
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  103  		offset = 0;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  104  		break;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  105  	case 9:
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  106  		shift  = 1;
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  107  		offset = 1;
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  108  		break;
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  109  	}
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  110  
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  111  	for (i = 0; i < 4; i++) {
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27 @112  		u32 reg = SSI_SYS_STATUS(i * 2) + offset;
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  113  		u32 status = rsnd_mod_read(mod, reg);
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27 @114  		u32 val = 0xf << (shift * 4);
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  115  
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  116  		status &= val;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  117  		if (status) {
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  118  			struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  119  			struct device *dev = rsnd_priv_to_dev(priv);
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  120  
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  121  			rsnd_print_irq_status(dev, "%s err status : 0x%08x\n",
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  122  					      rsnd_mod_name(mod), status);
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  123  			error = true;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  124  		}
cfb7b8bf1e2d66 Kuninori Morimoto 2021-05-27  125  		rsnd_mod_write(mod, reg, val);
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  126  	}
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  127  
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  128  	return error;
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  129  }
83b220cf8eb2aa Kuninori Morimoto 2021-05-27  130  

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

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

end of thread, other threads:[~2022-04-21  6:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-19 16:44 sound/soc/sh/rcar/ssiu.c:112 rsnd_ssiu_busif_err_status_clear() error: uninitialized symbol 'offset' kernel test robot
2022-04-20 11:28 ` Dan Carpenter
2022-04-20 11:28 ` Dan Carpenter
  -- strict thread matches above, loose matches on Subject: below --
2022-04-21  6:44 kernel test robot
2022-04-18 14:07 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.