* [PATCH] staging: media: cxd2099: style fix - replace hard-coded function names
@ 2017-11-29 15:26 Martin Homuth
2017-11-29 15:32 ` [PATCH Resend] " Martin Homuth
0 siblings, 1 reply; 3+ messages in thread
From: Martin Homuth @ 2017-11-29 15:26 UTC (permalink / raw)
To: mchehab; +Cc: linux-media, devel
This patch fixes the remaining coding style warnings in the lirc module.
Instead of hard coding the function name the __func__ variable
should be used.
It fixes the following checkpatch.pl warning:
WARNING: Prefer using '"%s...", __func__' to using 'read', this
function's name, in a string
Signed-off-by: Martin Homuth <martin.homuth@martinhomuth.de>
---
drivers/staging/media/cxd2099/cxd2099.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/media/cxd2099/cxd2099.c
b/drivers/staging/media/cxd2099/cxd2099.c
index 3e30f48..6641dd2 100644
--- a/drivers/staging/media/cxd2099/cxd2099.c
+++ b/drivers/staging/media/cxd2099/cxd2099.c
@@ -101,7 +101,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;
@@ -116,7 +116,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__);
return -1;
}
return 0;
--
2.10.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH Resend] staging: media: cxd2099: style fix - replace hard-coded function names
2017-11-29 15:26 [PATCH] staging: media: cxd2099: style fix - replace hard-coded function names Martin Homuth
@ 2017-11-29 15:32 ` Martin Homuth
2017-11-29 15:36 ` Martin Homuth
0 siblings, 1 reply; 3+ messages in thread
From: Martin Homuth @ 2017-11-29 15:32 UTC (permalink / raw)
To: mchehab; +Cc: linux-media, devel
This patch fixes the remaining coding style warnings in the cxd2099
module. Instead of hard coding the function name the __func__ variable
should be used.
It fixes the following checkpatch.pl warning:
WARNING: Prefer using '"%s...", __func__' to using 'i2c_read_reg', this
function's name, in a string
Signed-off-by: Martin Homuth <martin.homuth@martinhomuth.de>
---
drivers/staging/media/cxd2099/cxd2099.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/media/cxd2099/cxd2099.c
b/drivers/staging/media/cxd2099/cxd2099.c
index 3e30f48..6641dd2 100644
--- a/drivers/staging/media/cxd2099/cxd2099.c
+++ b/drivers/staging/media/cxd2099/cxd2099.c
@@ -101,7 +101,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;
@@ -116,7 +116,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__);
return -1;
}
return 0;
--
2.10.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH Resend] staging: media: cxd2099: style fix - replace hard-coded function names
2017-11-29 15:32 ` [PATCH Resend] " Martin Homuth
@ 2017-11-29 15:36 ` Martin Homuth
0 siblings, 0 replies; 3+ messages in thread
From: Martin Homuth @ 2017-11-29 15:36 UTC (permalink / raw)
To: mchehab; +Cc: linux-media, devel
This patch fixes the remaining coding style warnings in the cxd2099
module. Instead of hard coding the function name the __func__ variable
should be used.
It fixes the following checkpatch.pl warning:
WARNING: Prefer using '"%s...", __func__' to using 'i2c_read_reg', this
function's name, in a string
Signed-off-by: Martin Homuth <martin.homuth@martinhomuth.de>
---
drivers/staging/media/cxd2099/cxd2099.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/media/cxd2099/cxd2099.c
b/drivers/staging/media/cxd2099/cxd2099.c
index 3e30f48..6641dd2 100644
--- a/drivers/staging/media/cxd2099/cxd2099.c
+++ b/drivers/staging/media/cxd2099/cxd2099.c
@@ -101,7 +101,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;
@@ -116,7 +116,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__);
return -1;
}
return 0;
--
2.10.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-11-29 15:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-29 15:26 [PATCH] staging: media: cxd2099: style fix - replace hard-coded function names Martin Homuth
2017-11-29 15:32 ` [PATCH Resend] " Martin Homuth
2017-11-29 15:36 ` Martin Homuth
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).