[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <21193ce7-26ab-4c42-a84f-669ab57257c2@kernel.org>
Date: Wed, 17 Sep 2025 13:43:38 +0900
From: Vincent Mailhol <mailhol@...nel.org>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>,
Oliver Hartkopp <socketcan@...tkopp.net>,
Marc Kleine-Budde <mkl@...gutronix.de>
Cc: linux-can@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] can: raw: use bitfields to store flags in struct
raw_sock
On 17/09/2025 at 03:35, Christophe JAILLET wrote:
> Le 15/09/2025 à 11:23, Vincent Mailhol a écrit :
(...)
>> --- a/net/can/raw.c
>> +++ b/net/can/raw.c
>> @@ -87,10 +87,10 @@ struct raw_sock {
>> struct net_device *dev;
>> netdevice_tracker dev_tracker;
>> struct list_head notifier;
>> - int loopback;
>> - int recv_own_msgs;
>> - int fd_frames;
>> - int xl_frames;
>> + unsigned int loopback:1;
>> + unsigned int recv_own_msgs:1;
>> + unsigned int fd_frames:1;
>> + unsigned int xl_frames:1;
>> struct can_raw_vcid_options raw_vcid_opts;
>> canid_t tx_vcid_shifted;
>> canid_t rx_vcid_shifted;
>
> [...]
>
> Hi,
>
> just in case, it looks like bound and join_filters could also be defined in the
> bitfield.
>
> just my 2c.
You are absolutely right. I will add these two to the bitfield in v2.
Yours sincerely,
Vincent Mailhol
Powered by blists - more mailing lists