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: <87a560q10x.ffs@tglx>
Date: Sat, 21 Jun 2025 22:42:54 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Vadim Fedorenko <vadim.fedorenko@...ux.dev>, LKML
 <linux-kernel@...r.kernel.org>
Cc: Richard Cochran <richardcochran@...il.com>, netdev@...r.kernel.org
Subject: Re: [patch 07/13] ptp: Split out PTP_SYS_OFFSET ioctl code

On Sat, Jun 21 2025 at 21:14, Vadim Fedorenko wrote:
> On 20/06/2025 14:24, Thomas Gleixner wrote:
>> +	pct = &sysoff->ts[0];
>> +	for (unsigned int i = 0; i < sysoff->n_samples; i++) {
>> +		struct ptp_clock_info *ops = ptp->info;
>
> Looks like *ops initialization can be moved outside of the loop.

Well it can, but does it matter? No, because this is only a coding
artifact. The compiler can evaluate ptp->info inside of the loop at his
own peril even on both usage sites.

Though what's more important is that from a context point of view, ops
belongs into the loop, because that's where it is used and not outside,
no?

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ