lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ad1d812b-692f-c7df-d5c5-f61436434d59@pengutronix.de>
Date:   Thu, 1 Oct 2020 17:51:23 +0200
From:   Marc Kleine-Budde <mkl@...gutronix.de>
To:     Vincent Mailhol <mailhol.vincent@...adoo.fr>,
        linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
        linux-can@...r.kernel.org, Wolfgang Grandegger <wg@...ndegger.com>,
        "David S . Miller" <davem@...emloft.net>
Cc:     Jakub Kicinski <kuba@...nel.org>, Oliver Neukum <oneukum@...e.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Arunachalam Santhanam <arunachalam.santhanam@...bosch.com>
Subject: Re: [PATCH v2 2/6] can: dev: add a helper function

On 10/1/20 5:45 PM, Vincent Mailhol wrote:
>>> +static inline int get_can_len(struct sk_buff *skb)
>>
>> make this return an u8
>> make the skb const
>>
>>> +{
>>> +	struct canfd_frame *cf =3D (struct canfd_frame *)skb->data;
>>
>> const
>>
>>> +
>>> +	if (can_is_canfd_skb(skb))
>>> +		return min_t(__u8, cf->len, CANFD_MAX_DLEN);
>>
>> u8
>>
>>> +	else if (cf->can_id & CAN_RTR_FLAG)
>>> +		return 0;
>>> +	else
>>> +		return min_t(__u8, cf->len, CAN_MAX_DLEN);
>>
>> u8
> 
> Noted. All those changes will be addressed in v3 series.
> Thank you.
> 
> As a side note, macros get_can_dlc() and get_canfd_dlc of the same
> file (include/linux/can/dev.h) also use __u8 instead of u8. Do you
> want me to add a patch to change these as below?

yes. looks good


tnx,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |



Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ