Re: OMAPDSS: panel-sharp-ls037v7dw01: update to use gpiod

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

 



Hi,

* Dan Carpenter <dan.carpenter@xxxxxxxxxx> [151223 23:29]:
> [ It's weird that I'm just now getting this warning from 2014...  Oh
> well, looks legit. -dan ]

Sorry for the delay on this one, got distracted few times with
other bugs to deal with. This seems like a valid warning yeah.

Tomi, do we really need two copies of the the same panels
files in kernel?

For example:

$ find . -name panel-sharp-ls037v7dw01.c
./drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c
./drivers/video/fbdev/omap2/omapfb/displays/panel-sharp-ls037v7dw01.c

> The patch 9522f9fe86f9: "OMAPDSS: panel-sharp-ls037v7dw01: update to
> use gpiod" from Apr 28, 2014, leads to the following static checker
> warning:
> 
> 	drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c:213 sharp_ls_get_gpio()
> 	warn: 'gd' isn't an ERR_PTR
> 
> drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c
>    200  static int sharp_ls_get_gpio(struct device *dev, int gpio, unsigned long flags,
>    201                    char *desc, struct gpio_desc **gpiod)
>    202  {
>    203          struct gpio_desc *gd;
>    204          int r;
>    205  
>    206          *gpiod = NULL;
>    207  
>    208          r = devm_gpio_request_one(dev, gpio, flags, desc);
>    209          if (r)
>    210                  return r == -ENOENT ? 0 : r;
>    211  
>    212          gd = gpio_to_desc(gpio);
>    213          if (IS_ERR(gd))
>    214                  return PTR_ERR(gd) == -ENOENT ? 0 : PTR_ERR(gd);
>                                ^^^^^^^^^^^^^^^^^^^^^^
> gd can be an ERR_PTR if gpio_to_desc is defined out but it's never
> -ENOENT.

Seems like we can just remove the check for -ENOENT here.

Rgards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux