Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1027495ybh; Mon, 13 Jul 2020 07:33:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxz7WezIGauiD5d6oLvYGmOpgdhXKf8rSKfo+3/V1jWoxMZjAzteEkWAvXp5GVocegzYyxD X-Received: by 2002:a17:906:ce3c:: with SMTP id sd28mr77061ejb.382.1594650789454; Mon, 13 Jul 2020 07:33:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594650789; cv=none; d=google.com; s=arc-20160816; b=eXVyFrbf1o6tJbxkPFrJmhWHHONM6sVDth2NZ3FRoNBxGvfcwPCLqjlfDO7pE+hsFb ccbOSZiGdnxYErrPgy1PIBbIkj/U67fyla7K+uj8mbXz0QFlBoDG+miEaWgBF3DvQRfL wQ8glNXO4keB/j+NZSUMIgP/kZ83dcU7bFO1+37P2IMbDjg9rOXDIcCfGUps0PHSJZVA 6fm/lm9w2A6kblNJWruKv1OE3NHziGetkE2EzH1HAReh0P0d4/LlRpUZy3wlsLwd533n uPTyAQRVL8Roq6fEGLzWrIJ5reZjFex40ryD8JWcI903xn5dOi33YRFyDac7FsLunOq/ Jo7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=cczukomO7UcCHwxyADg2/yNUOTAA7Ksj6A5ikRcdVSA=; b=D1WA4lM6VOrELad6fQgL8kXGioAbJLOJoEguCrx03ZfJsfTD2X8/qgB/q60MtH301z Zlg7v3d525c+u8lgznPVL8z98UFI/sRakC2BiHu2a3P5GeCUBPJjTEZ+OGLGQ6mGNd3a 2OijNXQhweql8gKlrd5TQzB/828dKnYwb1SrG/qz+TMzPR0zJ2D0WRuE03TD3XQSbyBg ZiVyr7M3DYyBjfalo8LPg3Otwd4LpcBLFobio8cjziBkBapGzy1GhbEzXY3IZmboELMb BcSQLBF105wK9KfMy2mkCrAwmO5VKrBQnTfxi0B6SP2mfx8Q6IEc1LBocxPcm62WiS6x f6Ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=ZseOkDY3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b11si9015834ejg.42.2020.07.13.07.32.45; Mon, 13 Jul 2020 07:33:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=ZseOkDY3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729902AbgGMOaS (ORCPT + 99 others); Mon, 13 Jul 2020 10:30:18 -0400 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:12190 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729659AbgGMOaS (ORCPT ); Mon, 13 Jul 2020 10:30:18 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 13 Jul 2020 07:30:05 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Mon, 13 Jul 2020 07:30:17 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Mon, 13 Jul 2020 07:30:17 -0700 Received: from [10.24.37.103] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 13 Jul 2020 14:30:09 +0000 Subject: Re: [TEGRA194_CPUFREQ PATCH v4 3/4] cpufreq: Add Tegra194 cpufreq driver To: Viresh Kumar CC: , , , , , , , , , , , , , , Sumit Gupta , References: <1593186236-12760-1-git-send-email-sumitg@nvidia.com> <1593186236-12760-4-git-send-email-sumitg@nvidia.com> <20200629061639.7cwxfi64drkof6yu@vireshk-i7> From: Sumit Gupta Message-ID: <0d04d2c8-8f87-ecc7-9bd6-633d84b60e8b@nvidia.com> Date: Mon, 13 Jul 2020 19:59:28 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20200629061639.7cwxfi64drkof6yu@vireshk-i7> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1594650605; bh=cczukomO7UcCHwxyADg2/yNUOTAA7Ksj6A5ikRcdVSA=; h=X-PGP-Universal:Subject:To:CC:References:From:Message-ID:Date: User-Agent:MIME-Version:In-Reply-To:X-Originating-IP: X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=ZseOkDY3VI8BBpYTwAQpZqe6ktLrz0X4KF9iKWlMzXm81N5tZVCx7P9cwtXlKw/V/ cdls1zrdFWpmKpSv/v0ICmHIx5ZjCiVT2ViSPXqCvbuxRBZZYZJOJqL/XQ9lIBDYBt Jlj+THatHHPaGH1xG8du4Xi13uygwwJWLIMAFtFyk6znhBTGcu4+TzmSDFDx/yHnPG QSlAlx2JA0WOKpgdJY9RSv5UF8Ftc9mHWFobovQ05rfoLMRVQsEOGUFpekhZSh3WBi /cUvhBKOlKDxYhxF3BxI0qnLLZ1TCDz0QoSyRAPEBcvwXFwWL0XnR4/4QK/iUFkXoj 7GOq0EISwKABw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > On 26-06-20, 21:13, Sumit Gupta wrote: >> +static int tegra194_cpufreq_probe(struct platform_device *pdev) >> +{ >> + struct tegra194_cpufreq_data *data; >> + struct tegra_bpmp *bpmp; >> + int err, i; >> + >> + data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); >> + if (!data) >> + return -ENOMEM; >> + >> + data->num_clusters = MAX_CLUSTERS; >> + data->tables = devm_kcalloc(&pdev->dev, data->num_clusters, >> + sizeof(*data->tables), GFP_KERNEL); >> + if (!data->tables) >> + return -ENOMEM; >> + >> + platform_set_drvdata(pdev, data); >> + >> + bpmp = tegra_bpmp_get(&pdev->dev); >> + if (IS_ERR(bpmp)) >> + return PTR_ERR(bpmp); >> + >> + read_counters_wq = alloc_workqueue("read_counters_wq", __WQ_LEGACY, 1); >> + if (!read_counters_wq) { >> + dev_err(&pdev->dev, "fail to create_workqueue\n"); >> + err = -EINVAL; >> + goto put_bpmp; > > This will call destroy_workqueue() eventually and it will crash your > kernel. > > Apart from this, this stuff looks okay. Don't resend the patch just > yet (and if required, send only this patch using --in-reply-to flag > for git send email). Lets wait for an Ack from Rob for the first two > patches. > Sorry for the delayed response as i was on PTO. Thank you for the feedback. Have posted a v5 based on v4 patch set. >> + } >> + > > -- > viresh >