[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<SN6PR02MB41570E0E960C9D588B9EF96DD4682@SN6PR02MB4157.namprd02.prod.outlook.com>
Date: Thu, 11 Jan 2024 14:35:18 +0000
From: Michael Kelley <mhklinux@...look.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
CC: Markus Elfring <Markus.Elfring@....de>, "linux-hyperv@...r.kernel.org"
<linux-hyperv@...r.kernel.org>, "kernel-janitors@...r.kernel.org"
<kernel-janitors@...r.kernel.org>, Dexuan Cui <decui@...rosoft.com>, Haiyang
Zhang <haiyangz@...rosoft.com>, "K. Y. Srinivasan" <kys@...rosoft.com>, Wei
Liu <wei.liu@...nel.org>, "cocci@...ia.fr" <cocci@...ia.fr>, LKML
<linux-kernel@...r.kernel.org>
Subject: RE: Drivers: hv: vmbus: One function call less in
create_gpadl_header() after error detection
From: Dan Carpenter <dan.carpenter@...aro.org> Sent: Wednesday, January 10, 2024 11:05 PM
>
> On Wed, Jan 10, 2024 at 10:17:17PM +0000, Michael Kelley wrote:
> > From: Dan Carpenter <dan.carpenter@...aro.org> Sent: Wednesday, January
> 10, 2024 10:38 AM
> > >
> > > The second half of the if statement is basically duplicated. It doesn't
> > > need to be treated as a special case. We could do something like below.
> > > I deliberately didn't delete the tabs. Also I haven't tested it.
> >
> > Indeed! I looked at the history, and this function has been
> > structured with the duplication since sometime in 2010, which
> > pre-dates my involvement by several years. I don't know of
> > any reason why the duplication is needed, and agree it could
> > be eliminated.
> >
> > Assuming Markus is OK with my proposal on the handling of
> > memory allocation failures, a single patch could simplify this
> > function quite a bit.
> >
> > Dan -- do you want to create and submit the patch? I'll test the
> > code on Hyper-V. Or I can create, test, and submit the patch with
> > a "Suggested-by: Dan Carpenter".
>
> I messed up the if statement the first couple times I tried to think
> about it so I don't trust myself here. Could you give me the
> Suggested-by tag?
>
Will do.
Michael
Powered by blists - more mailing lists