Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1363817rdb; Mon, 2 Oct 2023 07:26:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGDySG5G7PVw3tgJ4pq+kgLN6xiDwL2XQLYgtM4OvaCtotBLLKkm1NjXQIYDalD6ZY7/Wey X-Received: by 2002:a17:902:e548:b0:1c4:13cd:b85f with SMTP id n8-20020a170902e54800b001c413cdb85fmr11298526plf.5.1696256813828; Mon, 02 Oct 2023 07:26:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696256813; cv=none; d=google.com; s=arc-20160816; b=mgPj8tsVLJVC2CafRihYLFzWmBAzu0w25eYvAJvICTZCkn/H9q2VS9KgjpFEZYq3hp X4nzqevlMArNo6eXvLrraLRQbEQBUDSwxOvlTT2KsvSPYNDJ2naiccKJ+DRhwf60s8dQ bQDHlkZt/h1tWasSIeplEL/9iZt+HOL5FWdmJvAzqNBa9ik6UGMGVxc2ObxQKxILArfx RSV/VW+kAHFUdzI7g2DweylmRgIL3Buy4Qkk+Xej9IhmAfwBx/9pZFPf+TJGDlciM473 U/nSBBTSz8HyycOGGoEhvgy+34bbXFimrkYZTF1fROwimNpKApXvR7RwxnM4tCKgDNuy 2gCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=udyxD4x7r2SWeLX+7M3j8t9aW3/rijFvVpFn86la6k8=; fh=/rbZmS96mLeMaRbSjrQcNGjC1aJzCXIqQRvQRjJi/UY=; b=kRpbAutA+q6XOTRLS8EdmUAnL2owYiFZaCnfl09iYs8F5B0Vyq0V4L47nS1OSPoq2Q Z5N6ZU6Yb4e0xr6QinUTHhGs/3OpC69V/bR6UQM5j/BIzJjWvBfkEdwODdg/AVL/wC/a OJkjKPybyvMniG04Ld+VcKgTHOphqWBzFIjUI+ObJ6hOJJzOw5xH7XNlo9HdoB354SDA 2uS4XCVvqefqBZNw+i/b+VKGMjy9c6boQhM0iGbTrWlhQeqcZoMpnjloEvHr8g/4SaWj Ufmi+G17Wiw97dYb1alkzUoY4jfN2A0EZD3BfGF29BxDHug7AOTlsD4VlJKtO+on1wqg J9mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M1NZ+q4A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id kv11-20020a17090328cb00b001c3cbccf116si25599111plb.403.2023.10.02.07.26.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 07:26:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M1NZ+q4A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id BDD8E807C764; Mon, 2 Oct 2023 01:00:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229712AbjJBIAU (ORCPT + 99 others); Mon, 2 Oct 2023 04:00:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235768AbjJBIAT (ORCPT ); Mon, 2 Oct 2023 04:00:19 -0400 Received: from mail-yw1-x1131.google.com (mail-yw1-x1131.google.com [IPv6:2607:f8b0:4864:20::1131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D0F4BF for ; Mon, 2 Oct 2023 01:00:17 -0700 (PDT) Received: by mail-yw1-x1131.google.com with SMTP id 00721157ae682-5a2536adaf3so20966957b3.2 for ; Mon, 02 Oct 2023 01:00:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696233616; x=1696838416; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=udyxD4x7r2SWeLX+7M3j8t9aW3/rijFvVpFn86la6k8=; b=M1NZ+q4A34mTI9MDRzUIL8KZkZgoARz4DJmTZO4XdH26xMgsrUATVmf3sNH+hYzvZw coEnGWEAd/CgWCmxN+RNrXv+ieG4ApZnvrsvhKMk2Uc9E58nzUE1h7CDHz0Vm6g2cBcX 79WFITE7+iE+Xvg4nBgmo44gUiSzdJ2Dl2h9P/ngzNBBiDGn2FLE/TkDHuhwXpgx4dnd 2NrFvvU3ZXt28IhN65o7cVZ4y6NoFJI4RZanFyuWqpDIxuUDEYlb9Mn0n9IBy1piLPPN hm8dMUdL+FQ9J4/Rluqb64ZHti8eRCP53nM229/rseJ92x75J0bg7YQ+kC0t1cH5mHpJ isRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696233616; x=1696838416; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=udyxD4x7r2SWeLX+7M3j8t9aW3/rijFvVpFn86la6k8=; b=ee2mXV4ilZNJb0SuKhQ4xuylZRyrxWQcwFR6HS8YmOoHvPtE5tlNjpZNhnlXZCZl6k LSAVrlrXRTl53Nf8baXlhCYUaPfioAC40LK14htM/N87E6iCrAysr9zL9GpcF6NnVpC7 8JVu3eTDDe5ayUqLPyY7Ng5T0bPMBomjUp/XY+8h9srdunAB0GqAQRoO0R3MfFW8GdYQ bdbKvUtaTecGnf6XOWxfBvejLJBj1V7Q2mbDAtGcv/ZDhtUfeI82FB7H9Zcfgef0luDg TFHFtIYKjL4CSJkoH17lWGh6PusPdVf+UB6y/YcVtM7ehZlCo2H5ehp3kQ91jjUXFY0S kxsA== X-Gm-Message-State: AOJu0YwqYaSTRAmzMFSgGxMNtzJLFYIpq6r5ZT/07lozNWzuOEq3+kGp kEvQGHgwI7Ej8bPIKq8yZHX+7g5U2XM/CgTpAcuzQz2GqERmGo+WNBk= X-Received: by 2002:a81:49cd:0:b0:589:e7ab:d4e5 with SMTP id w196-20020a8149cd000000b00589e7abd4e5mr10969040ywa.0.1696233616287; Mon, 02 Oct 2023 01:00:16 -0700 (PDT) MIME-Version: 1.0 References: <20230924-pxa-gpio-v1-0-2805b87d8894@skole.hr> <20230924-pxa-gpio-v1-1-2805b87d8894@skole.hr> In-Reply-To: From: Linus Walleij Date: Mon, 2 Oct 2023 10:00:04 +0200 Message-ID: Subject: Re: [PATCH RFC 1/6] ARM: pxa: Convert Spitz OHCI to GPIO descriptors To: Andy Shevchenko Cc: Kent Gibson , =?UTF-8?Q?Duje_Mihanovi=C4=87?= , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King , Alan Stern , Greg Kroah-Hartman , Bartosz Golaszewski , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-gpio@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 02 Oct 2023 01:00:35 -0700 (PDT) On Sun, Oct 1, 2023 at 11:22=E2=80=AFAM Andy Shevchenko w= rote: One more thing, though. I think those warnings are incomplete or actually > reversed, and we outta use WARN_ON(IS_ERR(desc)), no? > > This way it will fix my concerns and your concerns will be satisfied, rig= ht? > So, if gpiod_get() returns an error pointer and then we are trying to > free it with GPIOLIB=3Dn, _then_ we will got a warning and it's obvious t= hat > driver has to be prepared for that, otherwise if we have it NULL and > call for gpiod_get_optional(), even with GPIOLIB=3Dn, it's fine to free, = we > don't care. Since we return return ERR_PTR(-ENOSYS) when compiled out this sounds right to me! Yours, Linus Walleij