linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, lakshmi.sowjanya.d@intel.com,
	linus.walleij@linaro.org
Cc: lkp@intel.com, kbuild-all@lists.01.org,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	andriy.shevchenko@linux.intel.com,
	lakshmi.bai.raja.subramanian@intel.com, tamal.saha@intel.com,
	lakshmi.sowjanya.d@intel.com
Subject: [kbuild] Re: [PATCH v3 2/2] pinctrl: Add Intel Keem Bay pinctrl driver
Date: Wed, 28 Jul 2021 22:16:32 +0300	[thread overview]
Message-ID: <202107290246.hNQDlfoB-lkp@intel.com> (raw)
In-Reply-To: <20210716162724.26047-3-lakshmi.sowjanya.d@intel.com>

Hi,

url:    https://github.com/0day-ci/linux/commits/lakshmi-sowjanya-d-intel-com/Add-pinctrl-support-for-Intel-Keem-Bay-SoC/20210718-112204 
base:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git  devel
config: arm64-randconfig-m031-20210728 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 10.3.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:
drivers/pinctrl/pinctrl-keembay.c:1147 keembay_pinconf_set() error: uninitialized symbol 'ret'.

vim +/ret +1147 drivers/pinctrl/pinctrl-keembay.c

57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1097  static int keembay_pinconf_set(struct pinctrl_dev *pctldev, unsigned int pin,
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1098  			       unsigned long *cfg, unsigned int num_configs)
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1099  {
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1100  	struct keembay_pinctrl *kpc = pinctrl_dev_get_drvdata(pctldev);
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1101  	enum pin_config_param param;
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1102  	unsigned int arg, i;
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1103  	int ret;
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1104  
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1105  	if (pin >= kpc->npins)
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1106  		return -EINVAL;
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1107  
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1108  	for (i = 0; i < num_configs; i++) {
                                                                    ^^^^^^^^^^^^^^^^
Probably num_configs can't be zero, but that's what the check is
complaining about.

57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1109  		param = pinconf_to_config_param(cfg[i]);
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1110  		arg = pinconf_to_config_argument(cfg[i]);
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1111  
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1112  		switch (param) {
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1113  		case PIN_CONFIG_BIAS_DISABLE:
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1114  			ret = keembay_pinconf_set_pull(kpc, pin, KEEMBAY_GPIO_DISABLE);
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1115  			break;
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1116  
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1117  		case PIN_CONFIG_BIAS_PULL_UP:
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1118  			ret = keembay_pinconf_set_pull(kpc, pin, KEEMBAY_GPIO_PULL_UP);
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1119  			break;
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1120  
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1121  		case PIN_CONFIG_BIAS_PULL_DOWN:
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1122  			ret = keembay_pinconf_set_pull(kpc, pin, KEEMBAY_GPIO_PULL_DOWN);
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1123  			break;
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1124  
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1125  		case PIN_CONFIG_BIAS_BUS_HOLD:
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1126  			ret = keembay_pinconf_set_pull(kpc, pin, KEEMBAY_GPIO_BUS_HOLD);
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1127  			break;
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1128  
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1129  		case PIN_CONFIG_INPUT_SCHMITT_ENABLE:
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1130  			ret = keembay_pinconf_set_schmitt(kpc, pin, arg);
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1131  			break;
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1132  
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1133  		case PIN_CONFIG_SLEW_RATE:
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1134  			ret = keembay_pinconf_set_slew_rate(kpc, pin, arg);
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1135  			break;
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1136  
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1137  		case PIN_CONFIG_DRIVE_STRENGTH:
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1138  			ret = keembay_pinconf_set_drive(kpc, pin, arg);
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1139  			break;
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1140  
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1141  		default:
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1142  			return -EINVAL;
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1143  		}
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1144  		if (ret)
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1145  			return ret;
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1146  	}
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16 @1147  	return ret;
57d6783f95085ab Lakshmi Sowjanya D 2021-07-16  1148  }

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

_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-leave@lists.01.org


  reply	other threads:[~2021-07-28 19:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16 16:27 [PATCH v3 0/2] Add pinctrl support for Intel Keem Bay SoC lakshmi.sowjanya.d
2021-07-16 16:27 ` [PATCH v3 1/2] dt-bindings: pinctrl: Add bindings for Intel Keembay pinctrl driver lakshmi.sowjanya.d
2021-07-30  9:05   ` Linus Walleij
2021-07-30 11:29     ` Andy Shevchenko
2021-07-30 11:58       ` Linus Walleij
2021-07-30  9:15   ` Linus Walleij
2021-07-30 11:06     ` D, Lakshmi Sowjanya
2021-07-16 16:27 ` [PATCH v3 2/2] pinctrl: Add Intel Keem Bay " lakshmi.sowjanya.d
2021-07-28 19:16   ` Dan Carpenter [this message]
2021-07-30 11:05     ` [kbuild] " D, Lakshmi Sowjanya
2021-07-30  9:13   ` Linus Walleij
2021-07-30  9:32     ` Andy Shevchenko
2021-07-30 11:06       ` D, Lakshmi Sowjanya
2021-07-30 11:30         ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202107290246.hNQDlfoB-lkp@intel.com \
    --to=dan.carpenter@oracle.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kbuild@lists.01.org \
    --cc=lakshmi.bai.raja.subramanian@intel.com \
    --cc=lakshmi.sowjanya.d@intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=tamal.saha@intel.com \
    --subject='[kbuild] Re: [PATCH v3 2/2] pinctrl: Add Intel Keem Bay pinctrl driver' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).