From: Dan Carpenter <dan.carpenter@oracle.com>
To: Luis de Bethencourt <luis@debethencourt.com>
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
devel@driverdev.osuosl.org, Kirk Reiser <kirk@reisers.ca>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
speakup@linux-speakup.org,
Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>,
linux-kernel@vger.kernel.org,
Domagoj Trsan <domagoj.trsan@gmail.com>,
Samuel Thibault <samuel.thibault@ens-lyon.org>,
Chris Brannon <chris@the-brannons.com>
Subject: Re: [PATCH] staging: speakup: replace simple_strtoul() with kstrtoint()
Date: Thu, 25 Jun 2015 11:19:42 +0300 [thread overview]
Message-ID: <20150625081942.GX28762@mwanda> (raw)
In-Reply-To: <20150624174614.GA18762@goodgumbo.baconseed.org>
Probably once you start writing a patch you will figure it out. :)
keymap_store() is a crap function. We have the cp1 pointer that points
to the end of two back to back 3 char arrays. The name cp1 is because
it is the second copy of the cp buffer which is a copy of the buf
buffer. Since it is a backwards array we use cp1[-3] where normally we
would say array[0] and cp1[-1] to mean the last element in the array.
We need around 6 characters in cp1, but we are only garaunteed to have
2. There is no checking.
Lots of checkpatch.pl warnings.
Just focus on cleaning up keymap_store() and hopefully at the end you
can just delete spk_s2uchar().
regards,
dan carpenter
prev parent reply other threads:[~2015-06-25 8:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-23 20:47 [PATCH] staging: speakup: replace simple_strtoul() with kstrtoint() Luis de Bethencourt
2015-06-23 22:53 ` Dan Carpenter
2015-06-23 23:15 ` Luis de Bethencourt
2015-06-24 5:23 ` Sudip Mukherjee
2015-06-24 10:19 ` Luis de Bethencourt
2015-06-24 17:46 ` Luis de Bethencourt
2015-06-25 8:19 ` 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=20150625081942.GX28762@mwanda \
--to=dan.carpenter@oracle.com \
--cc=aysemelikeyurtoglu@gmail.com \
--cc=chris@the-brannons.com \
--cc=devel@driverdev.osuosl.org \
--cc=domagoj.trsan@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=kirk@reisers.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=luis@debethencourt.com \
--cc=samuel.thibault@ens-lyon.org \
--cc=speakup@linux-speakup.org \
--cc=sudipm.mukherjee@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.