summaryrefslogtreecommitdiffstats
path: root/net/caif
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2024-03-30 09:32:12 +0100
committerJakub Kicinski <kuba@kernel.org>2024-04-02 18:20:00 -0700
commitf9a4506438a1068d9ff613319bc64dcaa65f681d (patch)
tree817de0b4ca3109872681b1dfc03c41762615eb2a /net/caif
parent5f0b6c94e396cff0998737bd9526ddd093a5273d (diff)
downloadlinux-f9a4506438a1068d9ff613319bc64dcaa65f681d.tar.gz
linux-f9a4506438a1068d9ff613319bc64dcaa65f681d.tar.bz2
linux-f9a4506438a1068d9ff613319bc64dcaa65f681d.zip
caif: Use UTILITY_NAME_LENGTH instead of hard-coding 16
UTILITY_NAME_LENGTH is 16. So better use the former when defining the 'utility_name' array. This makes the intent clearer when it is used around line 260. While at it, declare variable in reverse xmas tree style. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://lore.kernel.org/r/8c1160501f69b64bb2d45ce9f26f746eec80ac77.1711787352.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/caif')
-rw-r--r--net/caif/cfctrl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/caif/cfctrl.c b/net/caif/cfctrl.c
index 8480684f2762..20139fa1be1f 100644
--- a/net/caif/cfctrl.c
+++ b/net/caif/cfctrl.c
@@ -201,14 +201,14 @@ int cfctrl_linkup_request(struct cflayer *layer,
struct cflayer *user_layer)
{
struct cfctrl *cfctrl = container_obj(layer);
+ struct cflayer *dn = cfctrl->serv.layer.dn;
+ char utility_name[UTILITY_NAME_LENGTH];
+ struct cfctrl_request_info *req;
+ struct cfpkt *pkt;
u32 tmp32;
u16 tmp16;
u8 tmp8;
- struct cfctrl_request_info *req;
int ret;
- char utility_name[16];
- struct cfpkt *pkt;
- struct cflayer *dn = cfctrl->serv.layer.dn;
if (!dn) {
pr_debug("not able to send linkup request\n");