[PATCH 4/4] pwm: th1520: Fix clippy warning for redundant struct field init

Michal Wilczynski posted 4 patches 3 months, 2 weeks ago
[PATCH 4/4] pwm: th1520: Fix clippy warning for redundant struct field init
Posted by Michal Wilczynski 3 months, 2 weeks ago
Clippy warns about redundant struct field initialization when the field
name and the variable name are the same (e.g., `status: status`).

No functional change.

Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
---
 drivers/pwm/pwm_th1520.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pwm/pwm_th1520.rs b/drivers/pwm/pwm_th1520.rs
index 5fb123f5e9c6dc3a8ee9a7a47fa778c23213e957..95a809af48eb16fe13125d4d9f4ee5de20555e77 100644
--- a/drivers/pwm/pwm_th1520.rs
+++ b/drivers/pwm/pwm_th1520.rs
@@ -185,7 +185,7 @@ fn round_waveform_tohw(
         );
 
         Ok(pwm::RoundedWaveform {
-            status: status,
+            status,
             hardware_waveform: wfhw,
         })
     }

-- 
2.34.1
Re: [PATCH 4/4] pwm: th1520: Fix clippy warning for redundant struct field init
Posted by Uwe Kleine-König 3 months, 1 week ago
Hello,

On Tue, Oct 28, 2025 at 01:22:35PM +0100, Michal Wilczynski wrote:
> Clippy warns about redundant struct field initialization when the field
> name and the variable name are the same (e.g., `status: status`).
> 
> No functional change.
> 
> Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>

applied this patch only (for now) to
https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git pwm/for-next
.

Best regards
Uwe
Re: [PATCH 4/4] pwm: th1520: Fix clippy warning for redundant struct field init
Posted by Elle Rhumsaa 3 months, 2 weeks ago
On Tue, Oct 28, 2025 at 01:22:35PM +0100, Michal Wilczynski wrote:
> Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
> ---

Reviewed-by: Elle Rhumsaa <elle@weathered-steel.dev>