* [PATCH] caif: Use UTILITY_NAME_LENGTH instead of hard-coding 16
@ 2024-03-16 10:16 Christophe JAILLET
2024-03-18 3:21 ` Ratheesh Kannoth
2024-03-18 9:25 ` Jiri Pirko
0 siblings, 2 replies; 5+ messages in thread
From: Christophe JAILLET @ 2024-03-16 10:16 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: linux-kernel, kernel-janitors, Christophe JAILLET, netdev
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.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
net/caif/cfctrl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/caif/cfctrl.c b/net/caif/cfctrl.c
index 8480684f2762..b6d9462f92b9 100644
--- a/net/caif/cfctrl.c
+++ b/net/caif/cfctrl.c
@@ -206,7 +206,7 @@ int cfctrl_linkup_request(struct cflayer *layer,
u8 tmp8;
struct cfctrl_request_info *req;
int ret;
- char utility_name[16];
+ char utility_name[UTILITY_NAME_LENGTH];
struct cfpkt *pkt;
struct cflayer *dn = cfctrl->serv.layer.dn;
--
2.44.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] caif: Use UTILITY_NAME_LENGTH instead of hard-coding 16
2024-03-16 10:16 [PATCH] caif: Use UTILITY_NAME_LENGTH instead of hard-coding 16 Christophe JAILLET
@ 2024-03-18 3:21 ` Ratheesh Kannoth
2024-03-18 8:05 ` Dan Carpenter
2024-03-18 21:47 ` Christophe JAILLET
2024-03-18 9:25 ` Jiri Pirko
1 sibling, 2 replies; 5+ messages in thread
From: Ratheesh Kannoth @ 2024-03-18 3:21 UTC (permalink / raw)
To: Christophe JAILLET
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
linux-kernel, kernel-janitors, netdev
On 2024-03-16 at 15:46:10, Christophe JAILLET (christophe.jaillet@wanadoo.fr) wrote:
> 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.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> net/caif/cfctrl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/caif/cfctrl.c b/net/caif/cfctrl.c
> index 8480684f2762..b6d9462f92b9 100644
> --- a/net/caif/cfctrl.c
> +++ b/net/caif/cfctrl.c
> @@ -206,7 +206,7 @@ int cfctrl_linkup_request(struct cflayer *layer,
> u8 tmp8;
> struct cfctrl_request_info *req;
> int ret;
> - char utility_name[16];
> + char utility_name[UTILITY_NAME_LENGTH];
Reverse xmas tree.
> struct cfpkt *pkt;
> struct cflayer *dn = cfctrl->serv.layer.dn;
>
> --
> 2.44.0
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] caif: Use UTILITY_NAME_LENGTH instead of hard-coding 16
2024-03-18 3:21 ` Ratheesh Kannoth
@ 2024-03-18 8:05 ` Dan Carpenter
2024-03-18 21:47 ` Christophe JAILLET
1 sibling, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2024-03-18 8:05 UTC (permalink / raw)
To: Ratheesh Kannoth
Cc: Christophe JAILLET, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, linux-kernel, kernel-janitors,
netdev
On Mon, Mar 18, 2024 at 08:51:33AM +0530, Ratheesh Kannoth wrote:
> On 2024-03-16 at 15:46:10, Christophe JAILLET (christophe.jaillet@wanadoo.fr) wrote:
> > 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.
> >
> > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> > ---
> > net/caif/cfctrl.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/net/caif/cfctrl.c b/net/caif/cfctrl.c
> > index 8480684f2762..b6d9462f92b9 100644
> > --- a/net/caif/cfctrl.c
> > +++ b/net/caif/cfctrl.c
> > @@ -206,7 +206,7 @@ int cfctrl_linkup_request(struct cflayer *layer,
> > u8 tmp8;
> > struct cfctrl_request_info *req;
> > int ret;
> > - char utility_name[16];
> > + char utility_name[UTILITY_NAME_LENGTH];
> Reverse xmas tree.
>
It's always hard to know what to do when the original code isn't in the
correct format. Someone sent a patch last week which fixed a bug and
partially converted a declaration block into reverse Christmas tree...
regards,
dan carpenter
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] caif: Use UTILITY_NAME_LENGTH instead of hard-coding 16
2024-03-16 10:16 [PATCH] caif: Use UTILITY_NAME_LENGTH instead of hard-coding 16 Christophe JAILLET
2024-03-18 3:21 ` Ratheesh Kannoth
@ 2024-03-18 9:25 ` Jiri Pirko
1 sibling, 0 replies; 5+ messages in thread
From: Jiri Pirko @ 2024-03-18 9:25 UTC (permalink / raw)
To: Christophe JAILLET
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
linux-kernel, kernel-janitors, netdev
Sat, Mar 16, 2024 at 11:16:10AM CET, christophe.jaillet@wanadoo.fr wrote:
>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.
>
>Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
This is net-next material, yet net-next is closed.
https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#development-cycle
pw-bot: defer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] caif: Use UTILITY_NAME_LENGTH instead of hard-coding 16
2024-03-18 3:21 ` Ratheesh Kannoth
2024-03-18 8:05 ` Dan Carpenter
@ 2024-03-18 21:47 ` Christophe JAILLET
1 sibling, 0 replies; 5+ messages in thread
From: Christophe JAILLET @ 2024-03-18 21:47 UTC (permalink / raw)
To: Ratheesh Kannoth
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
linux-kernel, kernel-janitors, netdev
Le 18/03/2024 à 04:21, Ratheesh Kannoth a écrit :
> On 2024-03-16 at 15:46:10, Christophe JAILLET (christophe.jaillet@wanadoo.fr) wrote:
>> 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.
>>
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>> ---
>> net/caif/cfctrl.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/net/caif/cfctrl.c b/net/caif/cfctrl.c
>> index 8480684f2762..b6d9462f92b9 100644
>> --- a/net/caif/cfctrl.c
>> +++ b/net/caif/cfctrl.c
>> @@ -206,7 +206,7 @@ int cfctrl_linkup_request(struct cflayer *layer,
>> u8 tmp8;
>> struct cfctrl_request_info *req;
>> int ret;
>> - char utility_name[16];
>> + char utility_name[UTILITY_NAME_LENGTH];
> Reverse xmas tree.
Hi,
I'll update and repost when net-next is reopened, but honestly, looking
at this file, changing this to reverse xmas style won't change that much
for the overall coding style!
Moreover, as said by Dan, it is not really easy to understand the wishes
of different maintainers. Should I have updated the lay-out, someone
could have argued that patches should be 1 thing at a time.
CJ
>
>> struct cfpkt *pkt;
>> struct cflayer *dn = cfctrl->serv.layer.dn;
>>
>> --
>> 2.44.0
>>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-03-18 21:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-16 10:16 [PATCH] caif: Use UTILITY_NAME_LENGTH instead of hard-coding 16 Christophe JAILLET
2024-03-18 3:21 ` Ratheesh Kannoth
2024-03-18 8:05 ` Dan Carpenter
2024-03-18 21:47 ` Christophe JAILLET
2024-03-18 9:25 ` Jiri Pirko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).