Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp600466ybt; Wed, 24 Jun 2020 06:54:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCWqoUrXDlqom1P6ppkjSremNNuNwNuL5AeruK1eJvhLHqIVh54fc4/d5x1ZESB15RPrIu X-Received: by 2002:a17:906:35ca:: with SMTP id p10mr24382479ejb.392.1593006846166; Wed, 24 Jun 2020 06:54:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593006846; cv=none; d=google.com; s=arc-20160816; b=z+th/xPclidLAAoDjO3qPT/yqwNeDnJMoDjzqe2f7Znzj+EkOYJZvnZbr63gaXstkd w+NJK0h1uvQoClDNZxqDGXU9W2IhOoilJmhHUCZC4EkqrcWwW53aI+AzvAu8H5T07+DM X4Fxz9LtVMXg70SrE3nvAk23dz+1RK3jKbd9QvPjNP5CHBcxjTzIgv72AJ4Tp4m1+TTr umVeV9T4sQkhHnRQRdb1u1FOVl4ycar55NWYhu0mIC/0Ld3EictNDVwr3zMxMaS5PrEu PSEAOeEb9Bm+EeIqOM3I+E4XZ4uq4yQYM2L2+IIjUweryERXAVEb7iH/a3cj4IO3kkNy cgoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=HWNNES+Y818odLI/3gSJ9ckg/fz5YcNui7c90vtLDpI=; b=GWyzRNEOf+kAAbSlyr7db4uunTk1NcTyiNbEYIrYiZQSC6iPZdhdxsRr+VTeGGnkE+ logIjW1FCj7d/xwbTOAJgWIGOJ4TIpoSU657pMPeX8VcTle6Z1FdoNtArYKfEAoOCbId dnfTWMMLrjVco2iPGMGVJoERYfXn03FP1JNbFBaAEMNf595hYwiwd6ABiyYFt15AdNyS UH2ufp+URzBTrGFMCBbRxDRsmmT5Is7C9k3YOVGxjjSGCdNVaGUGVLBjICI5TGD5NPHU kjjmLNP9VBAR8vbu8n+WIjFR+dui14T42hWKotm+xY+qE91Xd1H8/Mprh/vTNAaIbs0D tpRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=KktHo04I; 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 g5si4598019eds.213.2020.06.24.06.53.42; Wed, 24 Jun 2020 06:54:06 -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=KktHo04I; 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 S2403953AbgFXNvz (ORCPT + 99 others); Wed, 24 Jun 2020 09:51:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391067AbgFXNvw (ORCPT ); Wed, 24 Jun 2020 09:51:52 -0400 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 535FDC061573 for ; Wed, 24 Jun 2020 06:51:52 -0700 (PDT) Received: by mail-qk1-x741.google.com with SMTP id e13so1830528qkg.5 for ; Wed, 24 Jun 2020 06:51:52 -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:content-transfer-encoding; bh=HWNNES+Y818odLI/3gSJ9ckg/fz5YcNui7c90vtLDpI=; b=KktHo04ISnCkBtN5rrRmMJ3YEda0xGWhl1b6QYgeUta/PZyM34Y+nxCcstwqzH521y qkwp7vYvXrQI4X0H2qE22hkwwEBE9G5ip2cXPNJvnnWNSrjakwlhiHXH4+cimGNtFU/K YZp/JrHOmEJ9UsRNOLBSqXJGACLzoDW4blSoxUupyaFcM9MIOjAWv/g2gXgiDf4WSu5U B53MQ49Yj0MbA+FlNEUU9gJ8vu6mjihOUqX5vqBEm8beyP5OmFV56ihVEdC8J3DN+zpc LJ3DIIXfNtwm7zKaKBt1H2aI9QVs0Kc1xVUnzJlUJ//1HBNh5k7gd4oYUfXp82qv4/ir jNmg== 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:content-transfer-encoding; bh=HWNNES+Y818odLI/3gSJ9ckg/fz5YcNui7c90vtLDpI=; b=fsckUzBRQySEuOmnzeSlaQjJyjHaKj7/Bf/vzPjP6SFkxVCwzi3D8jzoI5m7/kCVBH ywM1uxonuLww7+PPIA156FEzJCq40tY0UrGpkxY2nY+IGCnw04wB0tkkmYwjgRBSy5l4 EnxfgN0wdSweixRzkvCAr+Q0LhDnWGdc0l0satmGQ9m5GL+QvPjoy88sk0tiHUmRVGnt yNn6AHQ9aGhuCGaAWk5TERLcyTh1Dxknnex4yAqcS2F3Sv525KkEL0Qa/MBU+aH8+DTD o5grfxApmZ20oUaK+FjtGtnaQKca6caAvzlWWcd1YBoHN/lsLBZNKLa6RaEXtU5SRYVs wAtQ== X-Gm-Message-State: AOAM5317wz74HaE7xh/YVc+d4LRAwCEmoMzpdpWmivIW+TUkRG6gzIta +lV+JpyTIKHeWCQ0Iu0J4gnZYKsDhvPbFv9DeUWD5w== X-Received: by 2002:a05:620a:1114:: with SMTP id o20mr25798514qkk.120.1593006711646; Wed, 24 Jun 2020 06:51:51 -0700 (PDT) MIME-Version: 1.0 References: <20200623040107.22270-1-warthog618@gmail.com> <20200623040107.22270-5-warthog618@gmail.com> In-Reply-To: <20200623040107.22270-5-warthog618@gmail.com> From: Bartosz Golaszewski Date: Wed, 24 Jun 2020 15:51:39 +0200 Message-ID: Subject: Re: [PATCH 04/22] gpiolib: cdev: refactor gpiohandle_flags_to_desc_flags To: Kent Gibson Cc: LKML , linux-gpio , Linus Walleij Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org wt., 23 cze 2020 o 06:02 Kent Gibson napisa=C5=82(a)= : > > Refactor the mapping from handle flags to desc flags into a helper > function. > > The assign_bit is overkill where it is replacing the set_bit cases, as is > rechecking bits known to be clear in some circumstances, but the DRY > simplification more than makes up for any performance degradation, > especially as this is not a hot path. > > Signed-off-by: Kent Gibson > Agreed and I like the code shrink. Reviewed-by: Bartosz Golaszewski