From: Michael Straube <straube.linux@gmail.com>
To: gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Michael Straube <straube.linux@gmail.com>
Subject: [PATCH 1/2] staging: r8188eu: convert dump_chip_info() to use netdev_dbg()
Date: Sat, 30 Jul 2022 17:06:36 +0200 [thread overview]
Message-ID: <20220730150637.3550-2-straube.linux@gmail.com> (raw)
In-Reply-To: <20220730150637.3550-1-straube.linux@gmail.com>
Drivers should not spam the kernel log if they work properly. Convert
the dump_chip_info() function to use netdev_dbg() instead of pr_info()
so that developers can still enable it if they want to see this
information.
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index 5b8f1a912bbb..012828a05e6c 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -526,8 +526,9 @@ void rtl8188e_ReadEFuse(struct adapter *Adapter, u16 _size_byte, u8 *pbuf)
Hal_EfuseReadEFuse88E(Adapter, 0, _size_byte, pbuf);
}
-static void dump_chip_info(struct HAL_VERSION chip_vers)
+static void dump_chip_info(struct adapter *adapter, struct HAL_VERSION chip_vers)
{
+ struct net_device *netdev = adapter->pnetdev;
uint cnt = 0;
char buf[128];
@@ -560,9 +561,9 @@ static void dump_chip_info(struct HAL_VERSION chip_vers)
cnt += sprintf((buf + cnt), "1T1R_");
- cnt += sprintf((buf + cnt), "RomVer(%d)\n", 0);
+ cnt += sprintf((buf + cnt), "RomVer(%d)", 0);
- pr_info("%s", buf);
+ netdev_dbg(netdev, "%s\n", buf);
}
void rtl8188e_read_chip_version(struct adapter *padapter)
@@ -581,7 +582,7 @@ void rtl8188e_read_chip_version(struct adapter *padapter)
ChipVersion.VendorType = ((value32 & VENDOR_ID) ? CHIP_VENDOR_UMC : CHIP_VENDOR_TSMC);
ChipVersion.CUTVersion = (value32 & CHIP_VER_RTL_MASK) >> CHIP_VER_RTL_SHIFT; /* IC version (CUT) */
- dump_chip_info(ChipVersion);
+ dump_chip_info(padapter, ChipVersion);
pHalData->VersionID = ChipVersion;
}
--
2.37.1
next prev parent reply other threads:[~2022-07-30 15:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-30 15:06 [PATCH 0/2] staging: r8188eu: clean up dump_chip_info() Michael Straube
2022-07-30 15:06 ` Michael Straube [this message]
2022-07-30 15:06 ` [PATCH 2/2] staging: r8188eu: refactor dump_chip_info() Michael Straube
2022-07-30 19:47 ` [PATCH 0/2] staging: r8188eu: clean up dump_chip_info() Philipp Hortmann
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=20220730150637.3550-2-straube.linux@gmail.com \
--to=straube.linux@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=phil@philpotter.co.uk \
/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).