* format fixes
@ 2011-03-20 10:45 Jeffrin Jose
2011-03-20 13:39 ` aligning with spaces [was: Re: format fixes] Arne Jansen
0 siblings, 1 reply; 3+ messages in thread
From: Jeffrin Jose @ 2011-03-20 10:45 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 251 bytes --]
hello ,
I have created a patch with fixes and format
error by replacing spaces with tabs.
I have attached the patch along with this mail.
/Thanks
--
software engineer.
department of computer science
rajagiri school of engineering and technology.
[-- Attachment #2: 0001-Fixed-format-issue-by-replacing-spaces-with-tabs.patch --]
[-- Type: text/x-diff, Size: 1179 bytes --]
>From e60771bb9c855231773f741c48d76d26fcda893f Mon Sep 17 00:00:00 2001
From: Jeffrin Jose <ahiliation@yahoo.co.in>
Date: Sun, 20 Mar 2011 16:03:37 +0530
Subject: [PATCH] Fixed format issue by replacing spaces with tabs.
This is a patch to the samsung-laptop.c file
in staging section under drivers that fixes
up format issue by replacing spaces with tabs
Author : Jeffrin Jose
Signed-off-by: Jeffrin Jose
---
drivers/staging/samsung-laptop/samsung-laptop.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/samsung-laptop/samsung-laptop.c b/drivers/staging/samsung-laptop/samsung-laptop.c
index 6607a89..ca27aec 100644
--- a/drivers/staging/samsung-laptop/samsung-laptop.c
+++ b/drivers/staging/samsung-laptop/samsung-laptop.c
@@ -261,7 +261,7 @@ static int sabi_get_command(u8 command, struct sabi_retval *sretval)
iface_data = readb(sabi_iface + SABI_IFACE_DATA);
if (complete != 0xaa || iface_data == 0xff) {
pr_warn("SABI get command 0x%02x failed with completion flag 0x%02x and data 0x%02x\n",
- command, complete, iface_data);
+ command, complete, iface_data);
retval = -EINVAL;
goto exit;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* aligning with spaces [was: Re: format fixes]
2011-03-20 10:45 format fixes Jeffrin Jose
@ 2011-03-20 13:39 ` Arne Jansen
2011-03-20 17:35 ` Randy Dunlap
0 siblings, 1 reply; 3+ messages in thread
From: Arne Jansen @ 2011-03-20 13:39 UTC (permalink / raw)
To: Jeffrin Jose; +Cc: Greg Kroah-Hartman, linux-kernel
On 20.03.2011 11:45, Jeffrin Jose wrote:
> I have created a patch with fixes and format
> error by replacing spaces with tabs.
The CodingStyle guide seems to me a big vague on this topic, but
checkpatch.pl has a clear idea of what is right and wrong. But
the formerly present indentation seems to me totally valid.
Use tab to indent to the current indentation level, then continue
with spaces for the alignment of broken-up lines. This has a
few advantages. One of them is that the code still looks neat with
a different tab size (of course, no one ever does that). Another is,
that editing is easier if you change the name of the function and
with it the needed alignment for the following lines.
If we really require using tabs as much as possible for aligning, we
should also _only_ use tabs for it and require e.g. 2 tabs for
broken-up lines.
In fact, the example in CodingStyle uses only tabs and does not try
to align the double quotes of the broken-up string with each other.
--Arne
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: aligning with spaces [was: Re: format fixes]
2011-03-20 13:39 ` aligning with spaces [was: Re: format fixes] Arne Jansen
@ 2011-03-20 17:35 ` Randy Dunlap
0 siblings, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2011-03-20 17:35 UTC (permalink / raw)
To: Arne Jansen; +Cc: Jeffrin Jose, Greg Kroah-Hartman, linux-kernel
On Sun, 20 Mar 2011 14:39:13 +0100 Arne Jansen wrote:
> On 20.03.2011 11:45, Jeffrin Jose wrote:
> > I have created a patch with fixes and format
> > error by replacing spaces with tabs.
>
> The CodingStyle guide seems to me a big vague on this topic, but
> checkpatch.pl has a clear idea of what is right and wrong. But
> the formerly present indentation seems to me totally valid.
AFAICT, the patch replaces 8 spaces with 1 tab. That's a good change
IMO, except that the patch does not apply to linux-next 2011-0318.
I can't tell if the patch was made against an earlier tree or a later one.
In either case, it looks like this particular printk has probably already
been fixed by some other patch.
> Use tab to indent to the current indentation level, then continue
> with spaces for the alignment of broken-up lines. This has a
> few advantages. One of them is that the code still looks neat with
> a different tab size (of course, no one ever does that). Another is,
> that editing is easier if you change the name of the function and
> with it the needed alignment for the following lines.
> If we really require using tabs as much as possible for aligning, we
> should also _only_ use tabs for it and require e.g. 2 tabs for
> broken-up lines.
> In fact, the example in CodingStyle uses only tabs and does not try
> to align the double quotes of the broken-up string with each other.
We accept patches either way, but it mostly depends on (a) the
current/surrounding code and (b) the maintainer who is merging the patches.
CodingStyle may be vague on all of this. It's easy to be ambiguous or
vague in language, even when you try not to be.
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-03-20 17:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-20 10:45 format fixes Jeffrin Jose
2011-03-20 13:39 ` aligning with spaces [was: Re: format fixes] Arne Jansen
2011-03-20 17:35 ` Randy Dunlap
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).