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 X-Spam-Level: X-Spam-Status: No, score=-16.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20C0AC4338F for ; Tue, 3 Aug 2021 04:36:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E2E046023B for ; Tue, 3 Aug 2021 04:36:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E2E046023B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BlP9wNjEaVbpYzocBlUSSlV0/apQbwK0uR0jDHC7YdE=; b=eP3yXSSrH3YQQJ gcSbZ1q+4FIDyGNhrLIGz9tRBvSGzHR1sbYVnq4zLH8CCPpFAnEYL/3Xw2X2VsMefXsHzvWlCpm/y 51cGc1gVT8K+fZAKeDZsHzsJigMgnHE99ZC8HTpEPmRCRhDXMR9UoxSK2/9ulaa5x3+PiU7Wg2p71 A6nyO7OnZYMdrVzVp0wmr9FiJmIe1Mv5UHhHJxNINgFVQ/ixTdPEYVeRyAvLXTAfewGQ4hfS862kS oxTKLmCNcI+V5s2bUzJF0YVGQ89b48tu70QClyT2H3F8Kf9lfgCoKxmJL+SNm7HG4BxP+9z5U3dod 2x6HG+6DqkrsWXCwxM4Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mAm8i-00123I-Iw; Tue, 03 Aug 2021 04:34:52 +0000 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mAm8f-00122y-DE for linux-arm-kernel@lists.infradead.org; Tue, 03 Aug 2021 04:34:50 +0000 Received: by mail-pl1-x632.google.com with SMTP id u16so13657014ple.2 for ; Mon, 02 Aug 2021 21:34:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=2S1RHICTPvCBoDexjUcvrU4GD6pFJPXLIcRegSCBHdk=; b=mjbQfGcylJTRFPAW9GXK36eRTClW08a5/wkDQvK2alnHWb4D2eS+vERUS7qNyAzm+1 GPOqu/S8lHa8m5uo+ZyYYoFofGuGAygfi64cyXODwSXc07e5OMNaRAQrd2hisxEL9WId 8bJHo0J+ftMIfuvK1XFEeVM1khMmT/tH3QmTZCcifXYlcI05AohG3h1Ul64VhY49a3VU sJR0NFRefikOz4/+mAOB02LWyEiRPZOQVD0hCxW7rBFywNBFaiw97Hd6hgVC2FqMOyqq 5bNiAkd6L7ByxvhlsNPVvpGXgJBmVqCDWIfow0jPRB2y2v0pudlSFcPMy41VuDU8J9Gn ToWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=2S1RHICTPvCBoDexjUcvrU4GD6pFJPXLIcRegSCBHdk=; b=ddBokeqz6DaK1fxKxJ09zRqvR79W7jJ8HNlbxPkFkIEqYSpU5TubbLbf32LYnrYmSH JQG0sBp8Zc0raYTyu5Nirto7WUtqO9YfA1x6Pli3kS+VMH7wNAKjT3i+JaLNHaoxNrDR bYhfAkzbMn7EAVJHxeHmjUUwmWUGTQt6nJ7qV+37m86FYahk98x9zVSzgG3ggwJPtbUz 8h7jZ8uJJngb0qmXLVpTSJJLAprQofYk0k5jS57B5hRzJSZX2/Riu6ki9n3R+dzKlplW W8mWBNrmKtyfSxnF2Qr1svgSX+zHmhPhuCJ6mQ2gaZIi5xG31lURQhPiSUxMzqbEG+UT T9DQ== X-Gm-Message-State: AOAM5315AbENsaoUp8vO2MT6fSiQjPeIPtYh/X0SRxXL8UoRN0YsBBpq +INmo28GgAn5/JQeCpkExhWEUg== X-Google-Smtp-Source: ABdhPJyVmHXqHdDoagUFheP2VyeQD9jdDbE1g7DzOLalHOMX9IWKd2ylNNQgDlVH6IcTo3GbFFiHaQ== X-Received: by 2002:a65:6813:: with SMTP id l19mr1158826pgt.118.1627965287503; Mon, 02 Aug 2021 21:34:47 -0700 (PDT) Received: from localhost ([122.172.201.85]) by smtp.gmail.com with ESMTPSA id l6sm13452830pff.74.2021.08.02.21.34.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Aug 2021 21:34:47 -0700 (PDT) Date: Tue, 3 Aug 2021 10:04:45 +0530 From: Viresh Kumar To: Lukasz Luba Cc: linux-kernel@vger.kernel.org, sudeep.holla@arm.com, cristian.marussi@arm.com, rjw@rjwysocki.net, nicola.mazzucato@arm.com, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Subject: Re: [PATCH] cpufreq: arm_scmi: Fix error path when allocation failed Message-ID: <20210803043445.7sm4mnl4f5f7co7h@vireshk-i7> References: <20210802204550.12647-1-lukasz.luba@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210802204550.12647-1-lukasz.luba@arm.com> User-Agent: NeoMutt/20180716-391-311a52 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210802_213449_527686_E395629D X-CRM114-Status: GOOD ( 19.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 02-08-21, 21:45, Lukasz Luba wrote: > Print warning and return an error which would stop the initialization > when cpumask allocation failed. > > Fixes: 80a064dbd556 ("scmi-cpufreq: Get opp_shared_cpus from opp-v2 for EM") > Signed-off-by: Lukasz Luba > --- > drivers/cpufreq/scmi-cpufreq.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c > index ec9a87ca2dbb..b159123e68fd 100644 > --- a/drivers/cpufreq/scmi-cpufreq.c > +++ b/drivers/cpufreq/scmi-cpufreq.c > @@ -133,8 +133,10 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy) > return -ENODEV; > } > > - if (!zalloc_cpumask_var(&opp_shared_cpus, GFP_KERNEL)) > - ret = -ENOMEM; > + if (!zalloc_cpumask_var(&opp_shared_cpus, GFP_KERNEL)) { > + dev_warn(cpu_dev, "failed to allocate cpumask\n"); We shouldn't be printing here anything I believe as the allocation core does it for us. That's why you won't see a print message anywhere for failed allocations. > + return -ENOMEM; > + } > > /* Obtain CPUs that share SCMI performance controls */ > ret = scmi_get_sharing_cpus(cpu_dev, policy->cpus); > -- > 2.17.1 > -- viresh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel