Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp38260937rwd; Wed, 12 Jul 2023 05:30:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlHDdY8+Ahm4WxidXOXXOUQZ/1YegRjf/H65w+1TMjyEZqRpViM30YpSTWDLq8PL1k4gn3/R X-Received: by 2002:a05:6402:31f0:b0:51e:2e39:9003 with SMTP id dy16-20020a05640231f000b0051e2e399003mr14728390edb.40.1689165039614; Wed, 12 Jul 2023 05:30:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689165039; cv=none; d=google.com; s=arc-20160816; b=Q38V5e14ktTnNAzTO4w37C+SM59u146FqPDimc5jQWt7TAZFtD9q4Fpf+k0TcNUexv GXW8R5bYkj/AEpMwRuZfkVw6StCfGRX+5LnfYzWzX/p/PJM1eLCTV6/J587KL/eNaVBA XXg5naTGoyJswGA9i9cIGdUGgUw1vIGu4/qGNkkKAT0Gk2hEBOZU4x7Gp8oiOROM7qee M3Jg7JoV8rFmMwn6h5tbrSd/n+aInNrKX2+3cWH7L23KBpg+j2Orm6KsBHuStLjUdfV1 t/UaDlJo6LfbyPXF5amj9aEcR93Z08xgRVANHWEDxvbiY14Uzn5qydPyQbPXrlIFmDJ0 LSmw== 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=mp//r7malx1fOXCXmkZiwPiIz6nPveZSBvhRSGxN7TA=; fh=omwx2+DRf+cnwLahxh+ydQHnlDhSwF+7quDekw1kxIM=; b=j0T/qbz5ffTB96tYJtf6+74RmrpXWPs6NOe2aQsv3rfApYGnrRV3seSBy7IRU0bneg X8dDrpRkrh4OSM76H5ctZXf/aiftvy/NCX0Hve/CNxk4Te8RF2TjPy1EywcGPeYIS+Ta hsQdtSeqZXwXhFo+MPzTb+7KewO7rhxGcG901GEy16pdTXTztanWKvnCZELLxGVXaeDU zs80fASWDtjQ8217U+OzAWTHqT9go5TFBQHwjRlU1y4RUaObZLte5KdPY9Nwjwlum6uQ PbVipizog6YXOSxXl1/kJ5+XLaU4dx1adwwEdEEi8yqCSEPTbrK8nxiw8xMUuPZG+WLh NdzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oSvkq3tq; 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 c13-20020aa7c74d000000b0051df37248afsi4370352eds.323.2023.07.12.05.30.14; Wed, 12 Jul 2023 05:30:39 -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=oSvkq3tq; 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 S231703AbjGLMMf (ORCPT + 99 others); Wed, 12 Jul 2023 08:12:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231488AbjGLMMe (ORCPT ); Wed, 12 Jul 2023 08:12:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B5F7E65; Wed, 12 Jul 2023 05:12:33 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9C5A5617A4; Wed, 12 Jul 2023 12:12:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EAF63C433C8; Wed, 12 Jul 2023 12:12:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689163952; bh=9Vrfyl+qNlhjUuYQ+DzG4/zZwn6xt7e/Cc1IJTbESnE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oSvkq3tqbXDLMRHAppG6fxYvOgma2Nw98ZLx5gO+HrZQArhxjxHK/Xlq37JNxEzyx tRA502ufSiNAfgUGKOOwAqi9D/hNkVOATfE6wsCmkJxQ32gR3+ejocFOcVqncpsFVY TAibI8d/hNOZCz99pK+oVTZzrn8sVuc5lYo8tfoN6cb80MfWziZF8mm+S5YcFoDn0r u3uOhy1zo7nsF1jdCoGE6qlfIuDCjfvUlZDGbKyqbs7em2nmxoa5/8qiqv5dVyoyA7 hxcb2ftuH1r04yO31m6lGwRULaElhMnhJFK+MEvwBqEkVf3+webOjYxU7Is1ShgxfO Q44nnk8GlLs+w== Received: from johan by xi.lan with local (Exim 4.96) (envelope-from ) id 1qJYho-0005to-1X; Wed, 12 Jul 2023 14:12:29 +0200 Date: Wed, 12 Jul 2023 14:12:28 +0200 From: Johan Hovold To: Krishna Kurapati Cc: Thinh Nguyen , Greg Kroah-Hartman , Philipp Zabel , Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Felipe Balbi , Wesley Cheng , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, quic_pkondeti@quicinc.com, quic_ppratap@quicinc.com, quic_jackp@quicinc.com, quic_harshq@quicinc.com, ahalaney@redhat.com, quic_shazhuss@quicinc.com Subject: Re: [PATCH v9 06/10] usb: dwc3: qcom: Add support to read IRQ's related to multiport Message-ID: References: <20230621043628.21485-1-quic_kriskura@quicinc.com> <20230621043628.21485-7-quic_kriskura@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230621043628.21485-7-quic_kriskura@quicinc.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 Wed, Jun 21, 2023 at 10:06:24AM +0530, Krishna Kurapati wrote: > Add support to read Multiport IRQ's related to quad port controller > of SA8295 Device. > > Signed-off-by: Krishna Kurapati > --- > drivers/usb/dwc3/dwc3-qcom.c | 108 +++++++++++++++++++++++++++++------ > 1 file changed, 91 insertions(+), 17 deletions(-) > +static int dwc3_qcom_setup_mp_irq(struct platform_device *pdev) > +{ > + struct dwc3_qcom *qcom = platform_get_drvdata(pdev); > + char irq_name[15]; The interrupt device-name string can not be allocated on the stack or reused as it is stored directly in each irqaction structure. This can otherwise lead to random crashes when accessing /proc/interrupts: https://lore.kernel.org/lkml/ZK6IV_jJPICX5r53@hovoldconsulting.com/ > + int irq; > + int ret; > + int i; > + > + for (i = 0; i < 4; i++) { > + if (qcom->dp_hs_phy_irq[i]) > + continue; > + > + sprintf(irq_name, "dp%d_hs_phy_irq", i+1); > + irq = dwc3_qcom_get_irq(pdev, irq_name, -1); > + if (irq > 0) { > + irq_set_status_flags(irq, IRQ_NOAUTOEN); > + ret = devm_request_threaded_irq(qcom->dev, irq, NULL, > + qcom_dwc3_resume_irq, > + IRQF_TRIGGER_HIGH | IRQF_ONESHOT, > + irq_name, qcom); > + if (ret) { > + dev_err(qcom->dev, "%s failed: %d\n", irq_name, ret); > + return ret; > + } > + } > + > + qcom->dp_hs_phy_irq[i] = irq; > + } Johan