diff options
Diffstat (limited to 'net/caif/cfdgml.c')
-rw-r--r-- | net/caif/cfdgml.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/caif/cfdgml.c b/net/caif/cfdgml.c index ed9d53aff280..d3ed264ad6c4 100644 --- a/net/caif/cfdgml.c +++ b/net/caif/cfdgml.c | |||
@@ -4,6 +4,8 @@ | |||
4 | * License terms: GNU General Public License (GPL) version 2 | 4 | * License terms: GNU General Public License (GPL) version 2 |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #define pr_fmt(fmt) KBUILD_MODNAME ":%s(): " fmt, __func__ | ||
8 | |||
7 | #include <linux/stddef.h> | 9 | #include <linux/stddef.h> |
8 | #include <linux/spinlock.h> | 10 | #include <linux/spinlock.h> |
9 | #include <linux/slab.h> | 11 | #include <linux/slab.h> |
@@ -26,7 +28,7 @@ struct cflayer *cfdgml_create(u8 channel_id, struct dev_info *dev_info) | |||
26 | { | 28 | { |
27 | struct cfsrvl *dgm = kmalloc(sizeof(struct cfsrvl), GFP_ATOMIC); | 29 | struct cfsrvl *dgm = kmalloc(sizeof(struct cfsrvl), GFP_ATOMIC); |
28 | if (!dgm) { | 30 | if (!dgm) { |
29 | pr_warning("CAIF: %s(): Out of memory\n", __func__); | 31 | pr_warn("Out of memory\n"); |
30 | return NULL; | 32 | return NULL; |
31 | } | 33 | } |
32 | caif_assert(offsetof(struct cfsrvl, layer) == 0); | 34 | caif_assert(offsetof(struct cfsrvl, layer) == 0); |
@@ -49,14 +51,14 @@ static int cfdgml_receive(struct cflayer *layr, struct cfpkt *pkt) | |||
49 | caif_assert(layr->ctrlcmd != NULL); | 51 | caif_assert(layr->ctrlcmd != NULL); |
50 | 52 | ||
51 | if (cfpkt_extr_head(pkt, &cmd, 1) < 0) { | 53 | if (cfpkt_extr_head(pkt, &cmd, 1) < 0) { |
52 | pr_err("CAIF: %s(): Packet is erroneous!\n", __func__); | 54 | pr_err("Packet is erroneous!\n"); |
53 | cfpkt_destroy(pkt); | 55 | cfpkt_destroy(pkt); |
54 | return -EPROTO; | 56 | return -EPROTO; |
55 | } | 57 | } |
56 | 58 | ||
57 | if ((cmd & DGM_CMD_BIT) == 0) { | 59 | if ((cmd & DGM_CMD_BIT) == 0) { |
58 | if (cfpkt_extr_head(pkt, &dgmhdr, 3) < 0) { | 60 | if (cfpkt_extr_head(pkt, &dgmhdr, 3) < 0) { |
59 | pr_err("CAIF: %s(): Packet is erroneous!\n", __func__); | 61 | pr_err("Packet is erroneous!\n"); |
60 | cfpkt_destroy(pkt); | 62 | cfpkt_destroy(pkt); |
61 | return -EPROTO; | 63 | return -EPROTO; |
62 | } | 64 | } |
@@ -75,8 +77,7 @@ static int cfdgml_receive(struct cflayer *layr, struct cfpkt *pkt) | |||
75 | return 0; | 77 | return 0; |
76 | default: | 78 | default: |
77 | cfpkt_destroy(pkt); | 79 | cfpkt_destroy(pkt); |
78 | pr_info("CAIF: %s(): Unknown datagram control %d (0x%x)\n", | 80 | pr_info("Unknown datagram control %d (0x%x)\n", cmd, cmd); |
79 | __func__, cmd, cmd); | ||
80 | return -EPROTO; | 81 | return -EPROTO; |
81 | } | 82 | } |
82 | } | 83 | } |