aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-02-10 16:29:24 +0100
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-02-10 16:30:05 +0100
commit063228e445e21e9e7f73df5012efc2927f9f2339 (patch)
tree43fb92531953c6862e1f8bb504f7a6111343594a
parent5137a955926b6188638fb11a5c33d89eb7607ef8 (diff)
downloadkernel_replicant_linux-063228e445e21e9e7f73df5012efc2927f9f2339.tar.gz
kernel_replicant_linux-063228e445e21e9e7f73df5012efc2927f9f2339.tar.bz2
kernel_replicant_linux-063228e445e21e9e7f73df5012efc2927f9f2339.zip
net: sipc: core: fix code style
This fix the issues found by checkpatch.pl. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r--drivers/net/sipc/miscdev.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/net/sipc/miscdev.c b/drivers/net/sipc/miscdev.c
index daee12e9d9ef..0add04117686 100644
--- a/drivers/net/sipc/miscdev.c
+++ b/drivers/net/sipc/miscdev.c
@@ -1,10 +1,9 @@
// SPDX-License-Identifier: GPL-2.0+
-//
-// Samsung IPC v4.x misc device userspace
-// interface.
-//
-// Copyright (C) 2018 Simon Shields <simon@lineageos.org>
-//
+/* Samsung IPC v4.x misc device userspace
+ * interface.
+ *
+ * Copyright (C) 2018 Simon Shields <simon@lineageos.org>
+ */
#include <dt-bindings/net/samsung_ipc.h>
#include <linux/fs.h>
#include <linux/miscdevice.h>
@@ -78,7 +77,7 @@ static unsigned int sipc_misc_poll(struct file *filp, struct poll_table_struct *
}
static ssize_t sipc_misc_write(struct file *filp, const char __user *buf,
- size_t count, loff_t *ppos)
+ size_t count, loff_t *ppos)
{
struct sipc_io_channel *chan = misc_to_chan(filp->private_data);
struct sk_buff *skb;
@@ -91,10 +90,8 @@ static ssize_t sipc_misc_write(struct file *filp, const char __user *buf,
+ count + sizeof(HDLC_END);
skb = alloc_skb(frame_len, GFP_KERNEL);
- if (!skb) {
- dev_err(chan->sipc->dev, "Failed to allocate skb\n");
+ if (!skb)
return -ENOMEM;
- }
if (chan->format != SAMSUNG_IPC_FORMAT_RAMDUMP) {
data = skb_put(skb, sizeof(HDLC_START));
@@ -137,7 +134,7 @@ static ssize_t sipc_misc_write(struct file *filp, const char __user *buf,
}
static ssize_t sipc_misc_read(struct file *filp, char *buf, size_t count,
- loff_t *f_pos)
+ loff_t *f_pos)
{
struct sipc_io_channel *chan = misc_to_chan(filp->private_data);
struct sk_buff *skb;
@@ -150,7 +147,9 @@ static ssize_t sipc_misc_read(struct file *filp, char *buf, size_t count,
}
if (skb->len > count) {
- dev_err(chan->sipc->dev, "Read buffer not big enough for whole packet (%d)\n", skb->len);
+ dev_err(chan->sipc->dev,
+ "Read buffer not big enough for whole packet (%d)\n",
+ skb->len);
dev_kfree_skb_any(skb);
return -EFAULT;
}