Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
soc/qcom: use struct_size over open coded arithmetic
Replace zero-length array with flexible-array member and make use
of the struct_size() helper in kzalloc(). For example:
struct apr_rx_buf {
struct list_head node;
int len;
uint8_t buf[];
};
Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn>- Loading branch information