Re: [PATCH 3/4] mn88472: elaborate debug printout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



That patch is simply wrong. Kernel logging system is able to add function name automatically - it should not be defined manually for debug logging.

See kernel documentation:
Documentation/dynamic-debug-howto.txt

around the line 213.

----------------------------------
The flags are:

  p    enables the pr_debug() callsite.
  f    Include the function name in the printed message
  l    Include line number in the printed message
  m    Include module name in the printed message
  t    Include thread ID in messages not generated from interrupt context
  _    No flags are set. (Or'd with others on input)
----------------------------------

Antti




On 12/13/2014 02:18 AM, Benjamin Larsson wrote:
Signed-off-by: Benjamin Larsson <benjamin@xxxxxxxxxxxx>
---
  drivers/staging/media/mn88472/mn88472.c | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/media/mn88472/mn88472.c b/drivers/staging/media/mn88472/mn88472.c
index 4d80046..746cc94 100644
--- a/drivers/staging/media/mn88472/mn88472.c
+++ b/drivers/staging/media/mn88472/mn88472.c
@@ -33,6 +33,7 @@ static int mn88472_set_frontend(struct dvb_frontend *fe)
  	u64 tmp;
  	u8 delivery_system_val, if_val[3], bw_val[7], bw_val2;

+	dev_dbg(&client->dev, "%s:\n", __func__);
  	dev_dbg(&client->dev,
  			"delivery_system=%d modulation=%d frequency=%d symbol_rate=%d inversion=%d\n",
  			c->delivery_system, c->modulation,
@@ -288,7 +289,7 @@ static int mn88472_init(struct dvb_frontend *fe)
  	u8 *fw_file = MN88472_FIRMWARE;
  	unsigned int csum;

-	dev_dbg(&client->dev, "\n");
+	dev_dbg(&client->dev, "%s:\n", __func__);

  	/* set cold state by default */
  	dev->warm = false;
@@ -371,7 +372,7 @@ static int mn88472_sleep(struct dvb_frontend *fe)
  	struct mn88472_dev *dev = i2c_get_clientdata(client);
  	int ret;

-	dev_dbg(&client->dev, "\n");
+	dev_dbg(&client->dev, "%s:\n", __func__);

  	/* power off */
  	ret = regmap_write(dev->regmap[2], 0x0b, 0x30);


--
http://palosaari.fi/
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux