Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp276559yba; Wed, 3 Apr 2019 08:32:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqwRyTkuiu8q0J5LAZ3bU8jnwE0vUkp9k/I3Mr2zu9KSdeJHllH3dVmnF4fRH2X048g2jxUF X-Received: by 2002:a62:1249:: with SMTP id a70mr43639pfj.160.1554305568549; Wed, 03 Apr 2019 08:32:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554305568; cv=none; d=google.com; s=arc-20160816; b=rHpJ1kSmYPeBL1ymjZzEQwG5Qt1hlSh1plU/wlDdI32QlBuH7spWQHqCzYoLvXCgzH BIEhf5x/EJO+xhmJvdR4+tsfhkhXU1fwq2Fm/Dy4uQyBZeGkf7HQv+cbVd1yK3g2hoh+ J96EYNeeWEpwCqmPmsK94AVaV36doL8auIUf0YskXiH1Gx9chvp+SrbQWePfFPRQAvcE seigu1DduJb9VJ8A456NMRnXljO0khrUfXcNKGn5wWnaG+Rr6V2pJX2UISUBp1GpHMuG dI+agIaD87SZtuDVzVMhTuhjfUCX2j/BWDvq2EZulRBL2Q2PHgm8PvZbkN2Rw4DZxHuG qFfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4QXh81wR3zsoqLqoDnsS51MdvvcQecl6/5L4N60e6ZE=; b=dTf+0fmcANr7eaFuxQaDCjlX0Awb23DBhEJk7oWvxQzl9h4Ilo7sA3fM1J9TirPRBh BX4rkftldb8t+qg8E+gk1ZybmEtogp5dqXTlodGoo4z+reOqSBORRORtoR70JTlGV5gm K5X3cq16gtnc5gmwQuOzW2AqOhBwoUjkhbw1GtTdUbjk8mXhZpjymo2OT6eDVSXZ4QEW zmGGGyjKOrNCgl/NK4mmjwL6IK62bGRpc+BZJBsd2xjDs6DZyEuMNECYzv5JMltA5FM+ /WO6FcnQPlKnZlrH9cgJWdTRdhagCbdWnkDHOvgStEwGfEOyDYAmysSzfjjcH4Xzr3Hp e9kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=u9ynQVtm; 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=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n13si3857566pgl.348.2019.04.03.08.32.32; Wed, 03 Apr 2019 08:32:48 -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=@oracle.com header.s=corp-2018-07-02 header.b=u9ynQVtm; 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=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726501AbfDCPbv (ORCPT + 99 others); Wed, 3 Apr 2019 11:31:51 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:46616 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726245AbfDCPbs (ORCPT ); Wed, 3 Apr 2019 11:31:48 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x33FOCjh057518; Wed, 3 Apr 2019 15:31:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : content-transfer-encoding : in-reply-to; s=corp-2018-07-02; bh=4QXh81wR3zsoqLqoDnsS51MdvvcQecl6/5L4N60e6ZE=; b=u9ynQVtmgVdcm53I/mev912u4CDFKjfTfSTrig7jDC4oITLQDQVtuoE9bKtF+6Ae+g1B Tv/cwptKziwwL4kWsFt9ODe/ZOenMrfAB+b5KM5zXeI7t3wmbEW3rQhnvZm9Z+LdeM0C ssqz70JDqFzry+bO3QR/zPu9y4wA9/6kCNSW0xLxe1RwJjLFrN4ixBuiwNL9iKAwI7My UKymPmcB4lH7yGGpbKNPQiy3kjHN78yf+DmxLqTHFQqI05vUWu45R7OaOdBkFqaHPa2H SYOZdTxYcQ/i4Bnpw/2gLf31bYYQHGChD5Txpl2XhhkVrQRqCsv4bFnXnmkZLQzHrVeN pQ== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 2rhyvt9u40-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 03 Apr 2019 15:31:38 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x33FVbqt117679; Wed, 3 Apr 2019 15:31:37 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3020.oracle.com with ESMTP id 2rm8f65ma3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 03 Apr 2019 15:31:37 +0000 Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x33FVQAC015423; Wed, 3 Apr 2019 15:31:26 GMT Received: from kadam (/41.202.241.37) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 03 Apr 2019 08:31:25 -0700 Date: Wed, 3 Apr 2019 18:31:15 +0300 From: Dan Carpenter To: Markus Elfring Cc: Wen Yang , "Rafael J. Wysocki" , Viresh Kumar , kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Yi Wang Subject: Re: [5/7] cpufreq/pasemi: Checking implementation of pas_cpufreq_cpu_init() Message-ID: <20190403153115.GA22624@kadam> References: <1554082674-2049-6-git-send-email-wen.yang99@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9216 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=967 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904030104 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9216 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904030104 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 03, 2019 at 04:23:54PM +0200, Markus Elfring wrote: > > @@ -146,6 +146,7 @@ static int pas_cpufreq_cpu_init(struct cpufreq_policy *policy) > > > > cpu = of_get_cpu_node(policy->cpu, NULL); > > > > + of_node_put(cpu); > > if (!cpu) > > goto out; > > Can the statement “return -ENODEV” be nicer as exception handling > in the if branch of this source code place? > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/cpufreq/pasemi-cpufreq.c?id=bf97b82f37c6d90e16de001d0659644c57fa490d#n137 > Why am I only receiving only one side of this conversation? I don't know why you're responding to... It's not required to fix/change unrelated style choices. If people want, they can just focus on their own thing. regards, dan carpenter