Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1264997 > unrolled thread
| Started by | Ivan Safonov <insafonov@gmail.com> |
|---|---|
| First post | 2015-11-08 08:10 +0100 |
| Last post | 2015-11-11 11:20 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v2 05/12] staging: rtl8188eu: kzalloc replaced by kmalloc Ivan Safonov <insafonov@gmail.com> - 2015-11-08 08:10 +0100
Re: [PATCH v2 05/12] staging: rtl8188eu: kzalloc replaced by kmalloc Dan Carpenter <dan.carpenter@oracle.com> - 2015-11-11 10:50 +0100
Re: [PATCH v2 05/12] staging: rtl8188eu: kzalloc replaced by kmalloc Ivan Safonov <insafonov@gmail.com> - 2015-11-11 11:20 +0100
| From | Ivan Safonov <insafonov@gmail.com> |
|---|---|
| Date | 2015-11-08 08:10 +0100 |
| Subject | [PATCH v2 05/12] staging: rtl8188eu: kzalloc replaced by kmalloc |
| Message-ID | <qssgW-5qo-23@gated-at.bofh.it> |
_rtl88e_fill_dummy fills the array elemets with zeros if necessary. Signed-off-by: Ivan Safonov <insafonov@gmail.com> --- drivers/staging/rtl8188eu/hal/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c index 1d8930a..7f1df4d 100644 --- a/drivers/staging/rtl8188eu/hal/fw.c +++ b/drivers/staging/rtl8188eu/hal/fw.c @@ -189,7 +189,7 @@ int rtl88eu_download_fw(struct adapter *adapt) return -EFBIG; } - pfwdata = kzalloc(FW_8188E_SIZE, GFP_KERNEL); + pfwdata = kmalloc(FW_8188E_SIZE, GFP_KERNEL); if (!pfwdata) return -ENOMEM; -- 2.4.10 -- 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-11-11 10:50 +0100 |
| Message-ID | <qtAcp-11f-3@gated-at.bofh.it> |
| In reply to | #1264997 |
On Sun, Nov 08, 2015 at 02:11:08PM +0700, Ivan Safonov wrote: > _rtl88e_fill_dummy fills the array elemets with zeros if necessary. > _rtl88e_fill_dummy() fills the last sizeof(u32) or whatever so the code is aligned but it doesn't fill up to the end of FW_8188E_SIZE. Why do we even allocate that much memory. Why don't we just allocate: pfwdata = kmalloc(round_up(fwsize, sizeof(u32)), GFP_KERNEL); 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] | [next] | [standalone]
| From | Ivan Safonov <insafonov@gmail.com> |
|---|---|
| Date | 2015-11-11 11:20 +0100 |
| Message-ID | <qtAFs-1sW-11@gated-at.bofh.it> |
| In reply to | #1267064 |
On 11/11/2015 04:43 PM, Dan Carpenter wrote: > On Sun, Nov 08, 2015 at 02:11:08PM +0700, Ivan Safonov wrote: >> _rtl88e_fill_dummy fills the array elemets with zeros if necessary. >> > _rtl88e_fill_dummy() fills the last sizeof(u32) or whatever so the code > is aligned but it doesn't fill up to the end of FW_8188E_SIZE. Why do > we even allocate that much memory. Why don't we just allocate: > > pfwdata = kmalloc(round_up(fwsize, sizeof(u32)), GFP_KERNEL); > > regards, > dan carpenter Yes, it will save about 2 KB. I will correct it in the next patch. -- 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