Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3409848ybt; Tue, 30 Jun 2020 01:58:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwU+nH2iggSOVK6OfZViBJfpm0obkQKfgL094Rq7Wflcz8o3K6i9qsBSJ/EKzIxeMsDtrs X-Received: by 2002:a05:6402:180a:: with SMTP id g10mr9478622edy.152.1593507484743; Tue, 30 Jun 2020 01:58:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593507484; cv=none; d=google.com; s=arc-20160816; b=NjIJiinvWgeq4yc8ZRY1AWNV1ZzJ/PVZBhh2hSmvh7tzIEur8iKRnDLUVXaVvUz1Bu G82STzqkU85stTrN/+pTMP905I7jOLO7JhOzJ2RWO8zekXoMWWRQCoix2JqwUqxSQdZm Bjw7yCRl5qWLegn6q2L0223XfQ+bC6Mu2/NMze55W/oWyvODq+wDsyeyzVLSpxhtkUHx 8qnwQaL+EanHuyRwFlb7Vd8Gy7GWSi5MJ7jLcGyV6ME6gSfOgJk2KG7b2VtTWvaunRLE nRaD/3fY0cj1WqUpOeApJ63dHYRZVnky6yXjxmU9Xq1Vw1dGA+1Wz+yOKQPgyYgnkroU cUBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=uLfyA6kwAk3sFKrISr9s3SubY2mEnwLHD2Bu93ov3kU=; b=nTB0TxQYBnUgi83RVy/BDGqrXJMEzsyfSwSnyxi8AiHemt45b4TAYRTWDLw476aaiI I+BqcQDm7HvankWP9ETnsm7db1RVS3DmzmA/dQZ8oL8mRhhGQ5DwBJc/lI2n9nJk316n iUQ0Bq3hCSoi+RrdlVJ+BeUabKgO+XwVSqjGIzU8H5OOWkg8DvH5qpKceyUMF/jq7YBL Umo/Fuhx2aDPb4va/fAqmnHNSROnQNLAyN9RXQZ7ogMRioq29pMK+zR1ee3jIjt/x7Vr j9OUodmlNJFB7yAcRpbv2SVic39joVHhUdNlNdIINNxbQHsO35joDfC1K+qFIhvpMEqg 0MQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=b43IWOnx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f1si1340998ejw.559.2020.06.30.01.57.42; Tue, 30 Jun 2020 01:58:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=b43IWOnx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731763AbgF3I5P (ORCPT + 99 others); Tue, 30 Jun 2020 04:57:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731639AbgF3I5J (ORCPT ); Tue, 30 Jun 2020 04:57:09 -0400 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA24EC03E979 for ; Tue, 30 Jun 2020 01:57:08 -0700 (PDT) Received: by mail-qk1-x743.google.com with SMTP id z63so17827726qkb.8 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=Q2dvSbx03J85AvDmi498suWD6eHbjW1xcnG65xIhoD4yYWO/+PCe3y63C+k6uDV0zN mFT9m9wCzwp3MejZoFYOF7J1ga2arHwKk+D/yK6yJQ4P9icKQMfcT2S59RTLp+TDTZQb E22reK5W1iYbW9liCSnaPc0+cLkz2kSn8grvX5friKCWnxD5JOo4YmdZ2YIcsRdeLHJl xspvHkRKSfQndhJbxfBSzYBbL9Qof7wV1KbZmxssrzEyK7DOSTT7wv1umF2F9HiKs7X8 n+bsAPGrKPY2DwIPbKHuSi1Er+ay+xDLhnyXu1u2J0TTdFl5o38rlUNxirt0tnKM+MHk EyVw== X-Gm-Message-State: AOAM531G6NFZ35m4Dcp6Up6ugSkrf2/QrFXJIba80ApB/n/hb9FveFUZ cDGtiyzy6j73RTWVd/167iAI8+V3q/MyqzCDViqxhQ== 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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