From: Bartosz Golaszewski Date: Mon, 5 Jun 2023 12:52:48 +0000 (+0200) Subject: gpiolib: demote the hogging log messages to debug X-Git-Tag: v6.5-rc1~158^2~21 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=be6736cc5423e9c153f38ca49ed9ba05a02a58f9;p=tomoyo%2Ftomoyo-test1.git gpiolib: demote the hogging log messages to debug 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. Signed-off-by: Bartosz Golaszewski Suggested-by: Kent Gibson Reviewed-by: Andy Shevchenko --- diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index bb81d9427fbb..d5f23c2b3f30 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -4236,7 +4236,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-<> (line-B-input): hogged as input\n"); - EXPECT_BEGIN(KERN_INFO, + EXPECT_BEGIN(KERN_DEBUG, "gpio-<> (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-<> (line-A-input): hogged as input\n"); - EXPECT_END(KERN_INFO, + EXPECT_END(KERN_DEBUG, "gpio-<> (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-<> (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-<> (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-<> (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-<> (line-C-input): hogged as input\n"); unittest(chip_request_count + 1 == unittest_gpio_chip_request_count,