All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>,
	linux-omap@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: OMAPDSS: panel-sharp-ls037v7dw01: update to use gpiod
Date: Wed, 13 Jan 2016 15:22:31 -0800	[thread overview]
Message-ID: <20160113232230.GQ12600@atomide.com> (raw)
In-Reply-To: <20151224072926.GE29642@mwanda>

Hi,

* Dan Carpenter <dan.carpenter@oracle.com> [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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-01-13 23:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-24  7:29 OMAPDSS: panel-sharp-ls037v7dw01: update to use gpiod Dan Carpenter
2016-01-13 23:22 ` Tony Lindgren [this message]
2016-01-14  7:44   ` Tomi Valkeinen
2016-01-14 16:45     ` Tony Lindgren

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=20160113232230.GQ12600@atomide.com \
    --to=tony@atomide.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tomi.valkeinen@ti.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.