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] [day] [month] [year] [list]
Message-ID: <93b666e9-c9da-419e-bc9c-bf909b5fe2db@linux.dev>
Date: Sat, 21 Jun 2025 21:59:02 +0100
From: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
To: Thomas Gleixner <tglx@...utronix.de>, 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 21/06/2025 21:44, Thomas Gleixner wrote:
> 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.

Fair.

Reviewed-by: Vadim Fedorenko <vadim.fedorenko@...ux.dev>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ