From patchwork Thu Jun 29 11:08:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erik Schilling X-Patchwork-Id: 697809 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18D74EB64DD for ; Thu, 29 Jun 2023 11:10:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231363AbjF2LKH (ORCPT ); Thu, 29 Jun 2023 07:10:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232180AbjF2LJk (ORCPT ); Thu, 29 Jun 2023 07:09:40 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6080B2D4E for ; Thu, 29 Jun 2023 04:09:13 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-3110ab7110aso588085f8f.3 for ; Thu, 29 Jun 2023 04:09:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688036952; x=1690628952; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=4oCBhqPkRJg4uw3jm/pvDcqU3iJ2P+5ltcSO4A6rWgA=; b=W2dwsQYpbviLfBGgfS3BUTV+DN0How0i7VYDgmu/2nmi4N1qCZlws0M2dH9biulA7Y /zAMqhfHV1nFi4++MMSEYc4sXd1mp43gpIK15iOvupJHDMeWjnWbdNBiQHDlSDBUXpjk mw5a+tJF4nx9J3AgRB5vWmXZdmom4Dgm2VZEyc6GRRMr9DcH62/Hj3SydYk/c1N1m3w4 97yntH9iidLukrfcqM9CfTkOMxlPyRo2wF15V6U/j88iFuh5sziOiSli5oaADjUx/P8H KXPTvqT8cdTowoH9BvcZCwBQWVlj+51QdpXQRTsEs8uHVBIw66JP2f1TKD4DySeSu6VR btSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688036952; x=1690628952; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4oCBhqPkRJg4uw3jm/pvDcqU3iJ2P+5ltcSO4A6rWgA=; b=cKm4hKaVJHN8PKaLD3E5u4Bq76KQMe9QphD4/kxKKOi8po+HRFd1e/m99rzgFRPqcp LQyNc5TN0SUILK3A7xab4nnSbvJgpyOWFXwgJ1/uu1etz1gn1ZwyJxC4Bd4WEV5uKxYa aSRxAKJky6AI+L5RtNRhkK3RrayDHLvf09ZTvLadnBfSL8oI9XSuRx2Ty/wFEC7wmKAe TtZ2tA5kSKz3o1hAIpz0Hd66+/N75jx5okzOX5AOznMjm7k5ruqGXnOmU5LnFiVYSZHy yaMif5+x9ONEKiK26cU8Gmx7YFT6/Pr9RGMgexZugN3lpdnB0W+FsDJrPo+YzWpl+bH5 cqJg== X-Gm-Message-State: AC+VfDwJTqxjMPIF0E9zA8mjhexJcI90EB94/UBi7KNtu+8OpNFuiJqH x17KN0wGtJSTwzUt/JqJaFqv3g== X-Google-Smtp-Source: ACHHUZ4bnnQmf7c6VJNssvQBfjwmBj/rluSp4Blwz7ztsOyCGWZB+ZAgZ+sk1nmA/4BIbwNt2RSfYQ== X-Received: by 2002:a5d:4ac8:0:b0:314:f88:4fea with SMTP id y8-20020a5d4ac8000000b003140f884feamr2827913wrs.8.1688036951737; Thu, 29 Jun 2023 04:09:11 -0700 (PDT) Received: from [192.168.1.127] (i5C7438BA.versanet.de. [92.116.56.186]) by smtp.gmail.com with ESMTPSA id cw13-20020a056000090d00b003112f836d4esm15571197wrb.85.2023.06.29.04.09.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jun 2023 04:09:11 -0700 (PDT) From: Erik Schilling Subject: [PATCH libgpiod 0/4] bindings: rust: clippy: fixed warnings Date: Thu, 29 Jun 2023 13:08:58 +0200 Message-Id: <20230629-clippy-v1-0-9ff088713c54@linaro.org> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAEpmnWQC/x3MTQqAIBBA4avErBPMfsiuEi1qnGogVBSiEO+et Pzg8RJECkwRpipBoJsjO1vQ1BXgudqDBJtiUFK1clBa4MXev2LUEvuuwcFIDSX2gXZ+/tEMF2+ HZ2dgyfkDncRunmIAAAA= To: Linux-GPIO Cc: Kent Gibson , Viresh Kumar , Erik Schilling X-Mailer: b4 0.13-dev X-Developer-Signature: v=1; a=ed25519-sha256; t=1688036951; l=1822; i=erik.schilling@linaro.org; s=20230523; h=from:subject:message-id; bh=+z+EhYScf6UR/IcsGLnW32XLCvQx90uRaH+/sCvwW9k=; b=2zE5Qp1CItepzR76XLtIp2KS8kaHHs/+ConiIL4uDWaayrdsD5G2AIc68Vig2s406cUmu3JA0 jQEtW2Ig01+AmXVVWjdXh6Bx1dEdT7RNTGTFSOvQnYvH5jIC1+EAmFp X-Developer-Key: i=erik.schilling@linaro.org; a=ed25519; pk=/nNqy8/YOEdthj1epXl5FgwCTKEiVqTqqnVN1jVal7s= Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This follows up on my promise on Kent's series [1] to look into whether these casts are needed or not. Most are not, a few are false-positives. I also explored some shunit2 based test-script to automate the testing, but that became ugly with linking issue and needs me to revisit it another time. So this only sends the fixes for now. [1] https://lore.kernel.org/r/20230612154055.56556-1-warthog618@gmail.com To: Linux-GPIO Cc: Kent Gibson Cc: Viresh Kumar Signed-off-by: Erik Schilling Acked-by: Viresh Kumar --- Erik Schilling (4): bindings: rust: clippy: drop unnecessary casts bindings: rust: clippy: silence false-positives on casts bindings: rust: clippy: drop unneeded conversions bindings: rust: clippy: silence false-positive on iterator bindings/rust/gpiosim-sys/src/lib.rs | 2 +- bindings/rust/gpiosim-sys/src/sim.rs | 4 ++-- bindings/rust/libgpiod/src/chip.rs | 2 +- bindings/rust/libgpiod/src/edge_event.rs | 2 +- bindings/rust/libgpiod/src/event_buffer.rs | 7 +++++-- bindings/rust/libgpiod/src/info_event.rs | 2 +- bindings/rust/libgpiod/src/lib.rs | 2 +- bindings/rust/libgpiod/src/line_config.rs | 4 ++-- bindings/rust/libgpiod/src/line_info.rs | 3 +++ bindings/rust/libgpiod/src/line_request.rs | 8 ++++---- bindings/rust/libgpiod/src/line_settings.rs | 5 ++++- bindings/rust/libgpiod/src/request_config.rs | 2 +- bindings/rust/libgpiod/tests/chip.rs | 2 +- 13 files changed, 27 insertions(+), 18 deletions(-) --- base-commit: 4510231c95a087f58a155cf74164e403e1e0584f change-id: 20230629-clippy-890c541c6d09 Best regards,