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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <958f555a-1187-44ef-95df-c93474888208@amperemail.onmicrosoft.com>
Date: Tue, 2 Sep 2025 23:06:02 -0400
From: Adam Young <admiyo@...eremail.onmicrosoft.com>
To: Jeremy Kerr <jk@...econstruct.com.au>,
 Adam Young <admiyo@...amperecomputing.com>,
 Matt Johnston <matt@...econstruct.com.au>,
 Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
 Sudeep Holla <sudeep.holla@....com>,
 Jonathan Cameron <Jonathan.Cameron@...wei.com>,
 Huisong Li <lihuisong@...wei.com>
Subject: Re: [PATCH net-next v27 1/1] mctp pcc: Implement MCTP over PCC
 Transport


On 9/2/25 18:45, Adam Young wrote:
>>>> +static int mctp_pcc_ndo_stop(struct net_device *ndev)
>>>> +{
>>>> +       struct mctp_pcc_ndev *mctp_pcc_ndev =
>>>> +           netdev_priv(ndev);
>>> Minor: Unneeded wrapping here, and it seems to be suppressing the
>>> warning about a blank line after declarations.
>> The Reverse XMasstree format checker I am using seems overly strict.  I
>> will try to unwrap all of these.  Is it better to do a separate variable
>> initialization?  Seems a bad coding practice for just a format decision
>> that is purely aesthetic. But this one is simple to fix.
> That shouldn't be tripping any RCT checks here, as it's just one
> variable init?
>
>     mctp_pcc_ndev *mctp_pcc_ndev = netdev_priv(ndev);
>
> Keep it in one if possible (as you have done). 


The issue is being moved around.  After my current set of changes, it 
ends up like this:
static int initialize_MTU(struct net_device *ndev)
{
         struct mctp_pcc_ndev *mctp_pcc_ndev = netdev_priv(ndev);
         struct mctp_pcc_mailbox *outbox
                 = &mctp_pcc_ndev->outbox;
         int mctp_pcc_mtu;


Without the wrapping I get:
WARNING: Violation(s) in mctp-pcc.c
Line 275
     struct mctp_pcc_ndev *mctp_pcc_ndev = netdev_priv(ndev);
     struct mctp_pcc_mailbox *outbox = &mctp_pcc_ndev->outbox;

I could move the initialization of outbox, but that seems wrong. The 
wrapping is the least bad option here.





Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ