All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Phil Reid <preid@electromag.com.au>,
	dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH v3 3/4] staging: fbtft: Don't spam logs when probe is deferred
Date: Thu, 29 Apr 2021 17:42:44 +0300	[thread overview]
Message-ID: <20210429144244.GE1981@kadam> (raw)
In-Reply-To: <20210428130415.55406-4-andriy.shevchenko@linux.intel.com>

On Wed, Apr 28, 2021 at 04:04:14PM +0300, Andy Shevchenko wrote:
> @@ -75,20 +75,16 @@ static int fbtft_request_one_gpio(struct fbtft_par *par,
>  				  struct gpio_desc **gpiop)
>  {
>  	struct device *dev = par->info->device;
> -	int ret = 0;
>  
>  	*gpiop = devm_gpiod_get_index_optional(dev, name, index,
>  					       GPIOD_OUT_LOW);
> -	if (IS_ERR(*gpiop)) {
> -		ret = PTR_ERR(*gpiop);
> -		dev_err(dev,
> -			"Failed to request %s GPIO: %d\n", name, ret);
> -		return ret;
> -	}
> +	if (IS_ERR(*gpiop))
> +		dev_err_probe(dev, PTR_ERR(*gpiop), "Failed to request %s GPIO\n", name);

This should be a return statement:

		return dev_err_probe(dev, PTR_ERR(*gpiop), "Failed to request %s GPIO\n", name);

> +
>  	fbtft_par_dbg(DEBUG_REQUEST_GPIOS, par, "%s: '%s' GPIO\n",
>  		      __func__, name);
>  
> -	return ret;
> +	return 0;
>  }

regards,
dan carpenter


WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-fbdev@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	Phil Reid <preid@electromag.com.au>
Subject: Re: [PATCH v3 3/4] staging: fbtft: Don't spam logs when probe is deferred
Date: Thu, 29 Apr 2021 17:42:44 +0300	[thread overview]
Message-ID: <20210429144244.GE1981@kadam> (raw)
In-Reply-To: <20210428130415.55406-4-andriy.shevchenko@linux.intel.com>

On Wed, Apr 28, 2021 at 04:04:14PM +0300, Andy Shevchenko wrote:
> @@ -75,20 +75,16 @@ static int fbtft_request_one_gpio(struct fbtft_par *par,
>  				  struct gpio_desc **gpiop)
>  {
>  	struct device *dev = par->info->device;
> -	int ret = 0;
>  
>  	*gpiop = devm_gpiod_get_index_optional(dev, name, index,
>  					       GPIOD_OUT_LOW);
> -	if (IS_ERR(*gpiop)) {
> -		ret = PTR_ERR(*gpiop);
> -		dev_err(dev,
> -			"Failed to request %s GPIO: %d\n", name, ret);
> -		return ret;
> -	}
> +	if (IS_ERR(*gpiop))
> +		dev_err_probe(dev, PTR_ERR(*gpiop), "Failed to request %s GPIO\n", name);

This should be a return statement:

		return dev_err_probe(dev, PTR_ERR(*gpiop), "Failed to request %s GPIO\n", name);

> +
>  	fbtft_par_dbg(DEBUG_REQUEST_GPIOS, par, "%s: '%s' GPIO\n",
>  		      __func__, name);
>  
> -	return ret;
> +	return 0;
>  }

regards,
dan carpenter

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2021-04-29 14:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28 13:04 [PATCH v3 0/4] staging: fbtft: Fixing GPIO handling issues Andy Shevchenko
2021-04-28 13:04 ` Andy Shevchenko
2021-04-28 13:04 ` [PATCH v3 1/4] staging: fbtft: Rectify GPIO handling Andy Shevchenko
2021-04-28 13:04   ` Andy Shevchenko
2021-05-03 16:38   ` Greg Kroah-Hartman
2021-05-03 16:38     ` Greg Kroah-Hartman
2021-05-03 17:08     ` Andy Shevchenko
2021-05-03 17:08       ` Andy Shevchenko
2021-04-28 13:04 ` [PATCH v3 2/4] staging: fbtft: Replace custom ->reset() with generic one Andy Shevchenko
2021-04-28 13:04   ` Andy Shevchenko
2021-04-28 13:04 ` [PATCH v3 3/4] staging: fbtft: Don't spam logs when probe is deferred Andy Shevchenko
2021-04-28 13:04   ` Andy Shevchenko
2021-04-29 14:42   ` Dan Carpenter [this message]
2021-04-29 14:42     ` Dan Carpenter
2021-04-29 15:40     ` Dan Carpenter
2021-04-29 15:40       ` Dan Carpenter
2021-04-29 16:56     ` Andy Shevchenko
2021-04-29 16:56       ` Andy Shevchenko
2021-04-28 13:04 ` [PATCH v3 4/4] staging: fbtft: Update TODO Andy Shevchenko
2021-04-28 13:04   ` 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=20210429144244.GE1981@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=preid@electromag.com.au \
    /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.