Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1909674rwb; Sun, 18 Sep 2022 17:27:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5YsVEgtrc+8UnFgOQWgZ7xkhWwDXwkWb0AV2XzAKgBrup21DkfMtR2EOV0wVWmBik70MRW X-Received: by 2002:a17:907:75c1:b0:730:aa62:7f65 with SMTP id jl1-20020a17090775c100b00730aa627f65mr10572893ejc.355.1663547250064; Sun, 18 Sep 2022 17:27:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663547250; cv=none; d=google.com; s=arc-20160816; b=V+XUjOAKkx9LhaHEmKl7/k+/b9P2mO1YzEXbMpvo0+/FigDf50tPy3sL4GBuPdaKeo jhYO0o044DyJdOrVsk7vpcHCFfMnExK5d0lMDJfPHssVVuJLPCU1aByMAs8nJg8CAJeW vJfbzIQ3TTgIrVJ85gBaa+XPwXFInku7Rcis9Y6cp4OPaqnkk7+mjQ4lCYQ8GVcSkUKa PcJk98Dck2l6Ussfa/oacRHLu2uEVAa2zG0fOWW59s6qsKy8Kl3oL8+nE0d6q5Wma8hS OCRDCWC9/rgpoqOrDasXMX/grHMTQCVJ1I1GMvas/Q78gMIgQjNeJiOAToaFdE7mun3E xC2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=nx+a1DvWCBo5ERwaVpW/CuMoX39dd2IN65mPeOU18nk=; b=vciwTB7aGdE74CTm7A+MO7KG+TW0+jx8bALLXDkoo6aDSna9P+MyjX4xlqoka/RXV7 PphZ4sdkPVkkOSqwX0IU77M++VEiSpEXfykFBtkUFkxKDgyst8RYPUNLmPAWVFCJ+Dxs WqGpNDwL7oFGNaD1aVr2sqsHdSGzt8UAslrnP09tmcLxKwLcxNZdyGKAKO51N7N1kNjI ZLjC5uksAE0t3bK1wSsJDYg5CwFN3xKRBcOE1rxf3WNT8V/VvigPFbQT3AP9XITzx8Nv sHNILi/jSYMsM1MhYlx7QXFGNn5Bg3zTerFrb+UXpi8R+8nYVoIfu6EeFMLAwXnXr1V/ gMtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Htjm9zpZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g14-20020a056402090e00b0043d56e0c95asi9457365edz.585.2022.09.18.17.27.04; Sun, 18 Sep 2022 17:27:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Htjm9zpZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229655AbiIRX6s (ORCPT + 99 others); Sun, 18 Sep 2022 19:58:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229561AbiIRX6r (ORCPT ); Sun, 18 Sep 2022 19:58:47 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D50013F46; Sun, 18 Sep 2022 16:58:46 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id o70-20020a17090a0a4c00b00202f898fa86so4557780pjo.2; Sun, 18 Sep 2022 16:58:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=nx+a1DvWCBo5ERwaVpW/CuMoX39dd2IN65mPeOU18nk=; b=Htjm9zpZ8qet43rd+8hciEkngTT3Mf9gh89SN468HcXRk3ucOGAT1qqtAaMZEhnQ+5 HKO+dyYDDMbhTRmR9hOlUZiBKcCB5G0vFFFNhO2usZIIwCq/GpbIZ1mREUUbG/kdm4XB UxUE5tOK0KIq7xMEdNi6auBBrWyHMhS4LBqq3mCSeeqyLbVhnpEd0YQo4v6MFY894bHM VWFH8AE2DMrvKVROiH7xLpQBS9euYX87lvN5EMyugwHztkvEzA/j9PahLolBMAjWypAu NI6xV55ezEdKYSo+kMyCRrRs3o7PeEUCSt4OF7VYnS4cLQbwWcHem9cjtg2IwW4K9/NS O5Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=nx+a1DvWCBo5ERwaVpW/CuMoX39dd2IN65mPeOU18nk=; b=WD5P5wmLbWIAwF/ob8uD7y3pEJIMLmA5+34GUqMtxpaYjAI/dZej1070Mg5ms4R97W HWwVZ9WqsSfEx8vSK+w0ijMntKg0KmUQV63QCdw1WmVUp1DagEvChOznN4USrG4S5Qqt 7qKUG4zHBdrhLrO/wE3jjBYSn+WpH6/L3+6LQ0PtOn6IkVbHJR7Qtaqm3w3uXj6YOI+6 2/lu0HGp9Uh0iO/TstpsIRVsgAKwE1r8bb2akrMQ3LUrfWQCrhLi9eY9j18A+nu1d2uk kxWTs00jsV5b9CQ1A6dyYisxx+yqZK62jg9+iP/g0oT0w7nvilBAa3VNRJtWYM3rKbLi ABoQ== X-Gm-Message-State: ACrzQf1A52j9P2uISoFkEm9JeQ3XH+e2I5H7FHaGdNz6ZAuMTp+BVGP/ thWdEcK3dZgSlePQrbNFXBM= X-Received: by 2002:a17:90b:1e0d:b0:202:91ec:e167 with SMTP id pg13-20020a17090b1e0d00b0020291ece167mr16593865pjb.174.1663545525697; Sun, 18 Sep 2022 16:58:45 -0700 (PDT) Received: from sol (110-174-58-111.static.tpgi.com.au. [110.174.58.111]) by smtp.gmail.com with ESMTPSA id 75-20020a62164e000000b005499599ed30sm8113030pfw.10.2022.09.18.16.58.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Sep 2022 16:58:45 -0700 (PDT) Date: Mon, 19 Sep 2022 07:58:38 +0800 From: Kent Gibson To: Bartosz Golaszewski Cc: Linus Walleij , Dmitry Torokhov , Pali =?iso-8859-1?Q?Roh=E1r?= , Shawn Guo , Lorenzo Pieralisi , Thomas Petazzoni , Bjorn Helgaas , Rob Herring , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] PCI: mvebu: switch to using gpiod API Message-ID: References: <20220906214114.vj3v32dzwxz6uqik@pali> <20220906220901.p2c44we7i4c35uvx@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 16, 2022 at 09:22:59AM +0200, Bartosz Golaszewski wrote: > On Thu, Sep 15, 2022 at 11:30 AM Kent Gibson wrote: > > > > Enums work for me - especially if the goal is to differentiate > > logical from physical - there should be a distinct enum for each. > > > > We won't even have to change the function signatures if we go with > enums - they already take an int and I'm in general against putting > enum types into function signatures in C as they give you a false > sense of a strong type. > IMO it is far easier to remember that C doesn't range check enums than it is to remember what specific values are appropriate for a function accepting an enum as int. A specified type is a strong hint, and unlike documentation is one that an IDE can parse and provide valid options for. Passing enums as int is the norm in the kernel, so fair enough to keep it that way, but that does contribute to the confusion that we are trying to address here. Cheers, Kent.