Re: Input-evdev: Use kmalloc_array() in evdev_handle_get_val()

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

 



> So we have to multiply twice now, once in kmalloc_array, the second
> time in memcpy().

It looks so in the source code after the suggested refactoring.


> No, thank you.

Would you like to check any further if a specific compiler implementation
will still optimise common subexpressions as you desired it?


> Also, please note that we do not really treat the allocated "mem" as an array,
> but rather area of memory that holds all bits that we need to transfer,
> and so I consider using kmalloc_array() actually wrong here.

Thanks for your explanation.


> Please do not blindly follow checkpatch and coccinelle suggestions.
> They are just that: suggestions and not hared rules.

I am curious on how to clarify corresponding deviations further.


Would you like to suggest any other details so that the evolving scripts
can become better and safer for static source code analysis?

Do you know any special properties which should be additionally checked
at call sites which are similar to the discussed place?

Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux