From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EACCEC433DF for ; Tue, 30 Jun 2020 08:57:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C301A206BE for ; Tue, 30 Jun 2020 08:57:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="b43IWOnx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731761AbgF3I5N (ORCPT ); Tue, 30 Jun 2020 04:57:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731591AbgF3I5J (ORCPT ); Tue, 30 Jun 2020 04:57:09 -0400 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7ADDC061755 for ; Tue, 30 Jun 2020 01:57:08 -0700 (PDT) Received: by mail-qk1-x742.google.com with SMTP id q198so17877198qka.2 for ; Tue, 30 Jun 2020 01:57:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uLfyA6kwAk3sFKrISr9s3SubY2mEnwLHD2Bu93ov3kU=; b=b43IWOnxRsypW3ZvtE6GOdHeSq1it21xnZfm11oR1prYjnkDmCgV5GI51EaOc9852V 61fm//3tcUCZ+FHey/EAdlCAcAo90oHSIuxxp9cBo7XEDz0kSmkjixQwrI+Et0UpR7bh DJpLgzaBmvF+VzLb5QJeSpgNobbLekRrbWNVmxSEfxclrZhNJrCOdA8xj8YRCjvL1Egk zrY5fXKqAg/4t4zZo/1D2odDdaSMrIfS2ROO0J/S8yVDV4ZNkMtBvmzBDoho9cLrl/c7 5XdqGnX6Z8Sun+Kzw/3ApvKk9X/jm27KJ+E5qFo/HYhsgGG3Jq4PpK4mBAP94J1KGn1X BCzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uLfyA6kwAk3sFKrISr9s3SubY2mEnwLHD2Bu93ov3kU=; b=hanSFJuB/SOPKyrepm5KafFLVI7OklMI+wDUYFoTUfw/+s/3OTPWw1Ky4RWKy750gL Z3tPw4GdT3zCbU4ah4vM2nyuoZlTBP8LSqpa5QSM9tValDBLO/ZK+wT1XU5J7K6fE8Da XgE+Ie3cSFqXM/PdlkTTWSgKyr+d90H3bKdmpc/hUARgTVBlyjbsnFNHZWjW+4mhpCqE QnEFcMzOFio2dS/L7eXKSrlpgNI1COGJqLCs+oe2j1cI6qyQ6aEmaw52A3+LKsMv1/D/ 9QtQbEO/RYISYV08E3xfltB1nSqX3aOrtx5wn6wl46ng+nmLftlRP57ZcY2hHptamWp6 fCBg== X-Gm-Message-State: AOAM530t0VtDYCpNVkkspyX3iLz4xns8ezcQ+bRiiaZu765b9JRqfJuA uAiNNWBojFyxWLAFdl5K0ICc1Tk0o7Q6QjtOJ10B3g== X-Google-Smtp-Source: ABdhPJzps1YB8ezGIBmRJ3hfs+iy1hFiHLPHFZxcAaGXZRtoWn4YonE9966faoaFJCS+TsMSaqxR6nyw0IsMbP1OWOc= X-Received: by 2002:a37:7741:: with SMTP id s62mr6662405qkc.263.1593507428004; Tue, 30 Jun 2020 01:57:08 -0700 (PDT) MIME-Version: 1.0 References: <20200623040107.22270-1-warthog618@gmail.com> <20200623040107.22270-12-warthog618@gmail.com> In-Reply-To: <20200623040107.22270-12-warthog618@gmail.com> From: Bartosz Golaszewski Date: Tue, 30 Jun 2020 10:56:57 +0200 Message-ID: Subject: Re: [PATCH 11/22] gpiolib: cdev: remove recalculation of offset To: Kent Gibson Cc: LKML , linux-gpio , Linus Walleij Content-Type: text/plain; charset="UTF-8" Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Tue, Jun 23, 2020 at 6:02 AM Kent Gibson wrote: > > Remove recalculation of offset from desc, where desc itself was calculated > from offset. > > There is no benefit from for the desc -> hwgpio conversion in this > context. The only implicit benefit of the offset -> desc -> hwgpio is > the range check in the offset -> desc, but where desc is required you > still get that, and where desc isn't required it is simpler to perform > the range check directly. > > Signed-off-by: Kent Gibson Reviewed-by: Bartosz Golaszewski