Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1170991 > unrolled thread
| Started by | Luis de Bethencourt <luis@debethencourt.com> |
|---|---|
| First post | 2015-06-24 01:20 +0200 |
| Last post | 2015-06-25 10:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] staging: speakup: replace simple_strtoul() with kstrtoint() Luis de Bethencourt <luis@debethencourt.com> - 2015-06-24 01:20 +0200
Re: [PATCH] staging: speakup: replace simple_strtoul() with kstrtoint() Dan Carpenter <dan.carpenter@oracle.com> - 2015-06-25 10:30 +0200
| From | Luis de Bethencourt <luis@debethencourt.com> |
|---|---|
| Date | 2015-06-24 01:20 +0200 |
| Subject | Re: [PATCH] staging: speakup: replace simple_strtoul() with kstrtoint() |
| Message-ID | <pEFDY-sP-7@gated-at.bofh.it> |
On Wed, Jun 24, 2015 at 01:53:33AM +0300, Dan Carpenter wrote: > Nope. Your patch is totally wrong (buggy). Please be more careful in > the future. > > regards, > dan carpenter > I saw other commits replace the obsolete simple_strtoul() this way and the documentation makes it look like it is a 1 to 1 replacement. Sorry about this. I will investigate further to understand why this is buggy and be more careful in the future. Thanks for the review, Luis -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Date | 2015-06-25 10:30 +0200 |
| Message-ID | <pFaHN-3gT-27@gated-at.bofh.it> |
| In reply to | #1170991 |
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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web