public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Frank Rowand <frowand.list@gmail.com>,
	Kent Gibson <warthog618@gmail.com>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org,
	Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: Re: [PATCH] gpiolib: demote the hogging log messages to debug
Date: Tue, 6 Jun 2023 17:57:53 +0300	[thread overview]
Message-ID: <ZH9JcR2gS6n67eHX@smile.fi.intel.com> (raw)
In-Reply-To: <20230605125248.279921-1-brgl@bgdev.pl>

On Mon, Jun 05, 2023 at 02:52:48PM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> 
> Drivers should be silent when they work correctly. There's no reason to
> emit info messages when GPIO lines are hogged. Demote the message to
> debug.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> Suggested-by: Kent Gibson <warthog618@gmail.com>
> ---
>  drivers/gpio/gpiolib.c |  2 +-
>  drivers/of/unittest.c  | 16 ++++++++--------
>  2 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
> index a7220e04a93e..e4515bda8915 100644
> --- a/drivers/gpio/gpiolib.c
> +++ b/drivers/gpio/gpiolib.c
> @@ -4243,7 +4243,7 @@ int gpiod_hog(struct gpio_desc *desc, const char *name,
>  	/* Mark GPIO as hogged so it can be identified and removed later */
>  	set_bit(FLAG_IS_HOGGED, &desc->flags);
>  
> -	gpiod_info(desc, "hogged as %s%s\n",
> +	gpiod_dbg(desc, "hogged as %s%s\n",
>  		(dflags & GPIOD_FLAGS_BIT_DIR_OUT) ? "output" : "input",
>  		(dflags & GPIOD_FLAGS_BIT_DIR_OUT) ?
>  		  (dflags & GPIOD_FLAGS_BIT_DIR_VAL) ? "/high" : "/low" : "");
> diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
> index 2191c0136531..0060334a98a7 100644
> --- a/drivers/of/unittest.c
> +++ b/drivers/of/unittest.c
> @@ -1849,19 +1849,19 @@ static void __init of_unittest_overlay_gpio(void)
>  	 * driver is registered
>  	 */
>  
> -	EXPECT_BEGIN(KERN_INFO,
> +	EXPECT_BEGIN(KERN_DEBUG,
>  		     "gpio-<<int>> (line-B-input): hogged as input\n");
>  
> -	EXPECT_BEGIN(KERN_INFO,
> +	EXPECT_BEGIN(KERN_DEBUG,
>  		     "gpio-<<int>> (line-A-input): hogged as input\n");
>  
>  	ret = platform_driver_register(&unittest_gpio_driver);
>  	if (unittest(ret == 0, "could not register unittest gpio driver\n"))
>  		return;
>  
> -	EXPECT_END(KERN_INFO,
> +	EXPECT_END(KERN_DEBUG,
>  		   "gpio-<<int>> (line-A-input): hogged as input\n");
> -	EXPECT_END(KERN_INFO,
> +	EXPECT_END(KERN_DEBUG,
>  		   "gpio-<<int>> (line-B-input): hogged as input\n");
>  
>  	unittest(probe_pass_count + 2 == unittest_gpio_probe_pass_count,
> @@ -1888,7 +1888,7 @@ static void __init of_unittest_overlay_gpio(void)
>  	probe_pass_count = unittest_gpio_probe_pass_count;
>  	chip_request_count = unittest_gpio_chip_request_count;
>  
> -	EXPECT_BEGIN(KERN_INFO,
> +	EXPECT_BEGIN(KERN_DEBUG,
>  		     "gpio-<<int>> (line-D-input): hogged as input\n");
>  
>  	/* overlay_gpio_03 contains gpio node and child gpio hog node */
> @@ -1896,7 +1896,7 @@ static void __init of_unittest_overlay_gpio(void)
>  	unittest(overlay_data_apply("overlay_gpio_03", NULL),
>  		 "Adding overlay 'overlay_gpio_03' failed\n");
>  
> -	EXPECT_END(KERN_INFO,
> +	EXPECT_END(KERN_DEBUG,
>  		   "gpio-<<int>> (line-D-input): hogged as input\n");
>  
>  	unittest(probe_pass_count + 1 == unittest_gpio_probe_pass_count,
> @@ -1935,7 +1935,7 @@ static void __init of_unittest_overlay_gpio(void)
>  	 *   - processing gpio for overlay_gpio_04b
>  	 */
>  
> -	EXPECT_BEGIN(KERN_INFO,
> +	EXPECT_BEGIN(KERN_DEBUG,
>  		     "gpio-<<int>> (line-C-input): hogged as input\n");
>  
>  	/* overlay_gpio_04b contains child gpio hog node */
> @@ -1943,7 +1943,7 @@ static void __init of_unittest_overlay_gpio(void)
>  	unittest(overlay_data_apply("overlay_gpio_04b", NULL),
>  		 "Adding overlay 'overlay_gpio_04b' failed\n");
>  
> -	EXPECT_END(KERN_INFO,
> +	EXPECT_END(KERN_DEBUG,
>  		   "gpio-<<int>> (line-C-input): hogged as input\n");
>  
>  	unittest(chip_request_count + 1 == unittest_gpio_chip_request_count,
> -- 
> 2.39.2
> 

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2023-06-06 15:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-05 12:52 [PATCH] gpiolib: demote the hogging log messages to debug Bartosz Golaszewski
2023-06-06 14:57 ` Andy Shevchenko [this message]
2023-06-09  7:33 ` Linus Walleij
2023-06-09 13:47 ` Rob Herring
2023-06-09 14:20   ` Bartosz Golaszewski
2023-06-11 12:39   ` Frank Rowand
2023-06-11 12:48     ` Frank Rowand
2023-06-12 15:42       ` Rob Herring
2023-06-14  0:04         ` Frank Rowand

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=ZH9JcR2gS6n67eHX@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=brgl@bgdev.pl \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=warthog618@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox