This patchset clean up some code style issues.
Peng Li (5):
net: wan: remove redundant blank lines
net: wan: add some required spaces
net: wan: remove redundant braces {}
net: wan: remove redundant space
net: wan: fix variable definition style
drivers/net/wan/c101.c | 39 +++++++++++----------------------------
drivers/net/wan/fsl_ucc_hdlc.c | 3 +--
2 files changed, 12 insertions(+), 30 deletions(-)
--
2.8.1
From: Peng Li <[email protected]>
Add space required before the open parenthesis '(',
and add spaces required around that '<', '>' and '!='.
Signed-off-by: Peng Li <[email protected]>
Signed-off-by: Guangbin Huang <[email protected]>
---
drivers/net/wan/c101.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wan/c101.c b/drivers/net/wan/c101.c
index 215f2fbfc3ae..5a04f18db32a 100644
--- a/drivers/net/wan/c101.c
+++ b/drivers/net/wan/c101.c
@@ -70,7 +70,7 @@ typedef struct card_s {
u8 page;
struct card_s *next_card;
-}card_t;
+} card_t;
typedef card_t port_t;
@@ -85,7 +85,7 @@ static card_t **new_card = &first_card;
#define sca_outw(value, reg, card) do { \
writeb(value & 0xFF, (card)->win0base + C101_SCA + (reg)); \
writeb((value >> 8 ) & 0xFF, (card)->win0base + C101_SCA + (reg + 1));\
-} while(0)
+} while (0)
#define port_to_card(port) (port)
#define log_node(port) (0)
@@ -143,7 +143,7 @@ static void c101_set_iface(port_t *port)
u8 rxs = port->rxs & CLK_BRG_MASK;
u8 txs = port->txs & CLK_BRG_MASK;
- switch(port->settings.clock_type) {
+ switch (port->settings.clock_type) {
case CLOCK_INT:
rxs |= CLK_BRG_RX; /* TX clock */
txs |= CLK_RXCLK_TX; /* BRG output */
@@ -229,7 +229,7 @@ static int c101_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
if (cmd != SIOCWANDEV)
return hdlc_ioctl(dev, ifr, cmd);
- switch(ifr->ifr_settings.type) {
+ switch (ifr->ifr_settings.type) {
case IF_GET_IFACE:
ifr->ifr_settings.type = IF_IFACE_SYNC_SERIAL;
if (ifr->ifr_settings.size < size) {
@@ -241,7 +241,7 @@ static int c101_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
return 0;
case IF_IFACE_SYNC_SERIAL:
- if(!capable(CAP_NET_ADMIN))
+ if (!capable(CAP_NET_ADMIN))
return -EPERM;
if (copy_from_user(&new_line, line, size))
@@ -296,12 +296,12 @@ static int __init c101_run(unsigned long irq, unsigned long winbase)
card_t *card;
int result;
- if (irq<3 || irq>15 || irq == 6) /* FIXME */ {
+ if (irq < 3 || irq > 15 || irq == 6) /* FIXME */ {
pr_err("invalid IRQ value\n");
return -ENODEV;
}
- if (winbase < 0xC0000 || winbase > 0xDFFFF || (winbase & 0x3FFF) !=0) {
+ if (winbase < 0xC0000 || winbase > 0xDFFFF || (winbase & 0x3FFF) != 0) {
pr_err("invalid RAM value\n");
return -ENODEV;
}
@@ -404,7 +404,7 @@ static int __init c101_init(void)
if (*hw == '\x0')
return first_card ? 0 : -EINVAL;
- }while(*hw++ == ':');
+ } while (*hw++ == ':');
pr_err("invalid hardware parameters\n");
return first_card ? 0 : -EINVAL;
--
2.8.1
Hello:
This series was applied to netdev/net-next.git (refs/heads/master):
On Tue, 18 May 2021 20:29:49 +0800 you wrote:
> This patchset clean up some code style issues.
>
> Peng Li (5):
> net: wan: remove redundant blank lines
> net: wan: add some required spaces
> net: wan: remove redundant braces {}
> net: wan: remove redundant space
> net: wan: fix variable definition style
>
> [...]
Here is the summary with links:
- [net-next,1/5] net: wan: remove redundant blank lines
https://git.kernel.org/netdev/net-next/c/78524c01edb2
- [net-next,2/5] net: wan: add some required spaces
https://git.kernel.org/netdev/net-next/c/23c235412411
- [net-next,3/5] net: wan: remove redundant braces {}
https://git.kernel.org/netdev/net-next/c/a4e591477611
- [net-next,4/5] net: wan: remove redundant space
https://git.kernel.org/netdev/net-next/c/da8e6fddbae3
- [net-next,5/5] net: wan: fix variable definition style
https://git.kernel.org/netdev/net-next/c/a3f3e831dc2a
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html