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: <877c14q0yc.ffs@tglx>
Date: Sat, 21 Jun 2025 22:44:27 +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 10/13] ptp: Split out PTP_MASK_CLEAR_ALL ioctl code

On Sat, Jun 21 2025 at 21:36, Vadim Fedorenko wrote:
> On 20/06/2025 14:24, Thomas Gleixner wrote:
>> Continue the ptp_ioctl() cleanup by splitting out the PTP_MASK_CLEAR_ALL ioctl
>> code into a helper function.
>>   	case PTP_MASK_CLEAR_ALL:
>> -		bitmap_clear(tsevq->mask, 0, PTP_MAX_CHANNELS);
>> -		break;
>> +		return ptp_mask_clear_all(pccontext->private_clkdata);
>>   
>>   	case PTP_MASK_EN_SINGLE:
>>   		if (copy_from_user(&i, (void __user *)arg, sizeof(i))) {
>> 
>
> Not quite sure there is a benefit of having a function for this type,
> apart from having one style. But it adds some LoC...

Sure it's debatable benefit, but it makes the code more consistent and
does not introduce this oddball in the middle of the other function
calls.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ