[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1498743016.8633.14.camel@perches.com>
Date: Thu, 29 Jun 2017 06:30:16 -0700
From: Joe Perches <joe@...ches.com>
To: Pushkar Jambhlekar <pushkar.iit@...il.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Tamara Diaconita <diaconitatamara@...il.com>,
Jasmin Jessich <jasmin@....at>,
Ralph Metzler <rjkm@...zlerbros.de>,
Eva Rachel Retuya <eraretuya@...il.com>
Cc: linux-media@...r.kernel.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers/staging/media: Prefer using __func__ instead
On Thu, 2017-06-29 at 16:59 +0530, Pushkar Jambhlekar wrote:
> Function name is hardcoded. replacing with __func__
Please run your proposed patches through checkpatch
before you send them.
> diff --git a/drivers/staging/media/cxd2099/cxd2099.c b/drivers/staging/media/cxd2099/cxd2099.c
[]
> @@ -100,7 +100,7 @@ static int i2c_read_reg(struct i2c_adapter *adapter, u8 adr,
> .buf = val, .len = 1} };
>
> if (i2c_transfer(adapter, msgs, 2) != 2) {
> - dev_err(&adapter->dev, "error in i2c_read_reg\n");
> + dev_err(&adapter->dev, "error in %s\n", __func__);
> return -1;
> }
> return 0;
> @@ -115,7 +115,7 @@ static int i2c_read(struct i2c_adapter *adapter, u8 adr,
> .buf = data, .len = n} };
>
> if (i2c_transfer(adapter, msgs, 2) != 2) {
> - dev_err(&adapter->dev, "error in i2c_read\n");
> + dev_err(&adapter->dev, "error in %s\n",__func__);
There is a missing space before __func__.
As well, the form for listing a function name
is generally:
print("%s: <error description>\n", __func__);
so ideally, these messages would be something like:
dev_err(&adapter->dev, "%s: i2c_transfer error\n", __func__);
Powered by blists - more mailing lists