Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2149124pxy; Mon, 2 Aug 2021 21:38:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznaiuze8sv6YrirfSzcO37I5ou0O0vnBivXOqxZ+a6xVtoQqu9uIxaRUPA+FzWWDuiWQFo X-Received: by 2002:a17:907:2703:: with SMTP id w3mr18630405ejk.217.1627965520528; Mon, 02 Aug 2021 21:38:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627965520; cv=none; d=google.com; s=arc-20160816; b=f5lADqhsYsKNuCtsJbbfKAZl8zOVtlreHS5WZfMoc2wL1XNLeKyv5HlFr2b+kw7Ana 4tL1EF3a15x8FZjHYQEV1IUbDU4DwaP29TKqVVTASAkLX652KnDKYe+DbPw4hHwg7GTR 2hY8ItOafSfcC2WhNMevHfVHg/IaSaEo4UtkhjgseCZa6lhn4PFDZ+OBYw+b6A3l1C5J e+DrrJZetrHb2Pgsb8A0sRMa8eMosTjbUcqWAHOiOODYmg9HOB0U591/Ne8NEpOfHW4B AaDoccXqKw3+gLa0wiCJfpR3xa3v5C2GPQTrynOgXHEGtRpMFGE/2QvAOVf7YOSu6RFB yx9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=2S1RHICTPvCBoDexjUcvrU4GD6pFJPXLIcRegSCBHdk=; b=LCxmg8IID4/8s6DxnHrhZsz40sjZfKTxALePYalPWfPCIO4Y0UOuvpe85pJh/lDs5I y/5oio7FeqLqwSDdc02akllptBq8oG/r+xNhIEZhrLsfESjEENbWVHngIjUxT4TGfPdI y6170rywZVi3b/CNeJ5vBXrF8KFTACZN0zmoDPOYwsTa5cEsMP+y0gTv73Qa/d6YW/iR sxMKvbwaCw8frD3rjd3jTZnHDsJXb/DH8EEJP48BZT+w0U2JIfH2f3SHMR45Pu7EM1wU NxIQO0W427qCwwUg/cuU94U4i3APYbxmgclKBQpT2Vb+ShdoJJcLXRdHXBdjnqYKMHsS yTcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mjbQfGcy; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p31si15215498edb.554.2021.08.02.21.38.17; Mon, 02 Aug 2021 21:38:40 -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=@linaro.org header.s=google header.b=mjbQfGcy; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233805AbhHCEfB (ORCPT + 99 others); Tue, 3 Aug 2021 00:35:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233769AbhHCEfA (ORCPT ); Tue, 3 Aug 2021 00:35:00 -0400 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13638C061764 for ; Mon, 2 Aug 2021 21:34:48 -0700 (PDT) Received: by mail-pl1-x634.google.com with SMTP id q2so22173697plr.11 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=Lnrqsv7LXHjhKbVP21KENGZvgirZ53lBMdphllCOlMac6pK2KM5irx793cO2SQUvgv ms/PJ7ZRJdVXKoPUIAli0I7/Fta4ylHqHY+y3EA4DtVLBSEyUzAolF+w0/GNmvItxKMp TbDAwygHsiPSezspM55QdVHgBAevdNp/ZYPJ92B7jtrhRGslcHGIKn7AzWGR4fNkh4d6 uECCwaSfMsw0d+qWQLwTQJByjt8BgEHwphtsl37PGYUkU+UvmoWM9GPOfiDQjFVL9XzB qdJPNokkS38EZ9PGUGL7+4C8u8boFaNDeQCV4Ym0l/u2cVRam3BJaS5TtSUEpSuT+rWO v3Wg== X-Gm-Message-State: AOAM533TTG3Ri8TPtzBPagdXy1rqyBGjdCl49h0/KDRjKcmmC5hsC5O2 FkC6fPoWJXLCcdzDfMgQ0IjOoJYRUaw2Ag== 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210802204550.12647-1-lukasz.luba@arm.com> User-Agent: NeoMutt/20180716-391-311a52 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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