linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Todd Poynor <toddpoynor@gmail.com>
To: Rob Springer <rspringer@google.com>,
	John Joseph <jnjoseph@google.com>,
	Ben Chan <benchan@chromium.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Zhongze Hu <frankhu@chromium.org>,
	Dmitry Torokhov <dtor@chromium.org>,
	Guenter Roeck <groeck@chromium.org>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	Todd Poynor <toddpoynor@google.com>
Subject: [PATCH 10/14] staging: gasket: interrupts: convert various logs to debug level
Date: Sat, 21 Jul 2018 05:56:58 -0700	[thread overview]
Message-ID: <20180721125713.88501-20-toddpoynor@gmail.com> (raw)
In-Reply-To: <20180721125713.88501-1-toddpoynor@gmail.com>

From: Todd Poynor <toddpoynor@google.com>

Debugging information is improperly logged at non-debug log level in a
number of places, and some logs regarding error conditions may be
generated too frequently, such that these could cause performance
problems and/or obscure other logs.  Convert these to debug log level.

Signed-off-by: Zhongze Hu <frankhu@chromium.org>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
---
 drivers/staging/gasket/gasket_interrupt.c | 24 +++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/gasket/gasket_interrupt.c b/drivers/staging/gasket/gasket_interrupt.c
index d096ce73cc8b3..2b8c26d065336 100644
--- a/drivers/staging/gasket/gasket_interrupt.c
+++ b/drivers/staging/gasket/gasket_interrupt.c
@@ -287,7 +287,7 @@ int gasket_interrupt_reinit(struct gasket_dev *gasket_dev)
 	int ret;
 
 	if (!gasket_dev->interrupt_data) {
-		gasket_log_error(
+		gasket_log_debug(
 			gasket_dev,
 			"Attempted to reinit uninitialized interrupt data.");
 		return -EINVAL;
@@ -305,7 +305,7 @@ int gasket_interrupt_reinit(struct gasket_dev *gasket_dev)
 	case PCI_MSI:
 	case PLATFORM_WIRE:
 	default:
-		gasket_nodev_error(
+		gasket_nodev_debug(
 			"Cannot handle unsupported interrupt type %d.",
 			gasket_dev->interrupt_data->type);
 		ret = -EINVAL;
@@ -351,7 +351,7 @@ static void gasket_interrupt_setup(struct gasket_dev *gasket_dev)
 		gasket_dev->interrupt_data;
 
 	if (!interrupt_data) {
-		gasket_log_error(
+		gasket_log_debug(
 			gasket_dev, "Interrupt data is not initialized.");
 		return;
 	}
@@ -365,7 +365,7 @@ static void gasket_interrupt_setup(struct gasket_dev *gasket_dev)
 	}
 
 	if (interrupt_data->type != PCI_MSIX) {
-		gasket_nodev_error(
+		gasket_nodev_debug(
 			"Cannot handle unsupported interrupt type %d.",
 			interrupt_data->type);
 		return;
@@ -403,7 +403,7 @@ static void gasket_interrupt_setup(struct gasket_dev *gasket_dev)
 				pack_shift = 3 * interrupt_data->pack_width;
 				break;
 			default:
-				gasket_nodev_error(
+				gasket_nodev_debug(
 					"Found interrupt description with "
 					"unknown enum %d.",
 					interrupt_data->interrupts[i].packing);
@@ -445,7 +445,7 @@ void gasket_interrupt_cleanup(struct gasket_dev *gasket_dev)
 	case PCI_MSI:
 	case PLATFORM_WIRE:
 	default:
-		gasket_nodev_error(
+		gasket_nodev_debug(
 			"Cannot handle unsupported interrupt type %d.",
 			interrupt_data->type);
 	};
@@ -460,18 +460,18 @@ void gasket_interrupt_cleanup(struct gasket_dev *gasket_dev)
 int gasket_interrupt_system_status(struct gasket_dev *gasket_dev)
 {
 	if (!gasket_dev->interrupt_data) {
-		gasket_nodev_info("Interrupt data is null.");
+		gasket_nodev_debug("Interrupt data is null.");
 		return GASKET_STATUS_DEAD;
 	}
 
 	if (!gasket_dev->interrupt_data->msix_configured) {
-		gasket_nodev_info("Interrupt not initialized.");
+		gasket_nodev_debug("Interrupt not initialized.");
 		return GASKET_STATUS_LAMED;
 	}
 
 	if (gasket_dev->interrupt_data->num_configured !=
 		gasket_dev->interrupt_data->num_interrupts) {
-		gasket_nodev_info("Not all interrupts were configured.");
+		gasket_nodev_debug("Not all interrupts were configured.");
 		return GASKET_STATUS_LAMED;
 	}
 
@@ -516,14 +516,14 @@ static ssize_t interrupt_sysfs_show(
 
 	gasket_dev = gasket_sysfs_get_device_data(device);
 	if (!gasket_dev) {
-		gasket_nodev_error(
+		gasket_nodev_debug(
 			"No sysfs mapping found for device 0x%p", device);
 		return 0;
 	}
 
 	gasket_attr = gasket_sysfs_get_attr(device, attr);
 	if (!gasket_attr) {
-		gasket_nodev_error(
+		gasket_nodev_debug(
 			"No sysfs attr data found for device 0x%p", device);
 		gasket_sysfs_put_device_data(device, gasket_dev);
 		return 0;
@@ -545,7 +545,7 @@ static ssize_t interrupt_sysfs_show(
 		ret = total_written;
 		break;
 	default:
-		gasket_log_error(
+		gasket_log_debug(
 			gasket_dev, "Unknown attribute: %s", attr->attr.name);
 		ret = 0;
 		break;
-- 
2.18.0.233.g985f88cf7e-goog


  parent reply	other threads:[~2018-07-21 12:57 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-21 12:56 [PATCH 00/14] staging: gasket: assorted cleanups Todd Poynor
2018-07-21 12:56 ` [PATCH 01/20] staging: gasket: allow compile for ARM64 in Kconfig Todd Poynor
2018-07-21 12:56 ` [PATCH 01/14] staging: gasket: fix check_and_invoke_callback log param Todd Poynor
2018-07-21 12:56 ` [PATCH 02/20] staging: gasket: gasket_enable_dev remove unnecessary variable Todd Poynor
2018-07-21 12:56 ` [PATCH 02/14] staging: gasket: remove duplicate call to retrieve device callback Todd Poynor
2018-07-21 12:56 ` [PATCH 03/14] staging: gasket: gasket_handle_ioctl fix ioctl exit trace param Todd Poynor
2018-07-21 12:56 ` [PATCH 03/20] staging: gasket: remove code for no physical device Todd Poynor
2018-07-21 12:56 ` [PATCH 04/14] staging: gasket: avoid copy to user on error in coherent alloc config Todd Poynor
2018-07-21 12:56 ` [PATCH 04/20] staging: gasket: fix class create bug handling Todd Poynor
2018-07-21 12:56 ` [PATCH 05/14] staging: gasket: print mmap starting address as unsigned long Todd Poynor
2018-07-21 12:56 ` [PATCH 05/20] staging: gasket: remove unnecessary code in coherent allocator Todd Poynor
2018-07-21 12:56 ` [PATCH 06/20] staging: gasket: don't treat no device reset callback as an error Todd Poynor
2018-07-21 12:56 ` [PATCH 06/14] staging: gasket: remove unnecessary NULL checks on calls from VFS Todd Poynor
2018-07-21 12:56 ` [PATCH 07/14] staging: gasket: gasket_get_device drop check for NULL pci_dev Todd Poynor
2018-07-21 12:56 ` [PATCH 07/20] staging: gasket: gasket_mmap return error instead of valid BAR index Todd Poynor
2018-07-21 12:56 ` [PATCH 08/14] staging: gasket: apex return error on sysfs show of missing attribute Todd Poynor
2018-07-21 12:56 ` [PATCH 08/20] staging: gasket: apex_clock_gating simplify logic, reduce indentation Todd Poynor
2018-07-21 12:56 ` [PATCH 09/14] staging: gasket: core: convert various logs to debug level Todd Poynor
2018-07-21 12:56 ` [PATCH 09/20] staging: gasket: gasket page table functions use bool return type Todd Poynor
2018-07-21 12:56 ` Todd Poynor [this message]
2018-07-21 12:56 ` [PATCH 10/20] staging: gasket: remove else clause after return in if clause Todd Poynor
2018-07-21 12:57 ` [PATCH 11/20] staging: gasket: fix comment syntax in apex.h Todd Poynor
2018-07-21 12:57 ` [PATCH 11/14] staging: gasket: ioctl common: convert various logs to debug level Todd Poynor
2018-07-21 12:57 ` [PATCH 12/14] staging: gasket: page table: " Todd Poynor
2018-07-21 12:57 ` [PATCH 12/20] staging: gasket: remove unnecessary parens in page table code Todd Poynor
2018-07-21 12:57 ` [PATCH 13/20] staging: gasket: gasket_mmap use PAGE_MASK Todd Poynor
2018-07-21 12:57 ` [PATCH 13/14] staging: gasket: page table: remove unnecessary logs Todd Poynor
2018-07-21 12:57 ` [PATCH 14/14] staging: gasket: apex: convert various logs to debug level Todd Poynor
2018-07-21 12:57 ` [PATCH 14/20] staging: gasket: remove extra parens in gasket_write_mappable_regions Todd Poynor
2018-07-21 12:57 ` [PATCH 15/20] staging: gasket: fix multi-line comment syntax in gasket_core.h Todd Poynor
2018-07-21 12:57 ` [PATCH 16/20] staging: gasket: always allow root open for write Todd Poynor
2018-07-21 12:57 ` [PATCH 17/20] staging: gasket: top ioctl handler add __user annotations Todd Poynor
2018-07-21 12:57 ` [PATCH 18/20] staging: gasket: apex ioctl " Todd Poynor
2018-07-21 12:57 ` [PATCH 19/20] staging: gasket: common ioctl dispatcher " Todd Poynor
2018-07-21 12:57 ` [PATCH 20/20] staging: gasket: common ioctls " Todd Poynor
2018-07-21 13:17 ` [PATCH 00/14] staging: gasket: assorted cleanups Greg Kroah-Hartman
2018-07-21 13:30   ` Todd Poynor
2018-07-21 13:31     ` Todd Poynor
2018-07-21 13:40     ` Greg KH
2018-07-21 13:34 [PATCH 00/14] staging: gasket: more " Todd Poynor
2018-07-21 13:35 ` [PATCH 10/14] staging: gasket: interrupts: convert various logs to debug level Todd Poynor

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=20180721125713.88501-20-toddpoynor@gmail.com \
    --to=toddpoynor@gmail.com \
    --cc=benchan@chromium.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=dtor@chromium.org \
    --cc=frankhu@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=groeck@chromium.org \
    --cc=jnjoseph@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rspringer@google.com \
    --cc=toddpoynor@google.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;
as well as URLs for NNTP newsgroup(s).