Received: by 10.192.165.156 with SMTP id m28csp653614imm; Fri, 13 Apr 2018 05:44:40 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/ZYM5TCjir5NsHNg/U5SEBzqsG49XcQ9K9EjJkNuHLWDQt4HMPVYAfXIrJ8WGOVRgJj1HG X-Received: by 10.101.98.136 with SMTP id f8mr4034914pgv.41.1523623480278; Fri, 13 Apr 2018 05:44:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523623480; cv=none; d=google.com; s=arc-20160816; b=L31v+3jjJiXV/ua4l5qqoUM0ZJKKGd9IyDN/IaSEXDUuKRjLRb2Wul7ObciM810JN6 2ZRmOhr3zjNrx5aogT0DOKstNSO0SshBKWzu1+/iKR5Pi0+y0AaOmpXuYR+zfnEQKmzC EW7MHVfEJ9AJ+MIUo00MmjWrIfVLZhj/5GRLmG/rxDx+se7wZ7E9UcNmq2IYGnglVNbt ArHEySf9yWv+VaAy7x1G2qiXFY9qysH3xB4hUJx8VcWL57N5teBWxJwcWiHUp9xVP3Z9 cTJ9oe7CAG6ydH7ghIJAoJTr1J25RMfT/a7k5xoKFKN1vKAOKMEwn1qd2TIMMCSOqvsf c9Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=Wmjyd73zr9XHyn552A5/VaW8XxZP4mnut2bcwsjO7rM=; b=E9VJxwSrK8Vxpav3mZ3yPYrGFvLc9Ov30KnWv/lo25hMwRSPmElpIwqBuDR6eEcsTo SHTrtModv3sWfr9KqcsZihjWw087nJp8BliDEDaZ5Wl80RuJkUlDIT00L6h4EtB6TVyL kP3kFMpgTwEM8kPG7nJ3UIgaKeG2o/pzEMthiNeTf55V51EvFfz6RL/2Bm2QfKfLRgia hDsA3rKmN5pOLplew1Ba0HUV6cQNVbetTpBhvipoiWcBT8HDo9e+5AHWVgoaYPbln5IG C5WHfeiqaiwTiTJtLD8/IriwKm28Ql1X2h+UMTWkTsCOjTrz6eeDWlXgM/Bh6EsgFTtk yX6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YlXEC3Md; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id y101-v6si5460240plh.188.2018.04.13.05.44.25; Fri, 13 Apr 2018 05:44:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YlXEC3Md; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1754290AbeDMLqO (ORCPT + 99 others); Fri, 13 Apr 2018 07:46:14 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:53460 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753126AbeDMLqM (ORCPT ); Fri, 13 Apr 2018 07:46:12 -0400 Received: by mail-wm0-f46.google.com with SMTP id 66so4572541wmd.3 for ; Fri, 13 Apr 2018 04:46:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Wmjyd73zr9XHyn552A5/VaW8XxZP4mnut2bcwsjO7rM=; b=YlXEC3Md7yS1blvk5v+XimewFGUdkxLTWzijMzaM5iCqle4Kn2NK4LSOh4PwKIhd6J SR2GIIT6xeQNeZ0FlA6TASGJ11tebc6gvZLs9VVO3hT9TPvC2wnuRV7B6ny35u51N8Tm XC8psrmx2pXi1/g5ite+9rtrgQIXR3hsFn9Hk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Wmjyd73zr9XHyn552A5/VaW8XxZP4mnut2bcwsjO7rM=; b=lQrG/QXDntVwS4Zk2zjcy23JA3E60KN76ALX5Kofexe01WWbCFitxpDYBesF1dspoQ Nr/ZS+TgPK/olyDEpz/vipqJlQ97QKCAHrj7dVXDc+g9Kn7vb/1zeWws83n7dZOyR0Xk CdJBfx/kVthsTXtsKfp7s2/VH5qy0Dy7yprU4E1fhA7zgd14mhN7UdiuAndKaHvSjiql 5UIOLasd2eiJOJF/dDkCAvkuMELJI9K5KBppK33Kimg0zwFpzD1/g8OEAPDKG4kUyBxn cm2IB7pgIJcoshNeHztUbJhy1HZnQ534DHJ8HSx1/Z3XLkF9/HMNujxRmv7DjAIW6F6d Y2LQ== X-Gm-Message-State: ALQs6tCuXRjUCiowSMnJLW6+s1zTphIMDQct4kU0wR5eXNlNpBsgV/7J AkG6DyYrTznPLhP8CRU9DMBhOA== X-Received: by 10.28.235.25 with SMTP id j25mr3591175wmh.131.1523619970769; Fri, 13 Apr 2018 04:46:10 -0700 (PDT) Received: from [192.168.8.101] ([37.170.104.147]) by smtp.googlemail.com with ESMTPSA id w14sm1409499wmd.1.2018.04.13.04.46.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Apr 2018 04:46:09 -0700 (PDT) Subject: Re: [PATCH v3 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver To: Daniel Thompson Cc: viresh.kumar@linaro.org, edubezval@gmail.com, kevin.wangtao@linaro.org, leo.yan@linaro.org, vincent.guittot@linaro.org, linux-kernel@vger.kernel.org, javi.merino@kernel.org, rui.zhang@intel.com, linux-pm@vger.kernel.org, Amit Daniel Kachhap References: <1522945005-7165-1-git-send-email-daniel.lezcano@linaro.org> <1522945005-7165-7-git-send-email-daniel.lezcano@linaro.org> <20180413113848.xj7hg7gsbxpxekbo@holly.lan> From: Daniel Lezcano Message-ID: Date: Fri, 13 Apr 2018 13:46:07 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180413113848.xj7hg7gsbxpxekbo@holly.lan> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/04/2018 13:38, Daniel Thompson wrote: [ ... ] >> + /* >> + * Allocate the cpuidle cooling device with the list >> + * of the cpus belonging to the cluster. >> + */ >> + idle_cdev = cpuidle_cooling_alloc(topology_core_cpumask(cpu)); >> + if (!idle_cdev) >> + goto out; > > Perhaps nitpicking but it might be better to set ret to -ENOMEM here > and avoid initializing it during the declarations. > > There's no bug in the current form since ret is never assigned to > outside of the error paths, but the unwritten assumption that ret keeps > its original value throughout the loop seems like a bit of a landmine > w.r.t. future maintainance. Agree. -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog