From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4121F23AB9D for ; Wed, 4 Feb 2026 01:27:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770168442; cv=none; b=VkruAWOQLC5NH/3h8s1mJbKfwCPvKRGLK1l85B5h1d+4chLZDS6wv148nx7hZfVcm4hXIC0H3ZHLnMh+Zie59fi7Nhn+l2hdwCN30zvI8dCkZhEwyghD41hMeyfaXHDGa5mvyfGfZge6DqVVV26+lIJeWKxd2ymPSU0+EgwcF/8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770168442; c=relaxed/simple; bh=U36NIkoSvp9cWRBoThv8JAOkw96bU6j8Xva025NH7Cs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AwvR8SUGMmVp76YWG1QTxz8oKuanseDB9JUUCB8kkDAqnw9peJL8mYC1y0RZssw3C/MLTZhueiD3FQ7xcXs5f58uRy47wsW/UCi7Kk2Y1irmzX+p3CTt9SgZIKVJdk3NZA0HmwqKQNEYH2f38XKNN+xsDadsdO2DQBmV5QNGe9g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=XxfYH79X; arc=none smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="XxfYH79X" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1770168442; x=1801704442; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=U36NIkoSvp9cWRBoThv8JAOkw96bU6j8Xva025NH7Cs=; b=XxfYH79X44C6zxdYlV/N0m8Lk/6OpP+gb8bNtmJyYl5BbnLDKXt0p5Cn td7Qw7eyNxf7XUyed3UHc5RM1OBKbf0WjSU6+RIvj0K58b3UsI1OI4o5s B0Iv+oZ8HZYUffFgTu3pWqFmIbA5L0g1XCWY3xXKUIHNtqSZPbmcQtBt1 mtC4qqYI35k/oWOnj+5bzQ98WJmCSDXDbe6YQ+8jZhskheACk1OXstK0z f+coslLUdo8canYaSn55ES3qcEUqWRTE9/JYN3NoMEI9iMnEVZfNf5KZU Vo3YVl4fGRZXdAcIB7Rsd51dbmqVvE49ugTcrN5AtqpipZAgrm6VLxH70 Q==; X-CSE-ConnectionGUID: JUC2nw13QT6k22in6D7S4w== X-CSE-MsgGUID: DQTk31aTSD2hCgwtPUPUUw== X-IronPort-AV: E=McAfee;i="6800,10657,11691"; a="81664762" X-IronPort-AV: E=Sophos;i="6.21,271,1763452800"; d="scan'208";a="81664762" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2026 17:27:21 -0800 X-CSE-ConnectionGUID: npXbnVvwQby+8LDDAF4RAw== X-CSE-MsgGUID: 10CBa2xQQgqaZRl/mL2GMw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,271,1763452800"; d="scan'208";a="214987947" Received: from pgcooper-mobl3.ger.corp.intel.com (HELO localhost) ([10.245.245.99]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2026 17:27:18 -0800 Date: Wed, 4 Feb 2026 03:27:16 +0200 From: Andy Shevchenko To: "Raghavendra, Vignesh" Cc: Miquel Raynal , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Richard Weinberger Subject: Re: [PATCH v1 1/1] mtd: cfi_cmdset_0001: Factor out do_write_buffer_locked() to reduce stack frame Message-ID: References: <20260124005203.3167280-1-andriy.shevchenko@linux.intel.com> <87ldhgl1lg.fsf@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo On Sun, Feb 01, 2026 at 03:29:59PM +0530, Raghavendra, Vignesh wrote: > On 1/29/2026 11:53 PM, Miquel Raynal wrote: ... > >>> XIP_INVAL_CACHED_RANGE(map, initial_adr, initial_len); > >>> ENABLE_VPP(map); > >> > >> It seems more logical to leave these two in the original call. > >> > >> ... > > > > [...] > > > >>> + DISABLE_VPP(map); > >> > >> Otherwise this will seem dangling here. > >> > >>> put_chip(map, chip, cmd_adr); > >>> mutex_unlock(&chip->mutex); > >>> return ret; > >> > >> ... > >> > >> Another approach is to leave goto as is in the _locked() and move DISABLE_VPP() > >> there. > >> > >> Tell me what do you prefer? > > > > While I also find more logical to keep the ENABLE_VPP/DISABLE_VPP > > together, I do not mind to see them in one side or the other. I would by > > default let them in the main caller and suffi the inner function with > > "_locked()" as you did, but I'm fine either ways. > > Keeping ENABLE_VPP/DISABLE_VPP together along with _locked() suffix for > inner function is cleaner to read. I just sent a v2 where I kept them in the original call. -- With Best Regards, Andy Shevchenko