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: <CAMZ6Rq+6vv34Ps0G2SpB-9LHXYiD=esi604rm2tCE5Crp3QLvA@mail.gmail.com>
Date:   Fri, 12 May 2023 19:12:57 +0900
From:   Vincent Mailhol <vincent.mailhol@...il.com>
To:     Simon Horman <simon.horman@...igine.com>
Cc:     Mikhail Golubev-Ciuchea <Mikhail.Golubev-Ciuchea@...nsynergy.com>,
        virtio-dev@...ts.oasis-open.org, linux-can@...r.kernel.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        virtualization@...ts.linux-foundation.org,
        Wolfgang Grandegger <wg@...ndegger.com>,
        Marc Kleine-Budde <mkl@...gutronix.de>,
        "David S . Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        "Michael S . Tsirkin" <mst@...hat.com>,
        Jason Wang <jasowang@...hat.com>,
        Damir Shaikhutdinov <Damir.Shaikhutdinov@...nsynergy.com>,
        Harald Mommer <harald.mommer@...nsynergy.com>
Subject: Re: [RFC PATCH v3] can: virtio: Initial virtio CAN driver.

Hi Simon,

On Fri. 12 May 2023 at 00:45, Simon Horman <simon.horman@...igine.com> wrote:
> On Thu, May 11, 2023 at 05:14:44PM +0200, Mikhail Golubev-Ciuchea wrote:

[...]

> > +static u8 virtio_can_send_ctrl_msg(struct net_device *ndev, u16 msg_type)
> > +{
> > +     struct virtio_can_priv *priv = netdev_priv(ndev);
> > +     struct device *dev = &priv->vdev->dev;
> > +     struct virtqueue *vq = priv->vqs[VIRTIO_CAN_QUEUE_CONTROL];
> > +     struct scatterlist sg_out[1];
> > +     struct scatterlist sg_in[1];
> > +     struct scatterlist *sgs[2];
> > +     int err;
> > +     unsigned int len;
>
> nit: For networking code please arrange local variables in reverse xmas
>      tree order - longest line to shortest.

Sorry for my curiosity, but where is it documented that the networking
code is using reverse christmas tree style?

I already inquired in the past here:

  https://lore.kernel.org/linux-can/CAMZ6Rq+zsC4F-mNhjKvqgPQuLhnnX1y79J=qOT8szPvkHY86VQ@mail.gmail.com/

but did not get an answer.

>      You can check this using: https://github.com/ecree-solarflare/xmastree

If we have to check for that, then please have this patch revived and merged:

  https://lore.kernel.org/lkml/1478242438.1924.31.camel@perches.com/

Personally, I am not willing to apply an out of tree linter for one
single use case.

>      In this case I think it would be:
>
>         struct virtio_can_priv *priv = netdev_priv(ndev);
>         struct device *dev = &priv->vdev->dev;
>         struct scatterlist sg_out[1];
>         struct scatterlist sg_in[1];
>         struct scatterlist *sgs[2];
>         struct virtqueue *vq;
>         unsigned int len;
>         int err;
>
>         vq = priv->vqs[VIRTIO_CAN_QUEUE_CONTROL];

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ