Re: [linusw-pinctrl:devel 15/25] drivers/pinctrl/realtek/pinctrl-rtd.c:180:29: warning: '%s' directive argument is null

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 26, 2023 at 8:48 PM kernel test robot <lkp@xxxxxxxxx> wrote:

>    drivers/pinctrl/realtek/pinctrl-rtd.c: In function 'rtd_pinctrl_set_one_mux':
> >> drivers/pinctrl/realtek/pinctrl-rtd.c:180:29: warning: '%s' directive argument is null [-Wformat-overflow=]
>      180 |         dev_err(pcdev->dev, "No function %s available for pin %s\n", func_name, mux->name);
>          |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

So:

>    155  static int rtd_pinctrl_set_one_mux(struct pinctrl_dev *pcdev,
>    156                                     unsigned int pin, const char *func_name)
>    157  {
>    158          struct rtd_pinctrl *data = pinctrl_dev_get_drvdata(pcdev);
>    159          const struct rtd_pin_desc *mux;
>    160          int ret = 0;
>    161          int i;
>    162
>    163          mux = rtd_pinctrl_find_mux(data, pin);
>    164          if (!mux)
>    165                  return 0;
>    166
>    167          if (!mux->functions) {
>    168                  dev_err(pcdev->dev, "No functions available for pin %s\n", mux->name);
>    169                  return -ENOTSUPP;
>    170          }
>    171
>    172          for (i = 0; mux->functions[i].name; i++) {
>    173                  if (strcmp(mux->functions[i].name, func_name) != 0)
>    174                          continue;
>    175                  ret = regmap_update_bits(data->regmap_pinctrl, mux->mux_offset, mux->mux_mask,
>    176                                          mux->functions[i].mux_value);
>    177                  return ret;
>    178          }
>    179
>  > 180          dev_err(pcdev->dev, "No function %s available for pin %s\n", func_name, mux->name);

I can't see it, what am I missing? Why would func_name or mux->name be NULL?

Yours,
Linus Walleij




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux