From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Raghavendra, Vignesh" <vigneshr@ti.com>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
Richard Weinberger <richard@nod.at>
Subject: Re: [PATCH v1 1/1] mtd: cfi_cmdset_0001: Factor out do_write_buffer_locked() to reduce stack frame
Date: Wed, 4 Feb 2026 03:27:16 +0200 [thread overview]
Message-ID: <aYKgdIOvJA3KHo4J@smile.fi.intel.com> (raw)
In-Reply-To: <d7e637be-0489-44f0-b5ab-86eb55484fde@ti.com>
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
prev parent reply other threads:[~2026-02-04 1:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-24 0:52 [PATCH v1 1/1] mtd: cfi_cmdset_0001: Factor out do_write_buffer_locked() to reduce stack frame Andy Shevchenko
2026-01-24 1:04 ` Andy Shevchenko
2026-01-29 18:23 ` Miquel Raynal
2026-02-01 9:59 ` Raghavendra, Vignesh
2026-02-04 1:27 ` Andy Shevchenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aYKgdIOvJA3KHo4J@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox