From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@niif.hu>
To: Randy Dunlap <randy.dunlap@oracle.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, wferi@niif.hu
Subject: [PATCH 4/3] net/bonding: Adhere to coding style: break line after the if condition
Date: Thu, 29 Nov 2007 01:16:51 +0100 [thread overview]
Message-ID: <87wss1c3d8.fsf_-_@szonett.ki.iif.hu> (raw)
In-Reply-To: <474D8B83.9050609@oracle.com> (Randy Dunlap's message of "Wed, 28 Nov 2007 07:38:43 -0800")
Signed-off-by: Ferenc Wágner <wferi@niif.hu>
---
Randy Dunlap <randy.dunlap@oracle.com> writes:
> Wagner Ferenc wrote:
>> Randy Dunlap <randy.dunlap@oracle.com> writes:
>>
>>> Patches 1 & 3 use
>>>
>>> if (res) statement;
>>>
>>> but the preferred form is
>>>
>>> if (res)
>>> statement;
>>>
>>> Even if this style was already used in the source file, it should
>>> be cleaned up.
>>
>> No principal problem. So that I learn something useful: how should I
>> go about this? I created the patches with git-format-patch, and they
>> depend on each other, so I'd rather not git-reset, if possible...
>>
>> Can I just create a follow-up patch which fixes this stylistic issue?
>
> That's OK with me. I can't say how it might be done with git.
drivers/net/bonding/bond_sysfs.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 5c31f5c..9de2c52 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -91,7 +91,8 @@ static ssize_t bonding_show_bonds(struct class *cls, char *buf)
}
res += sprintf(buf + res, "%s ", bond->dev->name);
}
- if (res) buf[res-1] = '\n'; /* eat the leftover space */
+ if (res)
+ buf[res-1] = '\n'; /* eat the leftover space */
up_read(&(bonding_rwsem));
return res;
}
@@ -239,7 +240,8 @@ static ssize_t bonding_show_slaves(struct device *d,
res += sprintf(buf + res, "%s ", slave->dev->name);
}
read_unlock(&bond->lock);
- if (res) buf[res-1] = '\n'; /* eat the leftover space */
+ if (res)
+ buf[res-1] = '\n'; /* eat the leftover space */
return res;
}
@@ -705,7 +707,8 @@ static ssize_t bonding_show_arp_targets(struct device *d,
res += sprintf(buf + res, "%u.%u.%u.%u ",
NIPQUAD(bond->params.arp_targets[i]));
}
- if (res) buf[res-1] = '\n'; /* eat the leftover space */
+ if (res)
+ buf[res-1] = '\n'; /* eat the leftover space */
return res;
}
--
1.4.4.4
next prev parent reply other threads:[~2007-11-29 0:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-28 0:52 [PATCH 2/3] net/bonding: Return nothing for not applicable values =?utf-8?q?Ferenc_W=C3=A1gner?=
2007-11-28 0:49 ` [PATCH 1/3] Remove trailing NULs from network bonding sysfs interface =?utf-8?q?Ferenc_W=C3=A1gner?=
2007-11-28 3:49 ` Randy Dunlap
2007-11-28 8:47 ` Wagner Ferenc
2007-11-28 15:38 ` Randy Dunlap
2007-11-29 0:16 ` =?utf-8?q?Ferenc_W=C3=A1gner?= [this message]
2007-11-29 1:01 ` [PATCH 4/3] net/bonding: Adhere to coding style: break line after the if condition Randy Dunlap
2007-11-29 1:13 ` [PATCH 2/3] net/bonding: Return nothing for not applicable values Jay Vosburgh
2007-12-02 12:42 ` [PATCH 1/5] Remove trailing NULs from network bonding sysfs interface Wagner Ferenc
2007-12-02 13:09 ` [PATCH 2/5] net/bonding: Return nothing for not applicable values Wagner Ferenc
2007-12-02 13:09 ` [PATCH 3/5] net/bonding: Purely cosmetic: rename a local variable Wagner Ferenc
2007-12-02 13:10 ` [PATCH 4/5] net/bonding: Adhere to coding style: break line after the if condition Wagner Ferenc
2007-12-02 13:11 ` [PATCH 5/5] net/bonding: Allow setting and querying xmit policy regardless of mode Wagner Ferenc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wss1c3d8.fsf_-_@szonett.ki.iif.hu \
--to=wferi@niif.hu \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=randy.dunlap@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®