From: Dan Carpenter <dan.carpenter@oracle.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "olaf@aepfle.de" <olaf@aepfle.de>,
Stephen Hemminger <sthemmin@microsoft.com>,
"kys@linuxonhyperv.com" <kys@linuxonhyperv.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"jasowang@redhat.com" <jasowang@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Michael Kelley \(EOSG\)" <Michael.H.Kelley@microsoft.com>,
"apw@canonical.com" <apw@canonical.com>,
"devel@linuxdriverproject.org" <devel@linuxdriverproject.org>,
"vkuznets@redhat.com" <vkuznets@redhat.com>
Subject: Re: [PATCH 1/1] Drivers: hv: vmbus: enable VMBus protocol version 5.0
Date: Tue, 15 May 2018 15:21:39 +0300 [thread overview]
Message-ID: <20180515122139.x6xmxol4iutaqys6@mwanda> (raw)
In-Reply-To: <20180514111755.371d1d46@xeon-e3>
On Mon, May 14, 2018 at 11:17:55AM -0700, Stephen Hemminger wrote:
> On Mon, 14 May 2018 18:14:15 +0000
> Dexuan Cui <decui@microsoft.com> wrote:
>
> > > From: devel <driverdev-devel-bounces@linuxdriverproject.org> On Behalf Of
> > > Stephen Hemminger
> > > Sent: Sunday, May 13, 2018 10:24
> > > > ...
> > > > @@ -372,6 +400,18 @@ int vmbus_post_msg(void *buffer, size_t buflen,
> > > bool can_sleep)
> > > > ...
> > > > + hdr = (struct vmbus_channel_message_header *)buffer;
> > >
> > > Hate to pick o the details, but buffer is void * so cast is not necessary here.
> >
> > Yes, it's unnecessary in C, though it's necessary in C++.
> >
> > I found the patch went into char-misc 4 hours ago, so it looks we may
> > as well leave it as is. IMHO an explicit cast is not a bad thing. :-)
> >
> > Thanks,
> > -- Dexuan
>
> Kernel developers like to be concise. In fact there is a smatch script that perodically
> gets run and more cleanup patches get sent.
It's a Coccinelle script, not Smatch. Coccinelle generates patches
automatically so it's a better tool for cleanup than Smatch.
I would generate a lot more Smatch information if there was a way to
integrate it easily into a code editor. For example, we could highlight
unecessary casts or pointer dereferences where Smatch wasn't 100% sure
if it was correct. Or you could hover over function name to see what
resources it allocates.
regards,
dan carpenter
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
prev parent reply other threads:[~2018-05-15 12:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-12 9:30 kys
2018-05-13 17:24 ` Stephen Hemminger
2018-05-14 18:14 ` Dexuan Cui
2018-05-14 18:17 ` Stephen Hemminger
2018-05-14 18:55 ` Dexuan Cui
2018-05-15 12:21 ` Dan Carpenter [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=20180515122139.x6xmxol4iutaqys6@mwanda \
--to=dan.carpenter@oracle.com \
--cc=Michael.H.Kelley@microsoft.com \
--cc=apw@canonical.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=jasowang@redhat.com \
--cc=kys@linuxonhyperv.com \
--cc=linux-kernel@vger.kernel.org \
--cc=olaf@aepfle.de \
--cc=stephen@networkplumber.org \
--cc=sthemmin@microsoft.com \
--cc=vkuznets@redhat.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
all inboxes | Powered by JetHome®