Re: [PATCH v7 4/7] can: Add Nuvoton NCT6694 CANFD support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Christophe,

Thank you for reviewing,
I will make the change in the next patch.


Best regards,
Ming

Christophe JAILLET <christophe.jaillet@xxxxxxxxxx> 於 2025年2月8日 週六 上午3:18寫道:
>
> Le 07/02/2025 à 08:44, Ming Yu a écrit :
> > This driver supports Socket CANFD functionality for NCT6694 MFD
> > device based on USB interface.
>
> ...
>
> > +static int nct6694_can_start(struct net_device *ndev)
> > +{
> > +     struct nct6694_can_priv *priv = netdev_priv(ndev);
> > +     struct nct6694_can_setting *setting;
>
> Could be:
> struct nct6694_can_setting *setting __free(kfree) = NULL;
>
> to slightly simplify code below.
>
>
> > +     struct nct6694_cmd_header cmd_hd = {
> > +             .mod = NCT6694_CAN_MOD,
> > +             .cmd = NCT6694_CAN_SETTING,
> > +             .sel = priv->can_idx,
> > +             .len = cpu_to_le16(sizeof(*setting))
> > +     };
>
> ...
>
> > +static int nct6694_can_get_clock(struct nct6694_can_priv *priv)
> > +{
> > +     struct nct6694_can_information *info;
>
> Could be:
> struct nct6694_can_information *info __free(kfree) = NULL;
>
> to slightly simplify code below.
>
> > +     static const struct nct6694_cmd_header cmd_hd = {
> > +             .mod = NCT6694_CAN_MOD,
> > +             .cmd = NCT6694_CAN_INFORMATION,
> > +             .sel = NCT6694_CAN_INFORMATION_SEL,
> > +             .len = cpu_to_le16(sizeof(*info))
> > +     };
> > +     int ret, can_clk;
> > +
> > +     info = kzalloc(sizeof(*info), GFP_KERNEL);
> > +     if (!info)
> > +             return -ENOMEM;
>
> ...
>
> CJ
>





[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux