Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3542156iog; Tue, 21 Jun 2022 00:22:06 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vIIP9XmI/VtCBKJx0hA1isPgCp7sp42DtWRRSrb9cZHXoSX5W2B4LE8shOk1m8CC+whUSx X-Received: by 2002:a17:907:7b8a:b0:707:59d4:14a3 with SMTP id ne10-20020a1709077b8a00b0070759d414a3mr24345903ejc.51.1655796126220; Tue, 21 Jun 2022 00:22:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655796126; cv=none; d=google.com; s=arc-20160816; b=eqQ8EZfn5yCkoGL/3YxBjYo5Fli3ZnHWXv3m+YfWGGbT/K0+RwZzyDLXtMKWitoARA mrhaD5k5KQJ72ekp5eo7o60AA1s2lYr1akn0FLeMSMR91g1qnBSrkbt4LS/G3ivULYpj ch+kyFV/DcqY1cu0ToN8RPEYZKNckEMP0r3C7Ildo5VM1tLhPSgDmEo+v5fYvDi4DPe1 mPcsVJDd+d0POeVF3ITlmj6hhp5Zl1FOGzzR7p77hnNSx6RVgKdEc6RR3G9j5bObDimc vh8xAKJAK72DTjsIk+eTzakxWlFWEogRa3S8nallo2FyTg9Jk35xnruri0z2UCYdj6wb k6lg== 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=V7OqVcAwf99tLd8G13zTgxlt/eHWgwOs+wnQLZorPjM=; b=YlB+PhbBRc45PQ0rqPn61Eliwl8Wx2wwQ05j9QxInkMal/HnW+kWJ593WQsUgIzyiE +vg/E95NBFcQMnRdoGZiQbLAegzjxUYj751PIEVWdW450JTZPqH53ikdQYtpI8XtUqx4 jI+7cOFYaXtEFZ/9yRl3nSgJLvuPuOMMcb8dBBTCryVfnbKCJSeOfLTZcTSD53BPavJJ EZwbEDR0gHSc+1gQg5BvUvh6GPQbtoef7eMnnXbK1X/KnmjwJB0OnUgiaG3ecotHRJdD 4TI7Eg/qE7Nd4fTX2tApaH5abJEzoMxdZRybpyXLKSS8or9DZwuIiaD6KcXnPt34KYjn khkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="NL/Cr1TL"; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d25-20020a50fb19000000b004356b4883bbsi639484edq.385.2022.06.21.00.21.41; Tue, 21 Jun 2022 00:22:06 -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=@kernel.org header.s=k20201202 header.b="NL/Cr1TL"; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346313AbiFUG5q (ORCPT + 99 others); Tue, 21 Jun 2022 02:57:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231830AbiFUG5p (ORCPT ); Tue, 21 Jun 2022 02:57:45 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BF8B1CFE4; Mon, 20 Jun 2022 23:57:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3D705B81699; Tue, 21 Jun 2022 06:57:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DAE58C341C0; Tue, 21 Jun 2022 06:57:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655794661; bh=+kaDe/Oc1bAbXeDpkUaPaEqe5MkYjktUVSkOvw2ENsA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NL/Cr1TLFu3AZMGTVjKIQwKYHYVCEyrdjwzWY2iZTV9roW4HiOSgspUkaKbDUEg6i 0owWKTefExYoOqnTNKpDIsrmn6nz8Cglc/h1ag6r4+ubpDmjrIorxv0TNmb+Tyr6RM pf8rwjCz/wqwqCmHdEigjZkM9TDFLzOFPN889sJnXbtOEVy4aWwS/oM840gTr4CDOd 6O9j7Ry+ZbF1Xua5ybSoMEgzqy/uX90WUa2QQ9iSTsYLXTJ2KDEqjElm2aTY7VV4V1 rWoMFxXQ0AkyqO/6khHEeAKJ2yidCyp9GioqezwVzaZxbnA38TAs1koHgmoaUtIoKI IR9n2DSGh7ITA== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1o3XpO-0002OK-JE; Tue, 21 Jun 2022 08:57:35 +0200 Date: Tue, 21 Jun 2022 08:57:34 +0200 From: Johan Hovold To: Andy Shevchenko Cc: frank zago , Greg Kroah-Hartman , Linux Kernel Mailing List , Bartosz Golaszewski , Wolfram Sang , USB , Lee Jones , Linus Walleij , "open list:GPIO SUBSYSTEM" , linux-i2c Subject: Re: [PATCH v6 2/4] gpio: ch341: add GPIO MFD cell driver for the CH341 Message-ID: References: <20220616013747.126051-1-frank@zago.net> <20220616013747.126051-3-frank@zago.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Mon, Jun 20, 2022 at 06:08:19PM +0200, Andy Shevchenko wrote: > On Mon, Jun 20, 2022 at 12:26 PM Johan Hovold wrote: > > On Wed, Jun 15, 2022 at 08:37:45PM -0500, frank zago wrote: > > ... > > > > + /* Create an URB for handling interrupt */ > > > + dev->irq_urb = usb_alloc_urb(0, GFP_KERNEL); > > > + if (!dev->irq_urb) > > > + return dev_err_probe(&pdev->dev, -ENOMEM, "Cannot allocate the int URB\n"); > > > > This isn't how dev_err_probe() is used. > > While I agree on the below comment, what does this imply? That you should only use dev_err_probe() to handle -EPROBE_DEFER. That's what it is was added for, documented as, and it is what the implementation still tells you. I see now that there has recently been some mission creep: 7065f92255bb ("driver core: Clarify that dev_err_probe() is OK even w/out -EPROBE_DEFER") I'm not sure I agree with that, but fortunately we don't need to have that debate in this case due to the below. > > And allocation failures are already logged so just return -ENOMEM here. Johan