From: Dan Carpenter <dan.carpenter@oracle.com>
To: Aymen Qader <qader.aymen@gmail.com>
Cc: Wolfram Sang <wsa@the-dreams.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] staging: ks7010: Add null pointer check for skb
Date: Fri, 28 Sep 2018 11:22:39 +0300 [thread overview]
Message-ID: <20180928082239.disbtllum3duvdcg@mwanda> (raw)
In-Reply-To: <20180927180443.yjqycqa7jir6rb57@localhost.localdomain>
On Thu, Sep 27, 2018 at 07:04:43PM +0100, Aymen Qader wrote:
> Retraction: in hindsight I see that with the current usage of this
> function, there is already a check for the socket buffer so this check
> is unnecessary. However, I'm not sure if it's considered good practice
> to keep this check anyway--in any case, ENOMEM isn't the right error
> to return.
When we find inconsistent NULL checks then we fix it to make sense.
Generally, we prefer a minimal style, with no extra code for future
proofing. (The future seldom goes the way you expect and those extra
NULL checks would be easy to add back).
So, yes, do remove the NULL check but also fix the indenting while
you're at it.
Take your time to write patches. I write them, then I sit on them over
night then I send them in the morning. It means that sometimes other
people have already sent it but that's fine. If you have to redo a
patch then don't send the v2 patch on the same day. v2 patches are
stressful and you imagine that everyone is waiting for you to send it
or something. We are not waiting for you. We don't care if you wait
until next week to send these...
So when you write a v2 patch wait until the next day to send it. Then
you will be calm when you review it.
regards,
dan carpenter
next prev parent reply other threads:[~2018-09-28 8:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-27 15:16 Aymen Qader
2018-09-27 18:04 ` Aymen Qader
2018-09-28 8:22 ` Dan Carpenter [this message]
2018-09-28 8:13 ` Dan Carpenter
2018-09-28 8:16 ` Dan Carpenter
2018-09-28 8:48 ` Aymen Qader
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=20180928082239.disbtllum3duvdcg@mwanda \
--to=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=qader.aymen@gmail.com \
--cc=wsa@the-dreams.de \
/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®