Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1635893 > unrolled thread
| Started by | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| First post | 2017-05-04 19:00 +0200 |
| Last post | 2017-05-05 07:00 +0200 |
| Articles | 5 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 7/9] drm/i915: Combine substrings for a message in gen6_drpc_info() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-04 19:00 +0200
Re: [PATCH 7/9] drm/i915: Combine substrings for a message in gen6_drpc_info() Chris Wilson <chris@chris-wilson.co.uk> - 2017-05-04 22:20 +0200
Re: [PATCH 7/9] drm/i915: Combine substrings for a message in gen6_drpc_info() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-04 22:50 +0200
Re: [PATCH 7/9] drm/i915: Combine substrings for a message in gen6_drpc_info() Chris Wilson <chris@chris-wilson.co.uk> - 2017-05-04 23:00 +0200
Re: [PATCH 7/9] drm/i915: Combine substrings for a message in gen6_drpc_info() Dan Carpenter <dan.carpenter@oracle.com> - 2017-05-05 07:00 +0200
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2017-05-04 19:00 +0200 |
| Subject | [PATCH 7/9] drm/i915: Combine substrings for a message in gen6_drpc_info() |
| Message-ID | <tDsgF-6aT-19@gated-at.bofh.it> |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Thu, 4 May 2017 14:15:00 +0200
The script "checkpatch.pl" pointed information out like the following.
WARNING: quoted string split across lines
Thus fix the affected source code place.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/gpu/drm/i915/i915_debugfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 6f3119d40c50..dbd52ea89fb4 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1529,8 +1529,8 @@ static int gen6_drpc_info(struct seq_file *m)
forcewake_count = READ_ONCE(dev_priv->uncore.fw_domain[FW_DOMAIN_ID_RENDER].wake_count);
if (forcewake_count) {
- seq_puts(m, "RC information inaccurate because somebody "
- "holds a forcewake reference \n");
+ seq_puts(m,
+ "RC information inaccurate because somebody holds a forcewake reference.\n");
} else {
/* NB: we cannot use forcewake, else we read the wrong values */
while (count++ < 50 && (I915_READ_NOTRACE(FORCEWAKE_ACK) & 1))
--
2.12.2
[toc] | [next] | [standalone]
| From | Chris Wilson <chris@chris-wilson.co.uk> |
|---|---|
| Date | 2017-05-04 22:20 +0200 |
| Message-ID | <tDvoe-8mr-5@gated-at.bofh.it> |
| In reply to | #1635893 |
On Thu, May 04, 2017 at 06:59:23PM +0200, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Thu, 4 May 2017 14:15:00 +0200
>
> The script "checkpatch.pl" pointed information out like the following.
>
> WARNING: quoted string split across lines
>
> Thus fix the affected source code place.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/gpu/drm/i915/i915_debugfs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 6f3119d40c50..dbd52ea89fb4 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -1529,8 +1529,8 @@ static int gen6_drpc_info(struct seq_file *m)
>
> forcewake_count = READ_ONCE(dev_priv->uncore.fw_domain[FW_DOMAIN_ID_RENDER].wake_count);
> if (forcewake_count) {
> - seq_puts(m, "RC information inaccurate because somebody "
> - "holds a forcewake reference \n");
> + seq_puts(m,
> + "RC information inaccurate because somebody holds a forcewake reference.\n");
And now you break the 80col rule. Blind adherence to checkpatch is
impossible.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
[toc] | [prev] | [next] | [standalone]
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2017-05-04 22:50 +0200 |
| Message-ID | <tDvRf-5o-1@gated-at.bofh.it> |
| In reply to | #1636015 |
>> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
>> @@ -1529,8 +1529,8 @@ static int gen6_drpc_info(struct seq_file *m)
>>
>> forcewake_count = READ_ONCE(dev_priv->uncore.fw_domain[FW_DOMAIN_ID_RENDER].wake_count);
>> if (forcewake_count) {
>> - seq_puts(m, "RC information inaccurate because somebody "
>> - "holds a forcewake reference \n");
>> + seq_puts(m,
>> + "RC information inaccurate because somebody holds a forcewake reference.\n");
>
> And now you break the 80col rule. Blind adherence to checkpatch is impossible.
Have you got any other coding style preferences around the grepping
of longer message strings from such source code?
Regards,
Markus
[toc] | [prev] | [next] | [standalone]
| From | Chris Wilson <chris@chris-wilson.co.uk> |
|---|---|
| Date | 2017-05-04 23:00 +0200 |
| Message-ID | <tDw0V-aS-11@gated-at.bofh.it> |
| In reply to | #1636042 |
On Thu, May 04, 2017 at 10:48:10PM +0200, SF Markus Elfring wrote:
> >> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> >> @@ -1529,8 +1529,8 @@ static int gen6_drpc_info(struct seq_file *m)
> >>
> >> forcewake_count = READ_ONCE(dev_priv->uncore.fw_domain[FW_DOMAIN_ID_RENDER].wake_count);
> >> if (forcewake_count) {
> >> - seq_puts(m, "RC information inaccurate because somebody "
> >> - "holds a forcewake reference \n");
> >> + seq_puts(m,
> >> + "RC information inaccurate because somebody holds a forcewake reference.\n");
> >
> > And now you break the 80col rule. Blind adherence to checkpatch is impossible.
>
> Have you got any other coding style preferences around the grepping
> of longer message strings from such source code?
I personally use long strings (because they are less hassle to write),
except when they are ridiculously long. But checkpatch complains either
way, so checkpatch itself is not a reason to make a change.
Certainly grepping for a complete seq_printf() is unlikely (i.e. you had
to open the debugfs file to see it, so you must already know where to
look in the code).
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
[toc] | [prev] | [next] | [standalone]
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Date | 2017-05-05 07:00 +0200 |
| Message-ID | <tDDvr-5ln-1@gated-at.bofh.it> |
| In reply to | #1636015 |
On Thu, May 04, 2017 at 09:12:32PM +0100, Chris Wilson wrote:
> On Thu, May 04, 2017 at 06:59:23PM +0200, SF Markus Elfring wrote:
> > From: Markus Elfring <elfring@users.sourceforge.net>
> > Date: Thu, 4 May 2017 14:15:00 +0200
> >
> > The script "checkpatch.pl" pointed information out like the following.
> >
> > WARNING: quoted string split across lines
> >
> > Thus fix the affected source code place.
> >
> > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> > ---
> > drivers/gpu/drm/i915/i915_debugfs.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> > index 6f3119d40c50..dbd52ea89fb4 100644
> > --- a/drivers/gpu/drm/i915/i915_debugfs.c
> > +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> > @@ -1529,8 +1529,8 @@ static int gen6_drpc_info(struct seq_file *m)
> >
> > forcewake_count = READ_ONCE(dev_priv->uncore.fw_domain[FW_DOMAIN_ID_RENDER].wake_count);
> > if (forcewake_count) {
> > - seq_puts(m, "RC information inaccurate because somebody "
> > - "holds a forcewake reference \n");
> > + seq_puts(m,
> > + "RC information inaccurate because somebody holds a forcewake reference.\n");
>
> And now you break the 80col rule. Blind adherence to checkpatch is
> impossible.
> -Chris
No. Checkpatch allows you to go over 80 characters to avoid splitting a
string.
regards,
dan carpenter
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web