From: Michael Kelley <mhklinux@outlook.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Markus Elfring <Markus.Elfring@web.de>,
"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>,
Dexuan Cui <decui@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
"K. Y. Srinivasan" <kys@microsoft.com>,
Wei Liu <wei.liu@kernel.org>, "cocci@inria.fr" <cocci@inria.fr>,
LKML <linux-kernel@vger.kernel.org>
Subject: RE: Drivers: hv: vmbus: One function call less in create_gpadl_header() after error detection
Date: Thu, 11 Jan 2024 14:35:18 +0000 [thread overview]
Message-ID: <SN6PR02MB41570E0E960C9D588B9EF96DD4682@SN6PR02MB4157.namprd02.prod.outlook.com> (raw)
In-Reply-To: <4ba5ab3c-80ae-448f-9377-01087ec9e858@moroto.mountain>
From: Dan Carpenter <dan.carpenter@linaro.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@linaro.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
next prev parent reply other threads:[~2024-01-11 14:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-26 19:09 [PATCH] Drivers: hv: vmbus: One function call less in create_gpadl_header() after error detection Markus Elfring
2024-01-10 5:41 ` Michael Kelley
2024-01-10 10:58 ` Markus Elfring
2024-01-10 16:15 ` Michael Kelley
2024-01-10 17:08 ` Markus Elfring
2024-01-10 17:53 ` Michael Kelley
2024-01-10 18:37 ` Dan Carpenter
2024-01-10 22:17 ` Michael Kelley
2024-01-11 7:04 ` Dan Carpenter
2024-01-11 14:35 ` Michael Kelley [this message]
2024-01-10 11:29 ` [PATCH] " Dan Carpenter
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=SN6PR02MB41570E0E960C9D588B9EF96DD4682@SN6PR02MB4157.namprd02.prod.outlook.com \
--to=mhklinux@outlook.com \
--cc=Markus.Elfring@web.de \
--cc=cocci@inria.fr \
--cc=dan.carpenter@linaro.org \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wei.liu@kernel.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).