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 89C23C433E1 for ; Wed, 24 Jun 2020 13:51:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5857520724 for ; Wed, 24 Jun 2020 13:51:55 +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="KktHo04I" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403924AbgFXNvy (ORCPT ); Wed, 24 Jun 2020 09:51:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391084AbgFXNvx (ORCPT ); Wed, 24 Jun 2020 09:51:53 -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 658B4C0613ED for ; Wed, 24 Jun 2020 06:51:52 -0700 (PDT) Received: by mail-qk1-x743.google.com with SMTP id b4so1807407qkn.11 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=swIvlZVXkP4rhYK2Sc2mqRC4PDy1g91QzGZjWFQ3U8mXarwUO0dMlII7K4LB/zsxEZ oyW0PHo6KX7g93nB3h611madKh9+ys7XiWIiBWRWXZGrtfa9JamC/q92l04hyYi2RvXo W8Kt4hviXtbSVeuKfP2HyXnqkpJ4LaJtMPOetgtODPTplb+pW80xRtQ3ZIoc5bKDiphc TlT1GGnIdpK8xJC1mox+c7Nt48E6HEAi1JB9F6ZprXeFY4FFQhS5dzCh51JRNvyzjk7f ZXmbuj/9ZShHCfyA05SaCCgXQ/b9FFbdjsG+E8LlWqEmvmlzaVDzGhoeMqg9vCp+5sjm x9mg== X-Gm-Message-State: AOAM531fXzFS0FezU/roTtiae/erSoEX+UXM0l2G2hi19Q2deB2StW6k t/ZXGL0MVoiZNWBXfuxayrtniLea7lSjEJyzRW7rkw== X-Google-Smtp-Source: ABdhPJzH4Dgmup8sCb73pnheO53Gb7G6wtoURv+g92q9yilghYFUERJH/XrvO4SetIxMLaZvn37S10yKdnBRcYdcb+k= 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-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@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