Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2960654imm; Mon, 28 May 2018 21:00:48 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqeYfUNh0BjRLVezx+f8rWi+QmNHG1dEv8Cvy9c281Net5GU4y6JnZFrnB40aIXFpkac9rq X-Received: by 2002:a17:902:9689:: with SMTP id n9-v6mr15591164plp.363.1527566448339; Mon, 28 May 2018 21:00:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527566448; cv=none; d=google.com; s=arc-20160816; b=hxHy39iUVzMWLGcXABZlWFmLliv6KQPqC7eg75SD3LtqIqL0cmBUxPPdJKPkW0CNXJ tjS8ZdbD0yFbmpbrKm8nU1FfdzokZtfMiT1HBfhIZeTv4wDN3h08uHWzTB4NR/yDY1Yl yiGSeL3QvldHgLQZ1VZkQr6UEig/dxBOEw4gupuCRMHyzJ6uudQTaGrhUUCCzVCvl1/S ErZto6dQ5ThxcwGYp6r24v7pg7ZuPYh2fj5IYuz9BIayYcuhbTf9gRQp/awzxrObomix XZfY5UcqZ/El5QAfl1LB2XBL+MnFVMyrCZJnZdXSFWWZycHAM/zSELB5Gc/uAj72XnK+ b/Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:mime-version:date:references :in-reply-to:subject:cc:to:from:arc-authentication-results; bh=QXQfuQsIy5MDXbmuEH7k3th6uLjMy1MjOwYCsMgtRFQ=; b=VoIRn2xWqo/DPtaPPtfqJbTRqU5TmVJ29rHYdpVJw/n46E+Nrcd9N+fUr5RhYZwQZU jIbe/fXfOhUyMgLbSk+ettT0rtUqINh8R3qI6BUfx9ODut3XLYeAKi8Egy27LTee8ToW Vu7oeFEdig/oKzfZjguY45de3H9W9fM8dT+C1BKCsTDDWLAHd6aLpI1A7tFZqq72PGyV 53hlvJxnu3VPOaZsp+CRXWS0viYOKxNRZJvKgEuYxBi3kKqJvird+ZXxq8lesT7jXu9g mXxfmxI3botMoQnOZ6QqUsccMiMRES001YvjNjPL5TbFFHbbFmiFhrCWshTmA+UF5wpB vkfw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n6-v6si31643554pla.12.2018.05.28.21.00.33; Mon, 28 May 2018 21:00: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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033060AbeE2BjO (ORCPT + 99 others); Mon, 28 May 2018 21:39:14 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:43926 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S936769AbeE2BjK (ORCPT ); Mon, 28 May 2018 21:39:10 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4T1co7H014553 for ; Mon, 28 May 2018 21:39:10 -0400 Received: from e18.ny.us.ibm.com (e18.ny.us.ibm.com [129.33.205.208]) by mx0b-001b2d01.pphosted.com with ESMTP id 2j8rner1kg-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 28 May 2018 21:39:09 -0400 Received: from localhost by e18.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 28 May 2018 21:39:09 -0400 Received: from b01cxnp22035.gho.pok.ibm.com (9.57.198.25) by e18.ny.us.ibm.com (146.89.104.205) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 28 May 2018 21:39:06 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4T1d5eV8913440 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 29 May 2018 01:39:05 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9471B28059; Mon, 28 May 2018 21:39:04 -0400 (EDT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 51F5828058; Mon, 28 May 2018 21:39:04 -0400 (EDT) Received: from birb.localdomain (unknown [9.185.142.34]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Mon, 28 May 2018 21:39:04 -0400 (EDT) Received: by birb.localdomain (Postfix, from userid 1000) id A45CE4EC638; Tue, 29 May 2018 11:39:01 +1000 (AEST) From: Stewart Smith To: Abhishek Goel , rjw@rjwysocki.net, daniel.lezcano@linaro.org, benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au, linux-pm@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Cc: Abhishek Goel Subject: Re: [PATCH] cpuidle/powernv : Add Description for cpuidle state In-Reply-To: <20180528173442.100642-1-huntbag@linux.vnet.ibm.com> References: <20180528173442.100642-1-huntbag@linux.vnet.ibm.com> Date: Tue, 29 May 2018 11:39:01 +1000 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 x-cbid: 18052901-0044-0000-0000-0000041EBA68 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009096; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000263; SDB=6.01039142; UDB=6.00531818; IPR=6.00818269; MB=3.00021349; MTD=3.00000008; XFM=3.00000015; UTC=2018-05-29 01:39:09 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18052901-0045-0000-0000-00000850DDAF Message-Id: <87d0xf6y16.fsf@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-28_14:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805290017 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Abhishek Goel writes: > @@ -215,7 +216,7 @@ static inline void add_powernv_state(int index, const char *name, > u64 psscr_val, u64 psscr_mask) > { > strlcpy(powernv_states[index].name, name, CPUIDLE_NAME_LEN); > - strlcpy(powernv_states[index].desc, name, CPUIDLE_NAME_LEN); > + strlcpy(powernv_states[index].desc, desc, CPUIDLE_DESC_LEN); We should still fall back to using name in the event of desc being null, as not all firmware will expose the descriptions. > @@ -311,6 +313,11 @@ static int powernv_add_idle_states(void) > pr_warn("cpuidle-powernv: missing ibm,cpu-idle-state-names in DT\n"); > goto out; > } > + if (of_property_read_string_array(power_mgt, > + "ibm,cpu-idle-state-descs", descs, dt_idle_states) < 0) { > + pr_warn("cpuidle-powernv: missing ibm,cpu-idle-state-descs in DT\n"); > + goto out; > + } I don't think pr_warn is appropriate here, as for all current released firmware we don't have that property. I think perhaps just silently continuing on is okay, as we have to keep compatibility with that firmware. > --- a/include/linux/cpuidle.h > +++ b/include/linux/cpuidle.h > @@ -17,7 +17,7 @@ > > #define CPUIDLE_STATE_MAX 10 > #define CPUIDLE_NAME_LEN 16 > -#define CPUIDLE_DESC_LEN 32 > +#define CPUIDLE_DESC_LEN 60 Do we really get that long? -- Stewart Smith OPAL Architect, IBM.