Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp2199943rwp; Fri, 14 Jul 2023 02:21:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlEOemcEgd1crtaa4IC9DDPTy81WBQ+uOQ3wgUXVxHyVy9K7JtBg34zTYRghTlyGJEAU2SRX X-Received: by 2002:a17:902:e80e:b0:1b8:8702:1e7c with SMTP id u14-20020a170902e80e00b001b887021e7cmr2654698plg.33.1689326460950; Fri, 14 Jul 2023 02:21:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689326460; cv=none; d=google.com; s=arc-20160816; b=F/HeLbBx4f9thnJ1kGtiLRDYFdITb7A8M2hvtvEUvSXQrvxTxcnXh0F3vfJxc6tm5a 9SoP0Q5CrP2oSKzEmQ5jRgSxrymnqQq2v7Fj6LO7inex139SkGpLZ1OB+j0qf/HzEeZg pH0VJw9iGuBLUxWiUCK1Bb4tLatDQREYEiWIx8Q5qJDTYhKVYx7NeOwP2CqqoWbRbIaS +tf3XhFAd1vaCSPnwmLMpzUh8HyiJkqMUzQii8E/G2mGAYD9Cuxbvxe5fuXZxRYlXSN3 4ukwBWmI34udKRwjmllVPA6pq5w7tbtvhyvyifOvshNpzWpzBOWB9/1viP/2cjSvvXsv hKkw== 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=kFZZ0SC4SRB24P6QynOx2JmxT6pFBsCAHEQrgNHvUWg=; fh=C8qZ2fwDMu0pGACyw0RHQRUEzQUNUc7W76DsJuQT6Lo=; b=ZzRHMfaylubwouzk23zyEVVYurQ3oRwR4+U0nwBl3qCLTwd+MxA6HmX8dNLBrIIQaY U6eIvqp0cdTqJ2kEiF3YPXh8gcS0UN5DXjJVFTIGtLC8sUC17DTc0ctOm6Y1N1Dv/TT5 5Waz+ubRCjaky4vL/1fPi3NppXbdjLLgbWrmyl/tSA9wm2hb2gis8nC0B0+VJjMc9Prj wmp1OYIQQ0T92Ko0zOiNmTL8eC7JM6XLX4qyJRqSoYULJLAwSb1sfvUlMY00OAywgClg qCxMhpynaTps1CimfX5+Kqi4uiSmDtBi/Y0t/qr2TEopH286T7ZGH4Oun8y2R6QFLJ1f W1Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oYQOx+Bf; 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 z14-20020a170903018e00b001baff279a5esi4006737plg.78.2023.07.14.02.20.47; Fri, 14 Jul 2023 02:21:00 -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=oYQOx+Bf; 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 S235352AbjGNJGe (ORCPT + 99 others); Fri, 14 Jul 2023 05:06:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234562AbjGNJGc (ORCPT ); Fri, 14 Jul 2023 05:06:32 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE1D330E9; Fri, 14 Jul 2023 02:06:04 -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 301E961CBD; Fri, 14 Jul 2023 09:05:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 849BBC433C7; Fri, 14 Jul 2023 09:05:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689325543; bh=WvoBK4BO8pPPux6zd3qw6bxteYzOyTTKLiAplHoONqg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oYQOx+Bf0l+WC841uAxl+EmnmXnIWq6H+9fTX5BHU8AjkSu6g7L7b+35oANMDJ728 nF07kgeXFpmztoS8zKDGp2Mz27GCeCt7JKD3hff8XA2o0mBZk4Nge8EXeaoSA0qqDd qNhuCMiEmA07Rm3MnKJy4sU6OriXo4GOhrwjDy9Ec9Pc5KjCTBevCk0VOxFNM3CYsD ptVnuN5pjFgKZDeLU1O5hmNDvs7hmiq9gVknilZkJs2L9wKbYIskaGlSsxtuIOsPB1 F2Cf3t/QymtdnWVbbWqiqcXn3WoABZ99gxrxT+xscG187m1AvLnsv/Pm4NX2dphzmo xUI0zL6JveEkw== Received: from johan by xi.lan with local (Exim 4.96) (envelope-from ) id 1qKEkC-0006bZ-0a; Fri, 14 Jul 2023 11:05:44 +0200 Date: Fri, 14 Jul 2023 11:05:44 +0200 From: Johan Hovold To: Krishna Kurapati PSSNV Cc: Bjorn Andersson , Thinh Nguyen , Greg Kroah-Hartman , Philipp Zabel , Andy Gross , 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: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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, Jul 12, 2023 at 11:56:33PM +0530, Krishna Kurapati PSSNV wrote: > On 7/12/2023 5:42 PM, Johan Hovold wrote: > > 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/ > Sure, will create a static array of names if possible in global > section of file and use it to read interrupts. Or just use devm_kasprintf(), which should allow for a cleaner implementation. I've fixed it up like this for my X13s wip branches: https://github.com/jhovold/linux/commit/0898b54456bc2f4bd4d420480db98e6758771ace > Are you fine with seperating out setup_irq and setup_mp_irq functions > ? Can you please review comments and suggestion on [1]. I haven't had time to look at your latest replies yet, but as I already said when reviewing v9, it seems you should be using a common helper for non-mp and mp. Johan