Skip to content

Commit f9a4506

Browse files
tititiou36kuba-moo
authored andcommitted
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>
1 parent 5f0b6c9 commit f9a4506

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

net/caif/cfctrl.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,14 +201,14 @@ int cfctrl_linkup_request(struct cflayer *layer,
201201
struct cflayer *user_layer)
202202
{
203203
struct cfctrl *cfctrl = container_obj(layer);
204+
struct cflayer *dn = cfctrl->serv.layer.dn;
205+
char utility_name[UTILITY_NAME_LENGTH];
206+
struct cfctrl_request_info *req;
207+
struct cfpkt *pkt;
204208
u32 tmp32;
205209
u16 tmp16;
206210
u8 tmp8;
207-
struct cfctrl_request_info *req;
208211
int ret;
209-
char utility_name[16];
210-
struct cfpkt *pkt;
211-
struct cflayer *dn = cfctrl->serv.layer.dn;
212212

213213
if (!dn) {
214214
pr_debug("not able to send linkup request\n");

0 commit comments

Comments
 (0)