From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761090AbcIAB5l (ORCPT ); Wed, 31 Aug 2016 21:57:41 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:56112 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1760929AbcIAB5k (ORCPT ); Wed, 31 Aug 2016 21:57:40 -0400 X-IBM-Helo: d03dlp01.boulder.ibm.com X-IBM-MailFrom: arbab@linux.vnet.ibm.com Date: Wed, 31 Aug 2016 20:57:29 -0500 From: Reza Arbab To: David Rientjes Cc: Andrew Morton , Greg Kroah-Hartman , Vlastimil Babka , Vitaly Kuznetsov , Yaowei Bai , Joonsoo Kim , Dan Williams , Xishi Qiu , David Vrabel , Chen Yucong , Andrew Banman , Seth Jennings , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RESEND PATCH v2] memory-hotplug: fix store_mem_state() return value References: <20160831150105.GB26702@kroah.com> <1472658241-32748-1-git-send-email-arbab@linux.vnet.ibm.com> <20160831132557.c5cf0985e3da5f2850a10b1d@linux-foundation.org> <20160831233811.g6kf24fdhnfhn637@arbab-vm> <20160901001751.m3z2snlop2djzqgd@arbab-vm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: Organization: IBM Linux Technology Center User-Agent: Mutt/1.6.2-neo (2016-08-21) X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16090101-0028-0000-0000-0000057D63BC X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00005689; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000184; SDB=6.00752345; UDB=6.00355704; IPR=6.00525157; BA=6.00004683; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00012540; XFM=3.00000011; UTC=2016-09-01 01:57:37 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16090101-0029-0000-0000-00002ED87C32 Message-Id: <20160901015729.426os236ao6j5qvd@arbab-vm> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-09-01_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1609010017 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 31, 2016 at 05:28:26PM -0700, David Rientjes wrote: >> 2. store_mem_state() still needs a tweak, right? It was only >> returning -EINVAL by accident, due to the convoluted sequence I >> listed in the patch. > >Yes, absolutely. It returning -EINVAL for "nline" is what is accidently >preserving it's backwards compatibility :) Note that device_online() >returns 1 if already online and memory_subsys_online() returns 0 if online >in this case. So we want store_mem_state() to return -EINVAL if >device_online() returns non-zero (this was in my first email). I'll spin a v3 patch to do this. Thank you for your review! -- Reza Arbab