Re: [PATCH 1/3] dell_wmi: Support new hotkeys on the XPS 13 Skylake

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday 21 November 2015 01:06:36 Darren Hart wrote:
> > -	keymap = kcalloc(hotkey_num + 1, sizeof(struct key_entry),
> > GFP_KERNEL); +	keymap = kcalloc(hotkey_num +
> > ARRAY_SIZE(dell_wmi_extra_keymap),
> 
> This previously allocated kotkey_num + 1, but you dropeed the +1,
> making it eactly the size of hotkey_num + the new entries you added.
> 
> Why don't we need the +1 anymore? (it isn't clear to me why we needed
> to before actually, but I want to confirm you considered it).
> 

Last entry in keymap array must be KE_END, right? So this is that +1.

-- 
Pali Rohár
pali.rohar@xxxxxxxxx

Attachment: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux