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 DD8B2C7EE2E for ; Mon, 29 May 2023 11:15:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231435AbjE2LPh (ORCPT ); Mon, 29 May 2023 07:15:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229570AbjE2LPf (ORCPT ); Mon, 29 May 2023 07:15:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13D41CD; Mon, 29 May 2023 04:15:33 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 8D2E36143D; Mon, 29 May 2023 11:15:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E0C6FC433EF; Mon, 29 May 2023 11:15:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685358932; bh=HpSUXwKb2rnl3AfJ391VCFRBDm65RJ9ib71YyO7876E=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=NWfGDGqHXwAue2zb66kIOIVb7gHbd9xG6XXbAWuaBZGBCmGxkSsHg8fom8ESCRrav taOuCRVvClvLdFMoegk5cWw9A6nMZzw2EMc+dsKDYGMGi367lHGUdGMDFW74dmm3Nu dlexRFL/9ixuJxFEtjNpCDNBWIwtzFDcXH+xEdYNmZJzyaYkP+feG3uGIw4ioyNdwh 8IE7vQoRIAzAc/qq4zbpoYVrM4RUNWpqTeXi/8rRgqd7C/YbdH9Tiqle+ZBD5bVisl g95YC31T/zGJQ0Tw3scyvHbppK9nGEA258ODE/N6LHqCbJXM7skr40n4ZKdC+EwYgS pDCFpQ0gZYyoQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1q3aqY-0013Ky-GD; Mon, 29 May 2023 12:15:30 +0100 Date: Mon, 29 May 2023 12:15:30 +0100 Message-ID: <871qizl771.wl-maz@kernel.org> From: Marc Zyngier To: Biju Das Cc: Laurent Pinchart , "linux-kernel@vger.kernel.org" , Greg Kroah-Hartman , Zheng Wang , Geert Uytterhoeven , Yoshihiro Shimoda , Wolfram Sang , Krzysztof Kozlowski , "linux-usb@vger.kernel.org" , Prabhakar Mahadev Lad , "linux-renesas-soc@vger.kernel.org" Subject: Re: [PATCH] usb: gadget: udc: renesas_usb3: Fix RZ/V2M {modprobe,bind} error In-Reply-To: References: <20230526143615.372338-1-biju.das.jz@bp.renesas.com> <20230529061714.GA25984@pendragon.ideasonboard.com> <86bki3cxm2.wl-maz@kernel.org> <87353flavh.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: biju.das.jz@bp.renesas.com, laurent.pinchart@ideasonboard.com, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, zyytlz.wz@163.com, geert+renesas@glider.be, yoshihiro.shimoda.uh@renesas.com, wsa+renesas@sang-engineering.com, krzysztof.kozlowski@linaro.org, linux-usb@vger.kernel.org, prabhakar.mahadev-lad.rj@bp.renesas.com, linux-renesas-soc@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 29 May 2023 11:03:27 +0100, Biju Das wrote: > > > Do you understand the meaning of the "dev" parameter you pass to > > devm_request_irq()? > > Yes, the resource is managed with particular device. So what does it tell you about the life cycle of the interrupt you request with the *wrong* device? > I should not use devm_request_irq here. rather should use > request_irq and free_irq during unload with parent device handle. No, that's just papering over the real issue. You should just get the driver that handles the interrupt to request it. Anything else is a design bug. M. -- Without deviation from the norm, progress is not possible.