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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 390F5C433F5 for ; Tue, 1 Feb 2022 20:59:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229902AbiBAU7t (ORCPT ); Tue, 1 Feb 2022 15:59:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229830AbiBAU7s (ORCPT ); Tue, 1 Feb 2022 15:59:48 -0500 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16A68C061714; Tue, 1 Feb 2022 12:59:48 -0800 (PST) Received: by mail-ej1-x634.google.com with SMTP id o12so58028528eju.13; Tue, 01 Feb 2022 12:59:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qGx7EBxSb7IDUm+z7hlUIuBW5gm80SRoN1CR0+IVN6U=; b=PG+aNUZZf2B9D5GG8wTtKnX+q3LbKWzMroa/mXmUFckusWa/NpATh3MZCxGY3GHssN jKkrW14ardEHwPpydENxpqpODWr+4TCC+iljCFvb+MVGG1UGMPFgPzbAmz8iAJYVD+ZZ F8dPiBmijlIKMKMoOOFTcKMJ9TNnBQT5LuIy48J5A9vzKyfacREYoJwrSRVQ4ZWbRdG2 hLQ/gFypnoNnfDE0VphhpvoC0Q5X62UUlhhFi0uNlo2HdIIaxl2CXjhtwjvhgJlFvSUD Gdg1gmtsXCamBVvHXkWkhy9P4ApBkpvzY1BxEY7de6UDoViyuqlSxwDOjOWYxbY+kPqX Mf2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qGx7EBxSb7IDUm+z7hlUIuBW5gm80SRoN1CR0+IVN6U=; b=NwVZt010jL9OgXqwbXi9RAHiEl1UdRk/rrKcYuPzE9a64XOkJPzZ8qga7Zoa8rs06M I65MF7wO1hc/3B4LQM3Ttl8kwKeH416ZVscT0f/JU1fnx6wrvYgLXv+dug0w8kF98FSn BZo0OvB64c7+/mTIxYPgF0Wt7dAE09r0zYbSgrophSC3ZXhjimAV2Xd1mOX41oDTJVam B4qkTT7cHV6YtylfG7dHwMGGV6z/HFSFrmmwu3L53PawG3K6OEiGF/9/MBdF4GNyuPme uh5LE5+eeSolyOmZg2gfk1v+FSq0ZOKKrkfIJDS4qfSTANMi0SuMtJ9Uyue74r+jgWmX Ru5Q== X-Gm-Message-State: AOAM531uiLSlM3xjbg6IsYEssSfGv9b+KfOLAFY6i1Khxw/tMwtw/KOM Tl/0jyC0fvnTed/1P8y6A2l1r38XH2Xmj1Z/iTo= X-Google-Smtp-Source: ABdhPJyBs6j7rayRkeF33MDCePZGEQaAf9X/tnXtfnHli4PRFmua9ltKdvOBiWPDEZiMzWisVZ9Aut1MWB7NonTYFog= X-Received: by 2002:a17:906:99c5:: with SMTP id s5mr22830959ejn.497.1643749186681; Tue, 01 Feb 2022 12:59:46 -0800 (PST) MIME-Version: 1.0 References: <6a62a531227cd4f20d77d50cdde60c7a18b9f052.1643625325.git.geert+renesas@glider.be> In-Reply-To: From: Andy Shevchenko Date: Tue, 1 Feb 2022 22:58:10 +0200 Message-ID: Subject: Re: [PATCH] gpio: aggregator: Fix calling into sleeping GPIO controllers To: Geert Uytterhoeven Cc: Linus Walleij , Bartosz Golaszewski , =?UTF-8?Q?Mikko_Salom=C3=A4ki?= , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Tue, Feb 1, 2022 at 10:54 PM Geert Uytterhoeven wrote: > On Tue, Feb 1, 2022 at 9:35 PM Andy Shevchenko > wrote: > > On Tue, Feb 1, 2022 at 10:09 PM Geert Uytterhoeven > > wrote: ... > > > + return chip->can_sleep ? gpiod_get_value_cansleep(fwd->descs[offset]) > > > + : gpiod_get_value(fwd->descs[offset]); > > > > This indentation kills the perfectionist in me :-) > > Why? The above is aligned perfectly ("?" just above ":")? > > > What about: > > > > return chip->can_sleep ? > > gpiod_get_value_cansleep(fwd->descs[offset]) : > > gpiod_get_value(fwd->descs[offset]); > > > > ? > > > > Or as variant > > > > struct gpio_desc *desc = fwd->descs[offset]; > > > > return chip->can_sleep ? gpiod_get_value_cansleep(desc) : > > gpiod_get_value(desc); > > > > ? > > IMHO, those are ugly as hell ;-) I have the same opinion about your initial variant. :-) So, up to the maintainer(s) what to do. -- With Best Regards, Andy Shevchenko