From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from confino.investici.org (confino.investici.org [93.190.126.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3FCB233B6FB; Tue, 2 Jun 2026 07:12:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=93.190.126.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780384335; cv=none; b=GtLSrNMSyjgfNBBFmcBFxCRcmkNVsMNmaaYEIfY/Ge7kSONpGLx7J+RrUhpA423u+vT0q2mvRKfJ262nsQlYWeMaDUCceCOrV6dXnsKAwAE2vI9JPO9uugOiishPDwQXLsNw6CtVTeZMq8TmoJlR1BrPSG+BLcKnWuiRtYafMYE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780384335; c=relaxed/simple; bh=P8lh701jT9yZmofB7hy7w97sJuyJLPaeQffJywe9s6g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=YraVl6ZvIv5GX+eLeMjC3N6K/18cFKV4j4E+iMrNf5kE6BDBr2fBMMVRa6O/iOFTQWO+Tg5J9v4F0EvPIaWYS7+G+RU/PoEXAwjrmLX5I90R9nOMFIgDtCCQLksn7CMFvnVgPa9PWgnupXuXfB2Gu656HbNVF1Pk8j/V3sOw1S0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=privacyrequired.com; spf=pass smtp.mailfrom=privacyrequired.com; dkim=pass (1024-bit key) header.d=privacyrequired.com header.i=@privacyrequired.com header.b=IqJLEOjs; arc=none smtp.client-ip=93.190.126.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=privacyrequired.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=privacyrequired.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=privacyrequired.com header.i=@privacyrequired.com header.b="IqJLEOjs" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=privacyrequired.com; s=stigmate; t=1780383886; bh=z0jmVNzZvirhy3R+tfL9bbf+f442BGqrfXEemWbJb9o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IqJLEOjsiXnW2zkyrLbvMKHHaE0+D1wVk7aSiasGfF/mxbTdcO7MkQOF29YeIXIYn ysy7JJ2gNSdc/DlQWj01fd0WscuyrwtVkAfJjs8sD6/TYVJQhhJgEWoJ4UZix4hK3g 3uhawK0I8knHFo1iiTEdOU0D4ZdoCtYCXi9QLzNw= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4gV1zf2bk4z11HB; Tue, 02 Jun 2026 07:04:46 +0000 (UTC) Received: by mx1.investici.org (Postfix) id 4gV1zd112Nz11H5; Tue, 02 Jun 2026 07:04:45 +0000 (UTC) From: Francis Laniel To: Miguel Ojeda Cc: Michal Wilczynski , Miguel Ojeda , Uwe =?UTF-8?B?S2xlaW5lLUvDtm5pZw==?= , Benno Lossin , Gary Guo , Boqun Feng , =?UTF-8?B?QmrDtnJu?= Roy Baron , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , linux-pwm@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] rust: pwm: use pin_init::zeroed() to initialize pwm_ops Date: Tue, 02 Jun 2026 10:04:43 +0300 Message-ID: <2833204.mvXUDI8C0e@pmachine> In-Reply-To: References: <20260529153821.126823-1-laniel_francis@privacyrequired.com> Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Hi, Le vendredi 29 mai 2026, 19:45:06 heure d=E2=80=99=C3=A9t=C3=A9 d=E2=80=99E= urope de l=E2=80=99Est Miguel Ojeda a=20 =C3=A9crit : > On Fri, May 29, 2026 at 5:48=E2=80=AFPM Francis Laniel >=20 > wrote: > > Replace unsafe block containing core::mem::zeroed by calling > > pin_init::zeroed(). > > This is safer, as this function is guarded by trait contrary to > > core::mem:zeroed(). >=20 > It is definitely safer, but it is actually fully safe, i.e. it is a > safe `const fn` after all, which is great. I would say removing > `unsafe` code is the justification, even if of course the function is > able to be safe thanks to implementing the trait only for certain > types. (Also missing `:`). >=20 > I would suggest reusing Benno's commit message from the series he > links in the issue instead, e.g. >=20 > https://lore.kernel.org/all/20250814093046.2071971-8-lossin@kernel.org/ >=20 > > Link: https://github.com/Rust-for-Linux/linux/issues/1189 >=20 > Please use Suggested-by like the issue mentions :) >=20 > Suggested-by: Benno Lossin I read the issue too fast! I will send a v2 with the corresponding tags and= =20 new commit message! Thank you for your suggestions! > Thanks! >=20 > Cheers, > Miguel Best regards,