Home
last modified time | relevance | path

Searched hist:"706 dd22f" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/md/
H A Ddm-stripe.c706dd22f Thu Mar 08 21:35:44 CST 2018 Tycho Andersen <tycho@tycho.ws> dm stripe: get rid of a Variable Length Array (VLA)

Ideally, we'd like to get rid of all VLAs in the kernel and add -Wvla to
the build args: https://lkml.org/lkml/2018/3/7/621

This one is a simple case, since we don't actually need the VLA at all: we
can just iterate over the stripes twice, once to emit their names, and the
second time to emit status (i.e. trade memory for time). Since the number
of stripes is probably low, this is hopefully not that expensive.

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
706dd22f Thu Mar 08 21:35:44 CST 2018 Tycho Andersen <tycho@tycho.ws> dm stripe: get rid of a Variable Length Array (VLA)

Ideally, we'd like to get rid of all VLAs in the kernel and add -Wvla to
the build args: https://lkml.org/lkml/2018/3/7/621

This one is a simple case, since we don't actually need the VLA at all: we
can just iterate over the stripes twice, once to emit their names, and the
second time to emit status (i.e. trade memory for time). Since the number
of stripes is probably low, this is hopefully not that expensive.

Signed-off-by: Tycho Andersen <tycho@tycho.ws>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>