Messages in this thread | | | Date | Thu, 3 Aug 2023 22:07:25 +0000 | From | Wei Liu <> | Subject | Re: [PATCH] hv_balloon: Update the balloon driver to use the SBRM API |
| |
On Mon, Jul 31, 2023 at 02:25:13PM -0700, Boqun Feng wrote: > Hi Mitchell, > > On Wed, Jul 26, 2023 at 12:23:31AM +0000, Mitchell Levy via B4 Relay wrote: > > From: Mitchell Levy <levymitchell0@gmail.com> > > > > > > > > --- > > I don't know whether it's a tool issue or something else, but all words > after the "---" line in the email will be discarded from a commit log. > You can try to apply this patch yourself and see the result: > > b4 shazam 20230726-master-v1-1-b2ce6a4538db@gmail.com > > > This patch is intended as a proof-of-concept for the new SBRM > > machinery[1]. For some brief background, the idea behind SBRM is using > > the __cleanup__ attribute to automatically unlock locks (or otherwise > > release resources) when they go out of scope, similar to C++ style RAII. > > This promises some benefits such as making code simpler (particularly > > where you have lots of goto fail; type constructs) as well as reducing > > the surface area for certain kinds of bugs. > > > > The changes in this patch should not result in any difference in how the > > code actually runs (i.e., it's purely an exercise in this new syntax > > sugar). In one instance SBRM was not appropriate, so I left that part > > alone, but all other locking/unlocking is handled automatically in this > > patch. > > > > Link: https://lore.kernel.org/all/20230626125726.GU4253@hirez.programming.kicks-ass.net/ [1] > > > > Suggested-by: Boqun Feng <boqun.feng@gmail.com> > > Signed-off-by: "Mitchell Levy (Microsoft)" <levymitchell0@gmail.com> > > Beside the above format issue, the code looks good to me, nice job! > > Feel free to add: > > Reviewed-by: Boqun Feng <boqun.feng@gmail.com> >
FAOD I'm expecting a v2 of this patch.
Thanks, Wei.
> Regards, > Boqun
| |